Simple Chess

Hello,

I’ve created pretty simple chess for Nibble, using my chess library/engine smallchesslib found here. Graphically it’s nothing impressive, just very simple interface. Of course everything is CC0, public domain.

chess

source code

Some features and limitation of this program:

  • Graphics is extremely simple.
  • All rules of chess are implemented, even the lesser known such as en passant etc. 50 move rule also applies. Draw via repetition is also implemented, but for simplicity only consecutive positions are considered.
  • Board is automatically rotated if the game thinks it should be rotated.
  • Each player can be either human or AI of strength 1 to 3. This can be changed any time during play.
  • Sometimes the stronger AI needs more time to compute the move and there is no indication of it working so it seems frozen, just wait :slight_smile:
  • On Nibble if two AIs play against each other, you have to press A after each move. This is basically for technical reasons and due to simplicity of SAF (basically if I let AIs just move as they wish there’s no “multithreading” and when AI is computing for a long time it delays a frame for very long and it messes up rendering so that you wouldn’t see the game unwind until it would end).
  • You can undo moves with C.
  • After the game ends the whole game is being repeatedly replayed in the background so that you can write it down.
  • There are also simple chess variant: chess 960 (Fisher random, but without castling), horde and knights vs knights.
4 Likes

Wow i saw this on the arduboy website aswell! :DD nicely done :smiley:

also… how can i castle?

Castling is done like in other chess games, you move the king next to the rook. Recently I found a bug that prevented castling sometimes, it’s fixed now, so if you have older source code do git pull.

@drummyfish,

Nicely done! Congrats! :slight_smile:

We’d like to share this on our social media if it’s okay with you! :slight_smile:

Feel free to send us a video of the game, like @Broskibble did the last time with Tetris.

Sincerely,
Monika from CircuitMess

Hmm… @Broskibble I think I recognize that name :expressionless:

Hello @community!
I’m wondering how to install it on my nibble. I’ve got the “chess.h” file, but got lost here.
Thanks for helping!

Hello all,
I’ve that folder “chess.zip” I have created, but I’m not able to compile it.
I’ve been through all the sites exploring how to do but I’m not successfull. May someone help me please ?
Thanks !
chess.zip (189.5 KB)

here, as drummyfish said

Sorry for being late, give me a minute, I’ll create a zip that can be directly compiled.

EDIT:

This you should only extract, open with Arduino IDE and compile (of course you have to set the Nibble board):

chess.zip (297.6 KB)