What is this JavaScript gibberish?
- by W3Geek
I am studying how to make a 2D game with JavaScript by reading open source JavaScript games and I came across this gibberish...
aSpriteData = [
"}\"¹-º\"À+º\"À+º\"À+º\"¿¤À ~C_ +º\"À+º\"À+º\"À*P7²OK%¾+½u_\"À<¡a¡a¡bM@±@ª", // 0 ground
"a ' ![± 7°³b£[mt<Nµ7z]~¨OR»[f_7l},tl},+}%XN²Sb[bl£[±%Y_¹ !@ $", // 1 qbox
"!A % @,[] ±}°@;µn¦&X£ <$ §¤ 8}}@Prc'U#Z'H'@· ¶\"is ¤&08@£(", // 2 mario
" ´!A.@H#q8¸»e-½n®@±oW:&X¢a<&bbX~# }LWP41}k¬#3¨q#1f RQ@@:4@$", // 3 mario jump
" 40 q$!hWa-½n¦#_Y}a©,0#aaPw@=cmY<mq©GBagaq&@q#0§0t0¤ $", // 4 mario run
"+hP_@", // 5 pipe left
"¢,6< R¤", // 6 pipe right
"@ & ,'+hP?>³®'©}[!»¹.¢_^¥y/pX¸#µ°=a¾½hP?>³®'©}[!»¹.¢_^ Ba a", // 7 pipe top left
"@ , !] \"º £] , 8O #7a&+¢ §²!cº 9] P &O ,4 e", // 8 pipe top right
" £ #! ,! P!!vawd/XO¤8¼'¤P½»¹²'9¨ \"P²Pa²(!¢5!N*(4´b!Gk(a", // 9 goomba
" Xu X5 =ou!¯¬a[Z¼q.°u#|xv ¸··@=~^H'WOJ!¯¬a=Nu ²J <J a", // 10 coin // yui
"@ & !MX ~L \"y %P *¢ 5a K w !L \"y %P *a%¬¢ 4 a", // 11 ebox // yui
"¢ ,\"²+aN!@ &7 }\"²+aN!XH # }\"²+aN!X% 8}\"²+aN!X%£@ (", // 12 bricks
"} %¿¢!N° I¨²*<P%.8\"h,!Cg r¥ H³a4X¢*<P%.H#I¬ :a!u !q", // 13 block
makeSpace(20) + "4a }@ }0 N( w$ }\" N! +aa", // 14 bush left
" r \"²y!L%aN zPN NyN#²L}[/cy¾ N" + makeSpace(18) + "@", // 15 bush mid
makeSpace(18) + "++ !R·a!x6 &+6 87L ¢6 P+ 8+ (", // 16 bush right
" %©¦ +pq 7> \"³ s" + makeSpace(25) + "@", // 17 cloud bottom left
"a/a_#².Q¥'¥b}8.£¨7!X\"K+5cqs%(" + makeSpace(18) + "0", // 18 cloud bottom mid
"bP ¢L P+ 8%a,*a%§@ J" + makeSpace(22) + "(", // 19 cloud bottom right
"", // 20 mushroom
"", // koopa 16x24
"", // 22 star
"", // 23 flagpole
"", // 24 flag
"", // 25 flagpole top
" 6 ~ }a }@ }0 }( }$ }\" }! } a} @} 0} (} $} \"² $", // 26 hill slope
"a } \"m %8 *P!MF 5la\"y %P" + makeSpace(18) + "(", // 27 hill mid
makeSpace(30) + "%\" t!DK \"q", // 28 hill top
"", // 29 castle bricks
"", // 30 castle doorway bottom
"", // 31 castle doorway top
"", // 32 castle top
"", // 33 castle top 2
"", // 34 castle window right
"", // 35 castle window left
"", // 36 castle flag
makeSpace(19) + "8@# (9F*RSf.8 A¢$!¢040HD", // 37 goomba flat
" *(!¬#q³¡[_´Yp~¡=<¥g=&'PaS²¿ Sbq*<I#*£Ld%Ryd%¼½e8H8bf#0a", // 38 mario dead
" = ³ #b 'N¶ Z½Z Z½Z Z½Z Z½Z Z½Z Z½Z =[q ²@ ³ ¶ 0", // 39 coin step 1
" ?@ /q /e '¤ #³ !ºa }@ N0 ?( /e '¤ #³ ¿ _a \"", // 40 coin step 2
" / > ] º !² #¢ %a + > ] º !² #¢ 'a \"", // 41 coin step 3
" 7¢ +² *] %> \"p !Ga t¢ I² 4º *] %> \"p ¡ Oa \"" // 42 coin step 4
],
What does it do? If you want to look at the source file here it is:
http://www.nihilogic.dk/labs/mario/mario.js
Beware, there is more gibberish inside. I can't seem to make sense of any of it.
Thank you.