Nim 64

Published 2024-08-06


This is a creation of the game Nim for pico8. Nim is a 2 player, mathematical game of strategy (well sort of). It includes the following features:

Should be easy to follow - Turn based game so no rush.

Additionally the PICO-8 cart menu has the following:

The options menu is a little obscure. So I've included a quick run through here:

Change any item with left or right or (O) button

I started making this game because I was trying to work out AI for turn based games and wanted a simplified game to try this on and came across Nim. I'm sure I have seen it before but essentially rediscovered it.

I also used Nim to explore the Minmax algorithm for Turn Based games and - yeah - that was a bit of an effort BUT I did get it working and can now understand it reasonably well with the alpha/beta tuning and all. I did create a nice prototype to visualize and explain it to me better also which I may post. BUT anyway turns out MinMax is probably not the best for Nim - it might work with some different kind of approach and more optimization (caching, de-duplication) maybe but I could not get it to work well enough. For small numbers it would work well but large numbers would kill the poor pico8 8( But I did learn a lot 8)

So the AI in the game is a bit more brute force which is a lot simpler and will always win if it can. If it cant then it will generally pick random although it will try not to make it easy. The different levels (easy or medium) mean that the AI will make a random move if the numbers are too large for it. The Medium AI should provide a decent challenge during the campaign but once you get the idea of Nim I would switch to Perfect AI and treat the game more like a puzzle game.

I also wanted to make a game in the lowres mode that was a lot of fun. I enjoyed the larger pixels and getting things pixel perfect.

Another thing I really enjoyed was making a campaign of sorts - Something I have never created and it was really cool and I learnt a lot.

I enjoyed working out how to use the cartdata and a few technical things around using that data. This gave me a lot of ideas for other things to use it for.

Regrets:

v1 - release 2023-07-15
v2 - 2023-09-15