Log In  

Cart #grandmaster_checkers-0 | 2022-01-16 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
10

This is my crack at a checkers game with a juicy UI.
Can you beat the GrandMaster CPU?
Higher levels are still a little slow, especially in the endgame.
Enjoy!

Potential Updates

  • actually implement the settings menu...😅
  • Use a transposition table to speed up the AI. I actually already tried this, but immediately ran into memory issues. If I were to re-implement it, I would need a good algorithm for deciding which table entries to purge when the memory starts getting full.
  • Restrict the cursor to only pieces that can move (when no piece is selected), and only moves that the selected piece can make (when one is). This was recommended by @ChristopherD who played the game while it was WIP. You can view my response to that below.
  • MoAr PaRtIcLeS...I had planned on having a starfield or some shapes moving around in the background, as well as a bit of dust coming up around the pieces when they land after making a move. I implemented the former, but took it out because I thought it added too much visual noise. If you think it would cool to see in the game, please let me know. I have plenty of tokens left for more of this kind of juice. 👍

Change Log


V1

  • Jumps are now mandatory, as per the official checkers rules
  • Added sound
  • Updated AI (includes 3 more levels)
  • Animations are somewhat smoother

V2

  • Hotfixed a sound glitch that made the game nigh unplayable

V3

  • Improved AI speeds slightly
  • Show available actions at the bottom of the screen
  • Show jumped pieces on the sides
  • Show opponent level while playing
  • Added Pause menu
  • More sound fixes

V4

  • Recognizes draw by threefold repetition
  • Improved AI endgame strategy
  • Added Take Back last move option in Pause menu
  • AI now runs on a coroutine (i.e. game shouldn't freeze)
  • Added proper title screen
  • Show what move the AI is considering
  • Added a few miscellaneous sounds and effects
P#104444 2022-01-07 03:07 ( Edited 2022-01-16 02:58)

All Comments

Very Hard has been ported

P#104448 2022-01-07 04:26

One small suggestion. Restrict cursor movement to only valid moves; there's no point in a free-roaming cursor.

So, on selection only move the cursor between checkers that can actually move. Once a checker is selected, only move the cursor between the open position(s).

Otherwise, I enjoyed playing a quick match and being completely beaten by the grandmaster level.

P#104702 2022-01-10 02:07 ( Edited 2022-01-10 02:08)
1

@ChristopherD Thanks for playing and thanks for the suggestion. Grandmaster is pretty tough; I rarely even beat Hard!

Originally the cursor was completely free roaming (i.e. you could move it to red squares too), but I thought it made sense to restrict it to the black squares. I was actually considering changing it back, as it's just a bit more intuitive to press up and have the cursor move directly up, rather than 1 of 2 diagonal directions. But now that my 1 piece of feedback says to restrict the cursor even more, I guess I won't be changing it back!

The biggest issue I foresee with your suggestion is coming up with an algorithm that always moves the cursor to the most intuitive piece, while ensuring that every (movable) piece is accessible. I have a few more finishing touches to put on, but after that I have other projects I want to get to, so I think for now I'll just let the (somewhat awkward) "Show Moves" option in the pause menu suffice. Maybe someday I'll come back to this and try to implement such an algorithm. I bet it'll be a fun coding challenge!

P#104789 2022-01-11 00:41
1

Grandmaster demolished me; I think my wording was confusing on that point. lol

Good luck on whatever you do next.

P#104790 2022-01-11 01:20

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-20 00:03:54 | 0.019s | Q:22