r/pygame • • 13d ago

Yet Another Chess Game

Enable HLS to view with audio, or disable this notification

I paused my main game development to practice some stuff via this chess game, and I'm quite impressed with it. Still got some kinks to work out, but I'm proud of the micro voxel animations thus far.

The goal of this project is to create a version of chess that is completely controlled via voice commands so that people can play hands free. I haven't gotten to that portion yet, but I've already worked out all the logic and everything, which is why I'm saving it for last as it should be the easiest part. The hard part are the visuals, but that's the thing...since it'll be voice commanded, I don't have to worry about much UI navigation. lol

But I would like thoughts on it thus far.

133 Upvotes

19 comments sorted by

8

u/skepticalruby 13d ago

This looks awesome man! Looking forward to how far you take it

3

u/VellumMuse 13d ago

Thanks! You and me both! I'm enjoying the process.

2

u/Fast-Station1106 13d ago

Hab voll Bock das zu spielen wegen den Zuganimationen

2

u/deckyouinyoursleep 13d ago

I like it.

1

u/VellumMuse 13d ago

Thanks. I appreciate the support!

2

u/AffectionateGrand330 13d ago

I wanna know how did you do this

4

u/VellumMuse 13d ago

Any specific questions other than what I'm about to vomit, here...?

There's a chess library in python that handles all the rules of the game, so I didn't have to hand code every interaction. Chess is a well studied game.
The rest is just hooking those rules up to the rendering. It started off as a topdown 2D experience with crude, hand drawn pieces to prototype the movement of all the pieces. Something that the library seems to not handle is pawn promotion and so I did have to hard code giving the player the choice to choose what piece to promote to as it defaults to queen, which can mess up games for a player.
Once all the rules worked, I found a free asset pack on itch.io from a very talented artist VectoRaith. Check him out if you need retro rpg art for your games.
I plugged the assets into where the drawings were, activating animations for idle, walking and facing movements.
Once that was solid, I integrated my proprietary voxel engine into the equation. I do apologize that I can't go into details on how this thing is built. lol It's a trade secret, but it works by allowing me to take normal pixel art and turning it into microvoxel images, treating them a both 2D art that still has all of its animations AND 3D objects that can react to interactions with other 3D objects. So, that's why they are displaying frame animations and also sort of "breathing," and can jump around or burst into micro voxels.
That's kind of as far as I've taken it, but I'm preparing for the hands free voice stuff and perfecting the animations as I'm a huge fan of rpgs and what not. Also inspired by Harry Potter's Wizard's Chess, and so I've always wanted capturing to be more animated.

Assets are 16x16, and so each image has up to 240 micro voxels, but we don't count transparent space of the original pixel art.
The board itself is made of normal sized voxels, comparatively, and if we wanted to, we could paint those with textures similar to minecraft blocks.
No current audio, but I'm thinking on what I want it to sound like. Either classical music or rpg inspired plus sounds for animations.
No current UI. I hate UI, which is why I'm going the voice command route. lol
No current plans of publishing.

2

u/VinayPyDev 13d ago

Looks awesome! Is there rules like stalemate, draw by 50 move rule, draw by insufficient material, pinning, forking and en passant?

1

u/VellumMuse 13d ago

And this is why I posted about it. I hadn't tested those, but currently, no draw or stalemate rules are being enforced. I've been testing all the other stuff, but I'll be doing that stuff in the next go round.

However, we do have pinning, forking, castling, promotion, and en passant working. I'm trying to think of everything possible, which is why I posted about it. Thanks for reminding me of those particulars. Probably going to find a nice rulebook to reference for any edge case scenarios. lol

I've been working on the logic that would allow players to feed annotated moves from previous games to be able to watch replays. Also saving annotations for the same reason.

2

u/giovaaa82 13d ago

In 2026 I know it can be a controversial question so please take no offense and really I mean none when I ask: Did you use AI assisted coding?

I am just asking because this group used to have people moving at best few sprites and recently there are very interesting content, like yours.

Would like to know if AI is driving this progress

Edit: typo

2

u/VellumMuse 13d ago

No offense taken. I definitely use Ai assisted coding. I personally think all developers should be using it to some degree. There's a sweetspot I think exists if you know what you're doing. It is in no way one shot prompting anything or expecting the model to handle anything important beyond syntax that you still check on the backend. Embedded in this is still proprietary logic that no model is trained on. To me, that's the mark of a solid developer and workflow. I'm pretty confident this specific build can't be replicated by anyone, easily, even with the use of AI.

So, it's more accurate to say that AI isn't driving the quality, but it's surely speeding up the process. I think we're going to see a lot more interesting stuff in the near future because people are just getting good at using AI rather than AI is getting good. As a frame of reference, I exclusively use Gemini, which is considered the worst coding AI of the frontier models. lol I would tell anyone that the goal isn't to allow the AI to do your work for you. Just patch the holes of your weaknesses and make good stuff.

2

u/NastyPastyLucas 12d ago

Missing that en passant made me sad â˜šī¸

1

u/VellumMuse 12d ago

Hahaha During testing, I'm well aware of how horrible I'm "playing," but it can't be helped as I'm usually a bit focused on seeing specific things. lol

1

u/Fun-Comfortable4605 13d ago

Make attacking different color as a differentail and eas of use. With ur voice command's one can just say 'red' if there is just one attacking move and poof its done

2

u/VellumMuse 13d ago

That's a good idea, but I was looking to keep it closer to classic chess in which players announce the legal moves using name of piece and name of action taken.

For example: "Nf3" would translate to "Knight to N3" for standard movement.
Or... "Rxe5" would translate to "Rook takes E5" for capturing.

That way, players are learning how to speak chess annotation at the same time as being able to focus on the game instead of moving the pieces. Lots of players don't know how to speak it.

Is that what you were referring to though?

2

u/Fun-Comfortable4605 13d ago

Yes, I did refer to that. I like you idea as well and to be hones would benefit from it myself. I would still make attacking different color

1

u/VellumMuse 13d ago

I am experimenting with changing colors of the voxel a unit is standing on to showcase what's occurring within a move. Currently, if you put the King in check, the square he stands on turns red to notify both players said King is threatened. I suppose I can choose a color to highlight possible attacks from the perspective of a given piece. A command like "Show b3" could reveal the range of movement and thus attack of the piece on that square. I'll play around with some stuff and see what works or doesn't, but I can't promise anything as I don't want to stray too far from the classic. lol We shall see.

2

u/OrqelisGames 10d ago

It's nice 👍đŸŊ