stevegrossi / sengoku

An online Risk-like game built with Elixir and Phoenix LiveView
https://www.playsengoku.com/
59 stars 3 forks source link

Custom Boards/Maps #71

Open stevegrossi opened 4 years ago

stevegrossi commented 4 years ago

70 added a tool for building game boards 🗺️ but it still requires editing code to ultimately play on it. I'd like to take this idea further and allow players to build their own board to play on.

Implementation Ideas

Boards might eventually be saved to a database, but for now, I think a game board could be compressed into a string. A board is ultimately a subset of the possible 85 tiles, each mapped to a region, which could be represented as an 85-character string with 0 for "no tile" and 1-8 for "yes, a tile, in this region". The board builder could spit out such a string, which could be pasted in when starting a new game or even saved to the session (if we had longer-lived sessions) to allow playing on a custom board. And eventually, put into a database once users can log in, to allow saving your own boards to play on.

Prerequisites