Log In  

Cart #holes-7 | 2019-09-18 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
11

A board game.

The goal is to trap the other player on a single square.

On each turn, the player can move their piece one square, causing a hole to appear beside their opponent, or jump their piece two squares (possibly over a hole), leaving a hole where their piece was.

There are different options for play:

  • two player, one controller (pass the controller back and forth between turns)
  • two player, two controllers (each player has their own controller)
  • one player, easy AI
  • one player, challenging AI

You can choose from a number of board layouts. If you download the cart is easy to add your own board layouts with the sprite editor.

In the menu, use the direction buttons to move between menu entries, and the X and O buttons to cycle through the options of menu entry, or perform a menu action.

In the game, use the direction buttons to move your piece, or hold down the X or O buttons and use the direction buttons to jump your piece. Use the pause menu if you want to abandon a game and return to the title menu.

Gameplay screen shots:

Drawing a board layout in the sprite editor:

P#66445 2019-08-07 21:27 ( Edited 2019-09-18 04:56)

All Comments

I love the concept, looking forward to future updates!

P#66497 2019-08-10 11:30

Thanks!

P#66505 2019-08-10 16:35

A new version that

  • has a better menu and title screen
  • ends the game as a draw if the players are in a stalemate
P#66506 2019-08-10 16:37

Update:

  • Simplified the menu on the title screen
  • More board layouts
P#66693 2019-08-15 13:15

Update:

  • Pieces can now jump two squares, leaving a hole where they were. This allows more varied tactics and makes the game more fun.
  • More board layouts
P#66777 2019-08-19 12:12 ( Edited 2019-08-19 12:13)

Update:

  • Added board layouts that take advantage of the way pieces can now jump across holes
P#66834 2019-08-21 10:24

Update:

  • fix end-of-came condition that would score the game as a draw incorrectly
P#67061 2019-08-30 22:58

Update:

  • fixed input handling in multiplayer games when played with separate game pads
P#67841 2019-09-18 04:57

The "thinking" part 1/4 in the game is really slowing the game down. Full long seconds before a move now. Any chance of getting that sped up ?

P#67885 2019-09-19 02:11

I’ll see what optimisations I can apply within Pico-8’s limitations.

The more options I add to the gameplay (to make the game more fun), the more time the AI has to spend searching for the best move. But the AI doesn’t search in an optimised way at all, and may evaluate the same game state multiple times.

P#67971 2019-09-21 08:26

I'm not sure of the actual mechanics behind the brain but may I suggest that before the game begins, the opponent has invisible scores placed on the board based upon accessibility and maneuverability.

Only adjust the scores slightly based upon missing tiles.

Then the brain-work is already done and moves can be instantaneous and intelligent.

P#67974 2019-09-21 15:50

The AI is implemented using the negamax algorithm with alpha-beta pruning and a heuristic that tries to estimate maneuverability without using too many virtual CPU cycles. This algorithm lets the AI player select what it considers the best move in reaction to the human player's moves.

There are a whole bunch of optimisations that can be implemented. Whether they result in a speed up in practice will depend on the way that Pico-8 constrains the program's use of memory and CPU. I'll have to experiment to see what works best.

P#67992 2019-09-22 11:45

Reading about NegaMAX. That's a bit of a brainweave. Seems like you're quite knowledgeable on the implementation.

How about this ? Is it possible to speed up the algorithm by seeking only the surrounding tiles of both player and computer as they can only each move one tile ?

P#67993 2019-09-22 12:16

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 13:18:53 | 0.013s | Q:30