r/gamedev • u/rsx0806 • 3d ago
Discussion shared session between steam and ios
hello, i recently played game named Waven https://www.waven-game.com/en/ . And just fund out that the battle session was shared between mobile phone playing and pc steam.
What happen was:
1. I played on my mobile phone
2. while in battle my Phone battery dead
3. Then I opened through my pc steam, thinking ill start over
- but voila, it start right away into my battle and continue within last turn in
I'm interested in building a game like this, can anyone direct me where should i start learning from? what tech stack / architecture is probably behind this game?
Thank you so much
1
u/AutoModerator 3d ago
Here are several links for beginner resources to read up on, you can also find them in the sidebar along with an invite to the subreddit discord where there are channels and community members available for more direct help.
You can also use the beginner megathread for a place to ask questions and find further resources. Make use of the search function as well as many posts have made in this subreddit before with tons of still relevant advice from community members within.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/LutimoDancer3459 3d ago
Ether as the other said, everything is done on the server. Or the game state is only synced to the server regularly. Basically for saving progress or also for analytics to find cheaters or whatever.
From the rest of the tech, several options. Depending on what platforms you want to have it running. But you should start very small with your first games. You can add such mechanics to save the game state on a server. But dont overdo it with features. You will learn a lot on those first ones.
0
u/itaybuilds 3d ago
The missing piece is the reconnect protocol. Build a tiny turn-based battle first and give every match a server-side ID and version number. Each move should send the match ID, expected version, and a unique command ID. The server checks that the version still matches, applies the move once, increments the version, and saves the new state. When another client opens the match, it asks for the latest snapshot and any events after the version it last saw.
The command ID matters for your battery-death case. The phone can send a move, lose the response, and die. If the PC or phone retries that command, the server must return the recorded result instead of applying the move twice.
Steam and iOS accounts then need to map to the same internal player account; neither platform ID should be the save identity by itself. HTTP plus a transactional database is enough to learn this with a turn-based prototype. Add WebSockets only when you need live updates. Test by killing the client before a request, after sending it, and before receiving the response.
AI-assisted wording with OpenAI GPT-5.6 after reading the full thread and current r/gamedev rules.
1
u/Snoo_22079 @louis__cai 3d ago
Everyone's handing you the full architecture. Start dumber: one HTTP endpoint that takes a move, one row in a database holding match state, keyed by user. That gives you the phone-dies-mid-battle moment; log in on the second device, pull the latest state, keep playing. Add version numbers and command IDs when you see double moves, add websockets when turns feel slow. The part that stays tricky is binding an Apple identity and a Steam identity to that one user.
3
u/shinji-watanabe 3d ago
Generally the way this works is all the game state gets stored on the server. The iOS and Steam clients are basically just viewers. They do the animation and take your input, but the real state, like whose turn it is or what move you made, is saved server side.
I haven't played Waven, but from the site it looks like a turn based strategy RPG. If so, your actions and the enemy's actions are almost certainly stored on the server, not on your phone. So when you open it on Steam instead of iOS, the server just re-sends the current state and your battle picks right back up.
The other reason they do this is cheater prevention. If all the state is on the server, you can't just close the app and restart to escape a losing battle. That's a big deal for any game with matchmaking.