I'm publishing the code for a game I've been writing for the past few months: Shieldbearers. I've only implemented a version of the game that is playable online as the game concept itself is from Hempuli (the creator of Baba is you) who kindly allowed me to use his game idea for my experiments.
It's a 2-player board game with very few simple rules that is quite fun to play if you enjoy abstract strategy games.
I have an idea for a game I would like to write but I'm not even sure the concept is fun at all and starting from scratch feels like it's too long of a journey. Writing a simpler game first gives me milestones that are easier to reach so I'm less likely to loose interest as fast. As the players of my game will have different information about the state of the game, I decided to develop the game around a server-client architecture where the client has (almost) no knowledge of the game's rules. The server and the client are written in different languages: this makes it harder (but definitely not impossible) to integrate the two in order to enable 2-players local play (which Shieldbearers would have been perfectly suited to, as it is a game of perfect information).
Have in mind, at this stage the game is more of a programming experiment than a polished product (maybe we'll get there one day).
The server
The server part is written in Haskell and uses apecs, an Entity
Component System (ECS) library.
I'm not sure about this choice for a turn-based game, but I made it
work.
Conceptionally, the server receives Commands from clients.
The server then updates its state accordingly and generates the
corresponding Updates to be interpreted by the clients.
Updates are of type Spawn, Move or Capture for example.
Then the server sends to the to-be-playing player his different move
Options that the client then displays to the player.
Choosing one of those will trigger the client to send a Command and
the cycle continues.
Right now a server instance can only handle one game at a time and
only accounts for the happy path (e.g. no client disconnects).
I intend to host a server (of which the address is hard-coded in the
client…) so only two players can play simultaneously.
If there is demand for more, let me know.
The client
The C client uses the raylib library for graphics as its sole dependency. I used C to make it easier to port it to other platforms. I plan on writing a dreamcast version of the client.
Contribute/contact
If you have comments or plan on contributing, send me an email either directly or to my public inbox. Or talk to bgtdsword on Libera.Chat or FreeGameDev.net.
Here my stretch goals for ideas:
- IRC as a network backend
- Spectator mode/replays
- Targeting other platforms
AI use (or lack thereof)
No generative AI tools have been used to write this software. I expect the same of any potential contribution.
Credits
- Hempuli - for the fun game concept.
- Level2janitor - for the game assets.
- Kenney - for some miscellaneous assets.