Jump to content
  • Advertisement

Project: Game of Chess

Chess challenge - first alpha



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:


Recommended Comments

Great work! I gave it a play and all the pieces are moving well. The check system seems a bit wonky for me though. I even finished a game where I took all the pieces but their last Bishop and the game ended there.

I also tried a quick checkmate move with the lowest setting and I'm unable to capture the king (checkmate). Unless my chess is really bad this should be a checkmate, but I wasn't able to click the King and was forced to click another piece losing my Queen.






This should now be checkmate I believe... King cannot take my Queen due to my Bishop at C4.


If I decide to do nothing at this stage I can move all my pieces non-stop without Player 2 taking a turn.


If I decide to move my queen now it will resume:



Share this comment

Link to comment

Posted (edited)

Great thanks for trying it Rutin!! There are still loads of bugs I went from almost entirely unplayable yesterday morning to releasing it. I'll try and examine these ones.

Yes the bit for recognising the end game conditions (especially check mate) is a bit dodgy, I will try and fix this! :)

I also want to change the colouring to changing the square underneath the marked pieces so you can still easily make out which is black and white.

Edited by lawnjelly

Share this comment

Link to comment

Great! :) I cannot wait to see your next release. Also looking forward to seeing what you come up with for the challenge. Keep up the great work!

Share this comment

Link to comment

Ok there is a new version (0.11) it should now recognise checkmate, it does a test after each move (AI or player) to look for check or checkmate conditions. There is also now a display of the AI doing its calculations which also helps indicate when it is thinking. There is also a fallback version I made for GoliathForge with lower hardware requirements (only use this if main version does not run). :) 

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!