Happy Jump 🙂

Game made in less than 500 characters for TweetTweetJam 8 🍒

Welcome to Happy Jump, the addictive game where you must avoid the knives and collect the cherries. The objective of the game is to keep jumping and avoiding the knives as long as possible.

To move left, simply press the "a" key using lowercase. To move right, press any other key. Collect as many cherries as you can to increase your score. But watch out for the knives that will try to stop you in your tracks.

The game is infinite, so you can keep playing until you achieve your high score. Do you have what it takes to be the ultimate Happy Jumper?

This description was generated by an AI because I was out of creativity. 😅

* To be able to move it is necessary that the game canvas has focus.

The original code was 618 characters long, but I used a trick that combines two characters into one, turning them into Chinese/Japanese characters. In this way, I reduced the size by half (309 characters), however I had to include a function to transform it back to JS, totaling 494 characters (or 497 depending on the program used to calculate it). I hope this is not considered cheating. 😁

Original code:

<script>onload=()=>{X='px';T='innerText';D=document;B=D.body;M=Math;A=M.abs;N=M.random;S=e=>e.style;C=(e,t)=>{B.appendChild(d=D.createElement('h1'));d[T]=e;return t={d:d,s:S(d),x:0,y:0,z:0,t:0,u:(k)=>{with(t){s.position='fixed';s.top=(y+=t)+X;s.left=(x+=z)+X;x>500&&(x=-20,k&&(y=k()*110,z=k()*9+1));x<-20&&(x=500)}},l:()=>(t.t+=.5)&&t.y>150&&(t.t=-12)&&(t.y=150),v:(o)=>A(t.x-o.x)+A(t.y-o.y)<40,a:()=>t.d[T]++,p:()=>t.d[T]=0}};W=C('🍒');P=C('🙂');F=C('🔪');R=C(0);F.z=3;B.onkeydown=(e)=>P.z=e.key=='a'?-9:9;B.onkeyup=()=>P.z=0;setInterval('with(P){l();u();v(W)&&R.a()&&(W.x=N()*450)&&(W.y=N()*110);v(F)&&R.p()}W.u();F.u(N)',16)}</script>

494 characters code:

<script>$='湯潬摡⠽㴩笾㵘瀧❸吻✽湩敮呲硥❴䐻搽捯浵湥㭴㵂⹄潢祤䴻䴽瑡㭨㵁⹍扡㭳㵎⹍慲摮浯医攽㸽⹥瑳汹㭥㵃攨琬㴩笾⹂灡数摮桃汩⡤㵤⹄牣慥整汅浥湥⡴栧✱⤩搻呛㵝㭥敲畴湲琠笽㩤Ɽ㩳⡓⥤砬〺礬〺稬〺琬〺甬⠺⥫㸽睻瑩⡨⥴獻瀮獯瑩潩㵮昧硩摥㬧⹳潴㵰礨㴫⥴堫猻氮晥㵴砨㴫⥺堫砻㔾〰☦砨ⴽ〲欬☦礨欽⤨ㄪ〱稬欽⤨㤪ㄫ⤩砻ⴼ〲☦砨㔽〰紩ⱽ㩬⤨㸽琨琮㴫㔮☩琦礮ㄾ〵☦琨琮ⴽ㈱☩⠦⹴㵹㔱⤰瘬⠺⥯㸽⡁⹴⵸⹯⥸䄫琨礮漭礮㰩〴愬⠺㴩琾搮呛⭝Ⱛ㩰⤨㸽⹴孤嵔〽絽圻䌽✨❀㬩㵐⡃⌧⤧䘻䌽✨✤㬩㵒⡃⤰䘻種㌽䈻漮歮祥潤湷⠽⥥㸽⹐㵺⹥敫㵹✽❡ⴿ㨹㬹⹂湯敫畹㵰⤨㸽⹐㵺㬰敳䥴瑮牥慶⡬眧瑩⡨⥐汻⤨画⤨瘻在☩刦愮⤨☦在砮丽⤨㐪〵☩⠦⹗㵹⡎⨩ㄱ⤰瘻䘨☩刦瀮⤨坽甮⤨䘻甮丨✩ㄬ⤶⁽';C=[];F=String.fromCharCode;R=(h)=>h=='@'?'🍒':h=='#'?'🙂':h=='$'?'🔪':h;for(i=0;i<309;)c=$.charCodeAt(i++),C[i*2]=R(F(c&255)),C[i*2+1]=R(F(c>>8&255));eval(C.join(''))</script>

Comments

Log in with itch.io to leave a comment.

It seems so impossible that this game is raw text and doesn't use a canvas element.  And the Chinese translation trick must have taken so much trial and error! I am totally blown away by this! Well done!

Your game is very good. I liked the control and I liked the idea of the game. It's great that this game was made in less than 500 characters.