Giter Site home page Giter Site logo

cdwfs / hexflipper Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 6.97 MB

A 1-4 player competitive territory-building game played on a hex map, created for OST Jam using quadplay✜

Home Page: https://festervaunt.itch.io/hexflipper

HTML 100.00%
ost-jam competitive game hex-map quadplay

hexflipper's People

Stargazers

 avatar

Watchers

 avatar  avatar

hexflipper's Issues

Optimize sprite sheet

In theory I only need two sets of arrows (horizontal an diagonal) plus X/Y flips. Totally not a priority but if there's ever a final-release version it would be interesting to see what's involved there.

Implement AI

It shouldn't be too hard to evaluate all possible moves and determine the best one (or the best N, and an easier AI would randomly pick a less-than-optimal move).

On one hand this would help playtest new rules variants more efficiently; I could just let the AI play itself and see who wins, after how long, etc.
On the other, rules changes would need to be reflected in the AI before it could play effectively.

Improve AI

  • If a move would end the game with the current player as the winner, do that move.
  • If a move has a super arrow, prefer a move that uses that super arrow to capture another player's tile

Update sprite sheet

  • neutral board tile
  • per-player-color board tile
  • tile for each move
  • "selected" overlay

Update game metadata

  • Preview animation (Shift+F8 in IDE)
  • Final credits
  • asset attributions
  • URLs
  • screenshot for itch.io

get_best_move_hex() can still soft-lock the game

A previous build of the game had a soft-lock caused by get_best_move_hex() returning a hex that no longer belonged to the player in question. The game would then try to execute a move at that space (and fail, entering an infinite loop). The workaround for the bug was to default get_best_move_hex() to the player's starting location rather than their current location, but this is not a full fix; the start location can ALSO be captured, leading to the same soft-lock if this hex would otherwise be the AI player's best move.

More generally, it's conceivable (but unlikely) that a player could legitimately have no valid moves, if every single move they're given fails to grow their territory, while their opponent makes their way across the board and captures their starting hex with a red arrow.

Tweak move generation

Purely random moves mean you get a LOT of useless moves, which is not fun. Also, once you're way behind and cut off, you pretty much have nothing to do but wait for super arrows to try and claw back a bit of territory.

Give players more super arrows when they're farther behind.

When generating a move for a player, prefer one that can be used to flip at least one tile at the time when the move is generated. Note that this may not be possible in general, and by the time a player can actually MAKE the move it may no longer be able to flip a tile, but it's better than getting a move that is just patently useless.

Add victory condition

The game currently literally never ends.

At the minimum, of all cells are non-neutral, declare a winner and go back to the menu.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.