SplinterTactics PvP

image.png

I just completed the first functional pass at PvP on SplinterTactics.

This one took longer. For starters, I did it over the last 2 weeks while on vacation and with family in town. So it was done in scattered slots of 30 minutes here and there, spec'ing stuff out for Claude & Codex and having it go at it and then coming back later.

Any kind of PvP is relatively complex, especially if you want some element of "real-time". While SplinterTactics is a strategy game, it's not "chess by mail" either - i.e. I see games as being done in pseudo-real-time, with each player having 15-30 seconds to play their moves and games taking 5-10 minutes to complete.

After consulting with Claude, we decided to do an implementation that uses polling (rather than WebSockets) to check on the state of the game board and figure out whose turn it is to play. It took quite a long time to debug as the game previously had no concept of an opponent other than an AI, so there were many things which had been hardcoded under the assumption that this would remain the case.

Refactoring parts of the game to be more generic was necessary to get it working, and while it's not yet fully bug-free, I'm pretty damn happy to have it be functional. Have a look at the video to see roughly how it'll work once it's live.



0
0
0.000
6 comments
avatar

Congratulations @bravetofu! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

You published more than 350 posts.
Your next target is to reach 400 posts.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

0
0
0.000
avatar

Wow PvP oO
Amazing news can't wait :)

0
0
0.000
avatar

PVP nice addition to the game.

0
0
0.000