{"author_link":"\/users\/nikor","author_name":"nikor","author_uid":1191166,"comments":[{"id":1091726,"author_name":"victor_reiner","author_uid":"victor-reiner","epoch":1728402620,"text":"This must have been really hard to program, right? It took me a while to figure it out, but it was a lot of fun afterwards!","format":"md","likes":1,"spam":"N"},{"id":1091778,"author_name":"yodoG","author_uid":"yodog","epoch":1728402969,"text":"Having no experience with JS, I actually had quite a bit of fun trying to figure this out. I managed to get through level 4. Level 5 stumped me, but I bet I can figure it out with some time. There are a few typos in your text, and I would have loved to see more visuals, but the simplicity of the graphics was charming. Nice work.","format":"md","likes":1,"spam":"N"},{"id":1092584,"author_name":"Guiik","author_uid":"guiik","epoch":1728408022,"text":"Love the concept, very fun ! You should spell check your text though :grimacing: ","format":"md","likes":1,"spam":"N"},{"id":1111874,"author_name":"nikor","author_uid":"nikor","epoch":1728849819,"text":"@victor-reiner Yeah the programming a bit to long, so the rest had to suffer. ","format":"md","likes":0,"spam":"N"},{"id":1111876,"author_name":"Utopia","author_uid":"utopia","epoch":1728849864,"text":"I have the same idea at first glance of the topic lmao. You did a great job making this.","format":"md","likes":1,"spam":"N"},{"id":1111877,"author_name":"nikor","author_uid":"nikor","epoch":1728849919,"text":"@yodog I'm glad you had fun! And yeah I messed up my time table so the levels was made last minute :)","format":"md","likes":0,"spam":"N"},{"id":1111878,"author_name":"nikor","author_uid":"nikor","epoch":1728849953,"text":"@guiik Thank you! I will do better with the spelling next time :)","format":"md","likes":0,"spam":"N"},{"id":1111926,"author_name":"nikor","author_uid":"nikor","epoch":1728852452,"text":"@utopia Thank you :)","format":"md","likes":0,"spam":"N"},{"id":1111927,"author_name":"Scrumblob","author_uid":"scrumblob","epoch":1728852459,"text":"I'm a Javascript noob, but I enjoyed this game!  I couldn't beat level 5, but overall one of my favorite games this jam.  Reminds me of Bitburner","format":"md","likes":1,"spam":"N"},{"id":1112001,"author_name":"Gilgadev","author_uid":"gilgadev","epoch":1728856073,"text":"Really enjoyed the game! Very fun to see what is possible with the simplest graphics. Must have been crazy hard to code, though.\n\nGreat Job!","format":"md","likes":1,"spam":"N"},{"id":1112194,"author_name":"atmospherium","author_uid":"atmospherium","epoch":1728869746,"text":"I love seeing entries like this in Ludum Dare where there's a ton of ambition that wasn't able to be fully realized. There's a lot of complexity in getting these systems to work right, so I'm thoroughly impressed in how complete you DID make the game. I beat each of the individual levels (I think I used an unintended strat for the last one, but I'm fine with it). Great work.","format":"md","likes":2,"spam":"N"},{"id":1112211,"author_name":"ratly","author_uid":"ratly","epoch":1728872925,"text":"Cool idea, this must have been tough to make. This would be a fun way to teach programming.","format":"md","likes":1,"spam":"N"},{"id":1112368,"author_name":"Soul Grinder","author_uid":"soul-grinder","epoch":1728893272,"text":"I've never tried JavaScript before this, just C#, C++ and a bit of BASIC but this was fun and refreshing to see this type of game on a game jam.  The only thing I would change is I'd add some graphics and sound to give it more character and atmosphere.  Nice work, hope I see more games like this in future jams.","format":"md","likes":1,"spam":"N"},{"id":1112775,"author_name":"Tharinda Kodikara","author_uid":"tharinda-kodikara","epoch":1728917103,"text":"Innovative idea ","format":"md","likes":1,"spam":"N"},{"id":1113542,"author_name":"Radjax","author_uid":"radjax","epoch":1728968479,"text":"Super awesome idea! I loved tinkering with the different levels to figure out the way through, and I've always wanted to do a javascript game in the vein of screeps. Very well designed and well explained, loved it!","format":"md","likes":1,"spam":"N"},{"id":1114321,"author_name":"zubspace","author_uid":"zubspace","epoch":1729026090,"text":"I like the concept and how you introduce more and more mechanics up to level 5. Really cool!\n\nBut the jump from level 5 to Free Play feels huge. First I thought, I'm clever and just transition through the level like this:\n```\n(mind, sense) => {\n    if (mind == undefined) {\n        mind = [\"up\", 0];\n\n        for (var i = 0; i < sense.stop.friends.length; i++) {\n            sense.stop.friends[i] = [\"up\", (i+1) * 2]; }\n    }\n\n    let dir = mind[0];\n\n    if (mind[1] > 0) {\n        mind[1] -= 1;\n        return [dir, true, mind];\n    }\n\n    if (dir == \"up\") {\n        dir = \"right\";\n    } else {\n        dir = \"up\";\n        mind[1] = 1;\n    }\n    \n    mind[0] = dir;\n    \n    return [dir, true, mind];\n}\n```\n\nBut that doesn't work, because you actually need to pickup food and bring it back to the base to increase your ant army!\n\nSo after lots of trial and error, I managed to come up with this:\n```\n(mind, sense) => {\n    if (mind == undefined) {\n        mind = [false, 0, 0];\n\n        for (var i = 0; i < sense.stop.friends.length; i++) {\n            if (sense.stop.friends[i] == undefined) { sense.stop.friends[i] = [false, 0, 0]; } }\n    }\n\t\n    let dir = '';\n    if (mind[0] == true) {\n\t\tif (mind[1] == 0 && mind[2] == 0) {\n\t\t\tmind[0] = false;\n\t\t} else if (mind[1] > 0) {\n\t\t\tdir = 'left';\n\t\t\tmind[1] -= 1;\n\t\t} else if (mind[1] < 0) {\n\t\t\tdir = 'right';\n\t\t\tmind[1] += 1;\n\t\t} else if (mind[2] > 0) {\n\t\t\tdir = 'down';\n\t\t\tmind[2] -= 1;\n\t\t} else if (mind[2] < 0) {\n\t\t\tdir = 'up';\n\t\t\tmind[2] += 1;\n\t\t}\n    }\n\t\n    if (dir == '') {\n\t\tif (sense.up.enemies > 0) {\n\t\t\tdir = 'up';\n\t\t\tmind[2] += 1;\n\t\t} else if (sense.down.enemies > 0) {\n\t\t\tdir = 'down';\n\t\t\tmind[2] -= 1;\n\t\t} else if (sense.left.enemies > 0) {\n\t\t\tdir = 'left';\n\t\t\tmind[1] -= 1;\n\t\t} else if (sense.right.enemies > 0) {\n\t\t\tdir = 'right';\n\t\t\tmind[1] += 1;\n\t\t} else if (sense.up.food > 0) {\n\t\t\tdir = 'up';\n\t\t\tmind[0] = true;\n            mind[2] += 1;\n\t\t} else if (sense.down.food > 0) {\n\t\t\tdir = 'down';\n\t\t\tmind[0] = true;\n            mind[2] -= 1;\n\t\t} else if (sense.left.food > 0) {\n\t\t\tdir = 'left';\n\t\t\tmind[0] = true;\n            mind[1] -= 1;\n\t\t} else if (sense.right.food > 0) {\n\t\t\tdir = 'right';\n\t\t\tmind[0] = true;\n            mind[1] += 1;\n\t\t} else {\n\t\t\tlet rnd = Math.random();\n\t\t\tif (rnd < 0.25) {\n\t\t\t\tdir = 'up';\n\t\t\t\tmind[2] += 1;\n\t\t\t} else if (rnd < 0.5) {\n\t\t\t\tdir = 'right';\n\t\t\t\tmind[1] += 1;\n\t\t\t} else if (rnd < 0.75) {\n\t\t\t\tdir = 'down';\n\t\t\t\tmind[2] -= 1;\n\t\t\t} else {\n\t\t\t\tdir = 'left';\n\t\t\t\tmind[1] -= 1;\n\t\t\t}\n\t\t}\n    }\n\t\n    return [dir, true, mind];\n}\n```\n\nThe mind store 3 components in an array:\n* mind[0] is a bool, which says if the ant currently has food\n* mind[1] contains the x-offset to base (right of base is positive)\n* mind[2] contains the y-offset to base (up of base is positive)\n\nAs soon as the ant finds some food it will return to the base immediately.\n\nIt takes ages to run the simulation, but I think, that the algorithm should work quite well in the long run. Here's how my army looks like after 5 minutes in \"mostly random\" mode:\n\n![Ant.png](\/\/\/raw\/037\/22\/z\/68df4.png)\n\nBut maybe there are other tricks to optimize it?\n\nAnyway... Had lots of fun!","format":"md","likes":1,"spam":"N"},{"id":1114369,"author_name":"Turquoise Moon","author_uid":"turquoise-moon","epoch":1729027960,"text":"I really enjoyed this! It was a fun idea! I wish there was a grid though. It was hard to tell how many spaces an ant should move in the earlier levels. ","format":"md","likes":1,"spam":"N"},{"id":1115273,"author_name":"Weird Orb","author_uid":"weird-orb","epoch":1729133959,"text":"I love that this is almost educational and lets people experiment with JS a bit, a really interesting game!","format":"md","likes":1,"spam":"N"}],"format":"md","images":["ld56\/wayback-placeholder.png"],"links":[{"url":"http:\/\/nikor.dk:5000\/","text":"Link"}],"metadata":{"g_key":"96274","g_author":"1191166","g_event":"LD56","g_eventkey":"115","g_subevent":"JAM","g_urlkey":"446198","g_title":"Ant war!","g_status":"WAYBACK","g_place":"664","g_commentcount":"18","g_site2_node_id":"403584","g_hide":"N","g_has_icon":"Y","g_rqueue":"0","g_random":"0"},"nds":{"n_key":"403584","n_urlkey":"446198","n_parent":"395186","n_path":"\/events\/ludum-dare\/56\/ant-war","n_slug":"ant-war","n_type":"item","n_subtype":"game","n_subsubtype":"jam","n_author":"191166","n_created":"1728306079","n_modified":"1777492988","n_version":"1262329","n_status":"WAYBACK"},"node":{"_collation":{"body_sanitizer":"TextUtils::SanitizeHTML via existing importer","event":"LD56","removed_author":false},"_superparent":9,"_trust":1,"author":191166,"body":"Welcome to Ant war!\n\nThe idea was to make a programming game in the style of zachtronics games.\n\nThis is how far i got on the journey that is the lack of scope control :)","comments":18,"comments-timestamp":"2024-10-17T02:59:19Z","created":"2024-10-07T13:01:19Z","files":[],"files-timestamp":0,"grade":{"grade-01":23,"grade-02":23,"grade-03":23,"grade-04":23,"grade-05":23,"grade-06":17,"grade-07":21,"grade-08":22},"id":403584,"love":0,"magic":{"cool":70.072673994351,"feedback":20,"given":10.25,"grade":21.875,"grade-01-average":3.429,"grade-01-result":664,"grade-02-average":3.286,"grade-02-result":636,"grade-03-average":4.286,"grade-03-result":19,"grade-04-average":3.952,"grade-04-result":298,"grade-05-average":1.929,"grade-05-result":964,"grade-06-average":1.2,"grade-06-result":680,"grade-07-average":2.763,"grade-07-result":685,"grade-08-average":2.875,"grade-08-result":962,"smart":-4.8670439352958},"meta":{"allow-anonymous-comments":"1","author":[191166],"link-01":"http:\/\/nikor.dk:5000\/","link-01-tag":[42336]},"meta-timestamp":"2026-04-29T20:03:08Z","modified":"2026-04-29T20:03:08Z","name":"Ant war!","node-timestamp":"2024-10-07T21:34:24Z","parent":395186,"parents":[1,5,9,395186],"path":"\/events\/ludum-dare\/56\/ant-war","published":"2024-10-07T21:34:24Z","scope":"public","slug":"ant-war","subsubtype":"jam","subtype":"game","type":"item","version":1262329},"text":"Welcome to Ant war!\n\nThe idea was to make a programming game in the style of zachtronics games.\n\nThis is how far i got on the journey that is the lack of scope control :)","title":"Ant war!","wayback_recovered":true,"wayback_source":{"capture":{"original":"https:\/\/api-jam.ludumdare.com\/vx\/node2\/get\/403501+403502+403503+403504+403505+403506+403507+403508+403509+403510+403511+403512+403513+403514+403515+403516+403517+403518+403519+403520+403521+403522+403523+403524+403525+403526+403527+403528+403529+403530+403531+403532+403533+403534+403535+403536+403537+403538+403539+403540+403541+403542+403543+403544+403545+403546+403547+403548+403549+403550+403551+403552+403553+403554+403555+403556+403557+403558+403559+403560+403561+403562+403563+403564+403565+403566+403567+403568+403569+403570+403571+403572+403573+403574+403575+403576+403577+403578+403579+403580+403581+403582+403583+403584+403585+403586+403587+403588+403589+403590+403591+403592+403593+403594+403595+403596+403597+403598+403599+403600+403601+403602+403603+403604+403605+403606+403607+403608+403609+403610+403611+403612+403613+403614+403615+403616+403617+403618+403619+403620+403621+403622+403623+403624+403625+403626+403627+403628+403629+403630+403631+403632+403633+403634+403635+403636+403637+403638+403639+403640+403641+403642+403643+403644+403645+403646+403647+403648+403649+403650+403651+403652+403653+403654+403655+403656+403657+403658+403659+403660+403661+403662+403663+403664+403665+403666+403667+403668+403669+403670+403671+403672+403673+403674+403675+403676+403677+403678+403679+403680+403681+403682+403683+403684+403685+403686+403687+403688+403689+403690+403691+403692+403693+403694+403695+403696+403697+403698+403699+403700+403701+403702+403703+403704+403705+403706+403707+403708+403709+403710+403711+403712+403713+403714+403715+403716+403717+403718+403719+403720+403721+403722+403723+403724+403725+403726+403727+403728+403729+403730+403731+403732+403733+403734+403735+403736+403737+403738+403739+403740+403741+403742+403743+403744+403745+403746+403747+403748+403749+403750+403751+403752+403753+403754+403755+403756+403757+403758+403759+403760+403761+403762+403763+403764+403765+403766+403767+403768+403769+403770+403771+403772+403773+403774+403775+403776+403777+403778+403779+403780+403781+403782+403783+403784+403785+403786+403787+403788+403789+403790+403791+403792+403793+403794+403795+403796+403797+403798+403799+403800+403801+403802+403803+403804+403805+403806+403807+403808+403809+403810+403811+403812+403813+403814+403815+403816+403817+403818+403819+403820+403821+403822+403823+403824+403825+403826+403827+403828+403829+403830+403831+403832+403833+403834+403835+403836+403837+403838+403839+403840+403841+403842+403843+403844+403845+403846+403847+403848+403849+403850+403851+403852+403853+403854+403855+403856+403857+403858+403859+403860+403861+403862+403863+403864+403865+403866+403867+403868+403869+403870+403871+403872+403873+403874+403875+403876+403877+403878+403879+403880+403881+403882+403883+403884+403885+403886+403887+403888+403889+403890+403891+403892+403893+403894+403895+403896+403897+403898+403899+403900+403901+403902+403903+403904+403905+403906+403907+403908+403909+403910+403911+403912+403913+403914+403915+403916+403917+403918+403919+403920+403921+403922+403923+403924+403925+403926+403927+403928+403929+403930+403931+403932+403933+403934+403935+403936+403937+403938+403939+403940+403941+403942+403943+403944+403945+403946+403947+403948+403949+403950+403951+403952+403953+403954+403955+403956+403957+403958+403959+403960+403961+403962+403963+403964+403965+403966+403967+403968+403969+403970+403971+403972+403973+403974+403975+403976+403977+403978+403979+403980+403981+403982+403983+403984+403985+403986+403987+403988+403989+403990+403991+403992+403993+403994+403995+403996+403997+403998+403999+404000?authors&parents&superparent"},"object":"objects\/sha256\/f2\/f2612472cd0e820d4cee6811094aa0c2833d5ea7d55276c539947fdb08fe3493","record":"shard-1\/json-live-urgent-v3\/records\/76dbd2b4f465244d8d7ab767e0ec4c4bff43f7a2248783fce44218b24e117706.json","sha256":"f2612472cd0e820d4cee6811094aa0c2833d5ea7d55276c539947fdb08fe3493","source":"https","stored_at":1784022548}}