{"author_link":"\/users\/jezzamon","author_name":"Jezzamon","author_uid":1000095,"comments":[{"id":995874,"author_name":"godsboss","author_uid":"godsboss","epoch":1696334183,"text":"Nice take on the theme. The short version of the code does not work due to double backticks (\\`\\` instead of \\`).","format":"md","likes":2,"spam":"N"},{"id":1002975,"author_name":"LeReveur","author_uid":"lereveur","epoch":1696392278,"text":"Thanks to @godsboss I managed to play the game!  \n  \nI like the meta take of the theme, I remember very few entries of this kind over the numerous LDs I entered (notabily one in the url edit - a runner too - and another one in the page icon - wich I forgot the gameplay), but I think this is the first one I just had to copy-paste less than 300 chars in an editor in order to play it :smile:  \n  \nGood job!\n  \np.s.: you may have forgot to opt-out of Audio cat, unless you took the choice of considering silence as an appropriate sound for this kind of idea :joy:","format":"md","likes":2,"spam":"N"},{"id":1012123,"author_name":"alexrose","author_uid":"alexrose","epoch":1696542013,"text":"I'm missing something here. when I paste that code I get this:\n\n\"SyntaxError: missing ) after argument list\"","format":"md","likes":0,"spam":"N"},{"id":1012161,"author_name":"alexrose","author_uid":"alexrose","epoch":1696543028,"text":"nevermind saw the bottom link. I got a 382","format":"md","likes":1,"spam":"N"},{"id":1013968,"author_name":"Local Minimum","author_uid":"local-minimum","epoch":1696602224,"text":"Great interpretation of the theme! I don't think I've ever encountered a limited source code game in LD before. A lot of game-play in so few lines.","format":"md","likes":1,"spam":"N"},{"id":1016344,"author_name":"Wouter52","author_uid":"wouter52","epoch":1696681326,"text":"What a fun way to spend your jam! Your ideas are often very much \"out of the box\" :smile: I like how you have a commented version of your game. Did you make that first, and then condensed it into the tweet-sized code? \n\nOne thing I could not really figure out is why the game would start with 198 points for the score. I see why the code does it, I just don't get the choise :-)\n\nEdit: btw: your cover image is missing at the moment. Was that on purpose?","format":"md","likes":0,"spam":"N"},{"id":1021788,"author_name":"Jezzamon","author_uid":"jezzamon","epoch":1696996336,"text":"@godsboss Ah, in some markdown editors that escapes the backticks. Turns out it doesn't here. Fixed that! Thanks for the heads up","format":"md","likes":1,"spam":"N"},{"id":1021789,"author_name":"Jezzamon","author_uid":"jezzamon","epoch":1696996343,"text":"@lereveur Ha, good call I'll opt out of audio :)","format":"md","likes":0,"spam":"N"},{"id":1021792,"author_name":"Jezzamon","author_uid":"jezzamon","epoch":1696996551,"text":"@wouter52 Ah, was somewhat distracted when uploading my game, so I missed the cover image. Added, thanks!\n\nThe reason the score starts at a random number is because I was reusing an existing variable to make the score, and it would take more characters to make that start at 0 :) I potentially could've got rid of the #LDJam hashtag I suppose :P\n\nI started writing the game in JavaScript, as I would write it with if statements and regular functions and such, and then started making it smaller and cutting features. The game used to be on a circle, and whenever you landed more obstacles appeared, but those all took too many characters to fit. As I worked on it, I had a version that was not quite as split up as the commented version is, but it had newlines and indents to make things more readable.","format":"md","likes":0,"spam":"N"}],"format":"md","images":["ld54\/wayback-placeholder.png"],"links":[{"url":"https:\/\/twitter.com\/jezzamonn\/status\/1708604618463437077","text":"Link"},{"url":"https:\/\/editor.p5js.org\/jezzamon\/sketches\/-F314Rfwv","text":"Link"}],"metadata":{"g_key":"92351","g_author":"1000095","g_event":"LD54","g_eventkey":"117","g_subevent":"COMPO","g_urlkey":"436863","g_title":"geom dsh","g_status":"WAYBACK","g_place":"99999","g_commentcount":"9","g_site2_node_id":"378981","g_hide":"N","g_has_icon":"Y","g_rqueue":"0","g_random":"0"},"nds":{"n_key":"378981","n_urlkey":"436863","n_parent":"371459","n_path":"\/events\/ludum-dare\/54\/geom-dsh","n_slug":"geom-dsh","n_type":"item","n_subtype":"game","n_subsubtype":"compo","n_author":"95","n_created":"1696197337","n_modified":"1778854175","n_version":"1189920","n_status":"WAYBACK"},"node":{"_collation":{"body_sanitizer":"TextUtils::SanitizeHTML via existing importer","event":"LD54","removed_author":false},"_superparent":9,"_trust":12,"author":95,"body":"# geom dsh\n\n*An entire game fit within the limited space of a tweet!*\n\n![demo.gif](\/\/\/raw\/f5\/z\/5ccf3.gif)\n\n\n## Full game code:\n\n\n```\no=[0,3,7],h=b=f=0,s=2,setup=_=>createCanvas(400,400),draw=_=>{R=rect,f++,s+=.001,background(9),\nR(0,h,20),7<h&&(y-=.5,h+=y),(o).map(p=>{x=99*((p-s*f\/99)%6+5.9),R(x,0,20),9>h&&9>x&&(s=2,f=0)})\n,b>(c=s*99|0)||(b=c),fill(255),text(`#LDJam ${b} ${c}`,0,99)},keyPressed=_=>0<h||(y=8,h=8)\n```\n\n\nYou can paste that code into the [p5js editor](https:\/\/editor.p5js.org\/) to run the game.\n\n## Controls:\n\n- Press any key to jump\n- Die to restart\n\n## Documented code\n\nHere's the documented code. Had to use a lot of tricks and cut a lot to get the game under 280 characters.\n\n```\n\/\/ Initialize obstacle array.\no=[0,3,7],\n\/\/ Initialize height, best score and frame count.\nh=b=f=0,\n\/\/ Initialize speed.\ns=2,\n\/\/ Other variables like the current score and the vertical speed get initialized when they're first set.\n\n\/\/ Create the canvas for the game.\nsetup=_=>createCanvas(400,400),\ndraw=_=>{\n    \/\/ Alias function name that are used more than once.\n    R=rect,\n    \/\/ Update frame count\n    f++,\n    \/\/ Slowly increase speed.\n    s+=.001,\n    \/\/ Clear the canvas. 9 is a very dark grey instead of 0 (black) to be slightly different to black but effectively it's still black.\n    background(9),\n    \/\/ Draw the player.\n    R(0,h,20),\n    \/\/ If the player is in the air...\n    \/\/ 7 is the height of the cube just before we reach the ground,\n    \/\/ Which means the last time we run this, the player will be on the ground.\n    \/\/ This avoids code that checks if the player is touching the ground.\n    \/\/ Uses the short-circuit behavior of the && operator to acts as a branch statement.\n    7<h&&(\n        \/\/ Apply gravity to vertical speed.\n        y-=.5,\n        \/\/ Apply vertical speed to height\n        h+=y\n    ),\n    \/\/ For each obstacle. p is the position of the obstacle.\n    (o).map(p=>{\n        \/\/ Calculate the x position of the obstacle.\n        x=99*(\n            \/\/ An initial position that moves with the speed * frame count\n            (p-s*f\/99)\n            \/\/ This uses module to make the obstacles loop around the screen.\n            \/\/ It also abuses the way negative modulos work to make some obstacles appear later.\n            \/\/ Because we add 5.9 at the end, the x position will only be 0 when (p-s*f) is negative.\n            \/\/ So if we pick larger values for p, those obstacles will be delayed,\n            \/\/ so the game gets more difficult over time.\n            \/\/ These numbers are also picked so that obstacles loop just after they reach the end of the screen,\n            \/\/ so the collision check use less characters.\n            %6+5.9),\n        \/\/ Draw the obstacle\n        R(x,0,20),\n        \/\/ Check collsion:\n        \/\/ If `h < 9` (the player is roughly on the ground) and\n        \/\/ `x < 9` (the obstacle is near the player)\n        \/\/ The obstacle check can be one-sided because of how the obstacles loop.\n        9>h&&9>x&&\n            \/\/ Reset the game by resetting the speed and frame count.\n            (s=2,f=0)}\n    ),\n    \/\/ If the best score is less than the score\n    b>(\n        \/\/ Turn the speed into a score variable,\n        \/\/ multiplying to be a nicer number and converting to integer.\n        c=s*99|0\n    \/\/ Update the best score\n    )||(b=c),\n    \/\/ Text color to white\n    fill(255),\n    \/\/ Draw both the current score and the best one\n    text(`#LDJam ${b} ${c}`,0,99)\n},\n\/\/ Keyboard input: When any key is pressed...\nkeyPressed=_=>\n    \/\/ If the player is on the ground\n    0<h||(\n        \/\/ Set the verticle speed to the initial jumping speed\n        y=8,\n        \/\/ We also need to put the player above the 7<h check earlier\n        \/\/ which is used to see if they're jumping or not.\n        h=8\n    )\n```\n\nEnded up with enough space to fit the hashtag in there :)\n\n","comments":9,"comments-timestamp":"2023-10-11T03:56:10Z","created":"2023-10-01T21:55:37Z","files":[],"files-timestamp":0,"grade":{"grade-01":6,"grade-02":7,"grade-03":8,"grade-04":8,"grade-05":7,"grade-06":3,"grade-07":8,"grade-08":7},"id":378981,"love":0,"magic":{"cool":0,"feedback":0,"given":0,"grade":7.7142857142857,"grade-01-average":2.5,"grade-02-average":2.7,"grade-03-average":3.5,"grade-04-average":4.667,"grade-05-average":1.8,"grade-06-average":1,"grade-07-average":2.417,"grade-08-average":1.7,"smart":-66.124625705292},"meta":{"author":[95],"cover":"\/\/\/content\/f5\/z\/60272.png","grade-06-out":"1","link-01":"https:\/\/twitter.com\/jezzamonn\/status\/1708604618463437077","link-01-tag":[50],"link-02":"https:\/\/editor.p5js.org\/jezzamon\/sketches\/-F314Rfwv","link-02-tag":[42336]},"meta-timestamp":"2026-05-15T14:09:35Z","modified":"2026-05-15T14:09:35Z","name":"geom dsh","node-timestamp":"2023-10-11T03:41:26Z","parent":371459,"parents":[1,5,9,371459],"path":"\/events\/ludum-dare\/54\/geom-dsh","published":"2023-10-01T22:17:29Z","scope":"public","slug":"geom-dsh","subsubtype":"compo","subtype":"game","type":"item","version":1189920},"text":"# geom dsh\n\n*An entire game fit within the limited space of a tweet!*\n\n![demo.gif](\/\/\/raw\/f5\/z\/5ccf3.gif)\n\n\n## Full game code:\n\n\n```\no=[0,3,7],h=b=f=0,s=2,setup=_=>createCanvas(400,400),draw=_=>{R=rect,f++,s+=.001,background(9),\nR(0,h,20),7<h&&(y-=.5,h+=y),(o).map(p=>{x=99*((p-s*f\/99)%6+5.9),R(x,0,20),9>h&&9>x&&(s=2,f=0)})\n,b>(c=s*99|0)||(b=c),fill(255),text(`#LDJam ${b} ${c}`,0,99)},keyPressed=_=>0<h||(y=8,h=8)\n```\n\n\nYou can paste that code into the [p5js editor](https:\/\/editor.p5js.org\/) to run the game.\n\n## Controls:\n\n- Press any key to jump\n- Die to restart\n\n## Documented code\n\nHere's the documented code. Had to use a lot of tricks and cut a lot to get the game under 280 characters.\n\n```\n\/\/ Initialize obstacle array.\no=[0,3,7],\n\/\/ Initialize height, best score and frame count.\nh=b=f=0,\n\/\/ Initialize speed.\ns=2,\n\/\/ Other variables like the current score and the vertical speed get initialized when they're first set.\n\n\/\/ Create the canvas for the game.\nsetup=_=>createCanvas(400,400),\ndraw=_=>{\n    \/\/ Alias function name that are used more than once.\n    R=rect,\n    \/\/ Update frame count\n    f++,\n    \/\/ Slowly increase speed.\n    s+=.001,\n    \/\/ Clear the canvas. 9 is a very dark grey instead of 0 (black) to be slightly different to black but effectively it's still black.\n    background(9),\n    \/\/ Draw the player.\n    R(0,h,20),\n    \/\/ If the player is in the air...\n    \/\/ 7 is the height of the cube just before we reach the ground,\n    \/\/ Which means the last time we run this, the player will be on the ground.\n    \/\/ This avoids code that checks if the player is touching the ground.\n    \/\/ Uses the short-circuit behavior of the && operator to acts as a branch statement.\n    7<h&&(\n        \/\/ Apply gravity to vertical speed.\n        y-=.5,\n        \/\/ Apply vertical speed to height\n        h+=y\n    ),\n    \/\/ For each obstacle. p is the position of the obstacle.\n    (o).map(p=>{\n        \/\/ Calculate the x position of the obstacle.\n        x=99*(\n            \/\/ An initial position that moves with the speed * frame count\n            (p-s*f\/99)\n            \/\/ This uses module to make the obstacles loop around the screen.\n            \/\/ It also abuses the way negative modulos work to make some obstacles appear later.\n            \/\/ Because we add 5.9 at the end, the x position will only be 0 when (p-s*f) is negative.\n            \/\/ So if we pick larger values for p, those obstacles will be delayed,\n            \/\/ so the game gets more difficult over time.\n            \/\/ These numbers are also picked so that obstacles loop just after they reach the end of the screen,\n            \/\/ so the collision check use less characters.\n            %6+5.9),\n        \/\/ Draw the obstacle\n        R(x,0,20),\n        \/\/ Check collsion:\n        \/\/ If `h < 9` (the player is roughly on the ground) and\n        \/\/ `x < 9` (the obstacle is near the player)\n        \/\/ The obstacle check can be one-sided because of how the obstacles loop.\n        9>h&&9>x&&\n            \/\/ Reset the game by resetting the speed and frame count.\n            (s=2,f=0)}\n    ),\n    \/\/ If the best score is less than the score\n    b>(\n        \/\/ Turn the speed into a score variable,\n        \/\/ multiplying to be a nicer number and converting to integer.\n        c=s*99|0\n    \/\/ Update the best score\n    )||(b=c),\n    \/\/ Text color to white\n    fill(255),\n    \/\/ Draw both the current score and the best one\n    text(`#LDJam ${b} ${c}`,0,99)\n},\n\/\/ Keyboard input: When any key is pressed...\nkeyPressed=_=>\n    \/\/ If the player is on the ground\n    0<h||(\n        \/\/ Set the verticle speed to the initial jumping speed\n        y=8,\n        \/\/ We also need to put the player above the 7<h check earlier\n        \/\/ which is used to see if they're jumping or not.\n        h=8\n    )\n```\n\nEnded up with enough space to fit the hashtag in there :)\n\n","title":"geom dsh","wayback_recovered":true,"wayback_source":{"capture":{"original":"https:\/\/api-jam.ludumdare.com\/vx\/node2\/get\/378501+378502+378503+378504+378505+378506+378507+378508+378509+378510+378511+378512+378513+378514+378515+378516+378517+378518+378519+378520+378521+378522+378523+378524+378525+378526+378527+378528+378529+378530+378531+378532+378533+378534+378535+378536+378537+378538+378539+378540+378541+378542+378543+378544+378545+378546+378547+378548+378549+378550+378551+378552+378553+378554+378555+378556+378557+378558+378559+378560+378561+378562+378563+378564+378565+378566+378567+378568+378569+378570+378571+378572+378573+378574+378575+378576+378577+378578+378579+378580+378581+378582+378583+378584+378585+378586+378587+378588+378589+378590+378591+378592+378593+378594+378595+378596+378597+378598+378599+378600+378601+378602+378603+378604+378605+378606+378607+378608+378609+378610+378611+378612+378613+378614+378615+378616+378617+378618+378619+378620+378621+378622+378623+378624+378625+378626+378627+378628+378629+378630+378631+378632+378633+378634+378635+378636+378637+378638+378639+378640+378641+378642+378643+378644+378645+378646+378647+378648+378649+378650+378651+378652+378653+378654+378655+378656+378657+378658+378659+378660+378661+378662+378663+378664+378665+378666+378667+378668+378669+378670+378671+378672+378673+378674+378675+378676+378677+378678+378679+378680+378681+378682+378683+378684+378685+378686+378687+378688+378689+378690+378691+378692+378693+378694+378695+378696+378697+378698+378699+378700+378701+378702+378703+378704+378705+378706+378707+378708+378709+378710+378711+378712+378713+378714+378715+378716+378717+378718+378719+378720+378721+378722+378723+378724+378725+378726+378727+378728+378729+378730+378731+378732+378733+378734+378735+378736+378737+378738+378739+378740+378741+378742+378743+378744+378745+378746+378747+378748+378749+378750+378751+378752+378753+378754+378755+378756+378757+378758+378759+378760+378761+378762+378763+378764+378765+378766+378767+378768+378769+378770+378771+378772+378773+378774+378775+378776+378777+378778+378779+378780+378781+378782+378783+378784+378785+378786+378787+378788+378789+378790+378791+378792+378793+378794+378795+378796+378797+378798+378799+378800+378801+378802+378803+378804+378805+378806+378807+378808+378809+378810+378811+378812+378813+378814+378815+378816+378817+378818+378819+378820+378821+378822+378823+378824+378825+378826+378827+378828+378829+378830+378831+378832+378833+378834+378835+378836+378837+378838+378839+378840+378841+378842+378843+378844+378845+378846+378847+378848+378849+378850+378851+378852+378853+378854+378855+378856+378857+378858+378859+378860+378861+378862+378863+378864+378865+378866+378867+378868+378869+378870+378871+378872+378873+378874+378875+378876+378877+378878+378879+378880+378881+378882+378883+378884+378885+378886+378887+378888+378889+378890+378891+378892+378893+378894+378895+378896+378897+378898+378899+378900+378901+378902+378903+378904+378905+378906+378907+378908+378909+378910+378911+378912+378913+378914+378915+378916+378917+378918+378919+378920+378921+378922+378923+378924+378925+378926+378927+378928+378929+378930+378931+378932+378933+378934+378935+378936+378937+378938+378939+378940+378941+378942+378943+378944+378945+378946+378947+378948+378949+378950+378951+378952+378953+378954+378955+378956+378957+378958+378959+378960+378961+378962+378963+378964+378965+378966+378967+378968+378969+378970+378971+378972+378973+378974+378975+378976+378977+378978+378979+378980+378981+378982+378983+378984+378985+378986+378987+378988+378989+378990+378991+378992+378993+378994+378995+378996+378997+378998+378999+379000?authors&parents&superparent"},"object":"objects\/sha256\/e1\/e172b16de3e067f7fc37b5d6ad49902871c564b38d1c49a2711d2ba6628452bb","record":"shard-2\/json-live-urgent-v3\/records\/472f2b5b5da300ae962dd1b8fbce48406eae7749b418194386d1b0dbf7fb4e1f.json","sha256":"e172b16de3e067f7fc37b5d6ad49902871c564b38d1c49a2711d2ba6628452bb","source":"https","stored_at":1784022486}}