Hacker News new | ask | show | jobs
by cpojer 1374 days ago
This is a great post, thank you for writing it. I got into programming 20 years ago because I wanted to make games, and I spent my teenage years in the 2000s building web games. As a high school project I spent a year building a turn-based strategy web game (https://twitter.com/cpojer/status/1460221157634830337).

I have recently gotten back into it to explore things I never got a chance to do before like building an AI and fog-of-war. Currently the game is inspired by Advance Wars, and you can see me play against my AI here: https://m.youtube.com/watch?v=bGeEeti22bM

I’m tweeting about the technical details and progress on Twitter:

* Basic explanation and code examples: https://twitter.com/cpojer/status/1460221157634830337

* Map Editor: https://twitter.com/cpojer/status/1488510688389566464

* Fog of War: https://twitter.com/cpojer/status/1547967785015189504

* Testing Infrastructure: https://twitter.com/cpojer/status/1538299796334686208

* Random Map Generator: https://twitter.com/cpojer/status/1537444893580136454

I’m currently working on the game design to make it “inspired by Advance Wars” instead of just a clone.

2 comments

Advance Wars is an absolute dream to clone. I had that itch too, and made a full clone with story mode in PICO-8 a couple years ago.

The challenge there was that PICO-8 has infuriating arbitrary restrictions on code size to limit the developers for fun lol. To get around that, I have code that swaps serialized memory between virtual "cartridges" in order to fit everything in.

Sadly that limits the game from distribution on the official PICO-8 network "Splore", because those games must be single-cartridge only, so I have a stripped down version without a campaign that is uploaded there.

The AI was by far the funnest to implement. Getting enemy ranged units to retreat correctly when they were in range of attack was such an awesome feeling. It really led me down a rabbit hole of making games primarily so that I could code fun AI

You can play in your browser here: https://lambdanaut.itch.io/picowars

FYI I love playing this
Wow thats really cool! I love Advance Wars!