I've just been hurrying to finish a passable first version of my chess game I'm doing as a challenge with Rutin. After a quick flurry of activity on the user interface and the rules, I tried to make some vaguely sensible recursive tree searching AI. It was interesting, and involved a lot more debugging than I originally intended. It was quite slow, play for a bit, discover it doing something wrong, isolate a case and fix. It became clear that chess engines are things that people spend years working on .. but I'm happy to have a pretty stupid AI.
Doing it all in gdscript was quite a challenge too, normally I'd do vaguely compex stuff in c++. But it is all possible in gdscript, just slower runtime than c++ (like 100x lol) and more tricky to debug.
Anyway to prevent the calculation times becoming stupid this version is limited to how difficult you can set it. It plays a passable game (cough!), and I've tried to include most end conditions. En passant and castling are mostly working, however there's no exchanging pawns, I might put that in at a later date.
There's obviously a load I can do to make it look better too, a skybox and different camera views, better pieces and it would be nice to have a timer for the AI to give some indication how close it is to completing. But not necessary for a first release.
Anyway if this works roughly for anyone else who tries it I'll move onto the next official gamedev challenge, the side scrolling shooter (with no guns!).
Download from my project page here: