Architecturally, the game is fairly conventional, and doesn't use the blockchain for any backend or logic, other than processing crypto withdrawals and deposits. The experience will be more like "a game that incorporates crypto" than "a dapp that has game elements". Once the user has deposited crypto into the platform (probably xDai), he can join a match. It will be an RTS, where every unit built requires that the player invest a certain amount of credit into the unit (say, $1 for a builder, $5 for a fighter, etc). Thus he'll be putting his credit directly on the battlefield in the form of an army. This battlefield will have other players building their own armies in a free-for-all. The key piece is this: when any unit dies, it drops its invested crypto directly onto the battlefield, for other players to pick up. Thus, you might build a $15 army, go clobber someone's $10 army, pick up the pieces, run back to base, and leave the game with a total of $25. Or, of course, you could lose your whole army and leave with nothing! For the purposes of the hackathon, I'm aiming to host a single match with a honeypot of $50 in the middle of the map, where a small number of players spawn around the edges and start moving inwards, drawn forward by that honeypot. As they get closer, tensions will surely rise!

CoinFight showcase

How it's made

The game is a custom engine built in C++, using sfml for basic graphics and UX. The networking architecture is similar to most successful RTS games these days: a server runs the game, and clients send commands to the server for the server to process and broadcast; all clients receive periodic updates of the game state and otherwise play back all player commands - thus all seeing "the same game". A Python script uses to watch for deposits and send out withdrawals on behalf of the server.