{"author_link":"\/users\/rogerw","author_name":"RogerW","author_uid":"rogerw","comments":[],"epoch":1696979706,"event":"LD54","format":"md","ldjam_node_id":382107,"likes":8,"metadata":{"p_key":"203854","p_author":"RogerW","p_authorkey":"1316076","p_urlkey":"438449","p_title":"Atrocious code I wrote for LD54","p_cat":"LDJam ","p_event":"LD54","p_time":"1696979706","p_likes":"8","p_comments":"0","p_status":"WAYBACK","us_key":"1316076","us_name":"RogerW","us_username":"rogerw","event_start":"1695945600","event_key":"117","event_name":"Ludum Dare 54"},"node":{"_collation":{"body_sanitizer":"TextUtils::SanitizeHTML via existing importer","event":"LD54","removed_author":false},"_superparent":371459,"_trust":1,"author":316076,"body":"![Unsquished Smallest.gif](\/\/\/raw\/ca2\/d4\/z\/60236.gif)\n\n&nbsp;For LD54, we made [Unsquished](https:\/\/ldjam.com\/events\/ludum-dare\/54\/unsquished), a 2-minute arcade rhythm-ish game where you punch the walls that are closing in on you! I learned Godot for this jam and wrote some pretty unmaintainable code. Find it all below:\n\n&nbsp;\n\nWe wanted to spawn spike traps at the player position, but add small random offset to not be completely determined. This random offset for x and y has a distribution equivalent to rolling 5 d41 dice that have faces from -20 to 20:\n![badcode1.png](\/\/\/raw\/ca2\/d4\/z\/6023c.png)\n\n&nbsp;\n\n\nFor spawning *special* trap formations right before beat drops in the song (the spawn time is 2 seconds):\n![badcode2.png](\/\/\/raw\/ca2\/d4\/z\/6023e.png)\n\n&nbsp;\n\nSpike trap warning blink and SFX before spawning (please don't cancel me):\n![badcode3.png](\/\/\/raw\/ca2\/d4\/z\/6023f.png)\n\n&nbsp;\n\nManually setting the z-index changes the metal walls\n![badcode4.png](\/\/\/raw\/ca2\/d4\/z\/60240.png)\n\nto spawn looking like this:\n![badcode4ex2 smaller.png](\/\/\/raw\/ca2\/d4\/z\/60246.png)\n\ninstead of this:\n![badcode4ex1.png](\/\/\/raw\/ca2\/d4\/z\/60244.png)\n\n&nbsp;\n\nThe entire leaderboard is in one text box!\n![badcode5.png](\/\/\/raw\/ca2\/d4\/z\/60241.png)\n\n![badcode5ex.png](\/\/\/raw\/ca2\/d4\/z\/60242.png)\n\n&nbsp;\n\nSee the source code for yourself here: [https:\/\/github.com\/Compsciler\/Unsquished](https:\/\/github.com\/Compsciler\/Unsquished)\n","comments":4,"comments-timestamp":"2023-10-11T07:41:20Z","created":"2023-10-10T22:23:47Z","files":[],"files-timestamp":0,"id":382107,"love":8,"love-timestamp":"2023-10-11T16:08:16Z","meta":[],"modified":"2023-10-11T16:08:16Z","name":"Atrocious code I wrote for LD54","node-timestamp":"2023-10-10T23:15:38Z","parent":371794,"parents":[1,5,9,371459,371794],"path":"\/events\/ludum-dare\/54\/unsquished\/atrocious-code-i-wrote-for-ld54","published":"2023-10-10T23:15:06Z","scope":"public","slug":"atrocious-code-i-wrote-for-ld54","subsubtype":"","subtype":"","type":"post","version":1189832},"node_metadata":{"n_key":"382107","n_urlkey":"438449","n_parent":"371794","n_path":"\/events\/ludum-dare\/54\/unsquished\/atrocious-code-i-wrote-for-ld54","n_slug":"atrocious-code-i-wrote-for-ld54","n_type":"post","n_subtype":"","n_subsubtype":"","n_author":"316076","n_created":"1696976627","n_modified":"1697040496","n_version":"1189832","n_status":"WAYBACK"},"source_url":"https:\/\/ldjam.com\/events\/ludum-dare\/54\/unsquished\/atrocious-code-i-wrote-for-ld54","text":"![Unsquished Smallest.gif](\/\/\/raw\/ca2\/d4\/z\/60236.gif)\n\n&nbsp;For LD54, we made [Unsquished](https:\/\/ldjam.com\/events\/ludum-dare\/54\/unsquished), a 2-minute arcade rhythm-ish game where you punch the walls that are closing in on you! I learned Godot for this jam and wrote some pretty unmaintainable code. Find it all below:\n\n&nbsp;\n\nWe wanted to spawn spike traps at the player position, but add small random offset to not be completely determined. This random offset for x and y has a distribution equivalent to rolling 5 d41 dice that have faces from -20 to 20:\n![badcode1.png](\/\/\/raw\/ca2\/d4\/z\/6023c.png)\n\n&nbsp;\n\n\nFor spawning *special* trap formations right before beat drops in the song (the spawn time is 2 seconds):\n![badcode2.png](\/\/\/raw\/ca2\/d4\/z\/6023e.png)\n\n&nbsp;\n\nSpike trap warning blink and SFX before spawning (please don't cancel me):\n![badcode3.png](\/\/\/raw\/ca2\/d4\/z\/6023f.png)\n\n&nbsp;\n\nManually setting the z-index changes the metal walls\n![badcode4.png](\/\/\/raw\/ca2\/d4\/z\/60240.png)\n\nto spawn looking like this:\n![badcode4ex2 smaller.png](\/\/\/raw\/ca2\/d4\/z\/60246.png)\n\ninstead of this:\n![badcode4ex1.png](\/\/\/raw\/ca2\/d4\/z\/60244.png)\n\n&nbsp;\n\nThe entire leaderboard is in one text box!\n![badcode5.png](\/\/\/raw\/ca2\/d4\/z\/60241.png)\n\n![badcode5ex.png](\/\/\/raw\/ca2\/d4\/z\/60242.png)\n\n&nbsp;\n\nSee the source code for yourself here: [https:\/\/github.com\/Compsciler\/Unsquished](https:\/\/github.com\/Compsciler\/Unsquished)\n","title":"Atrocious code I wrote for LD54","wayback_source":[]}