I'm trying to make a multiplayer web game with SST...
# random
j
I'm trying to make a multiplayer web game with SST. Medium complexity social deduction game. Wrote a blog post to lay the foundation of what tools I plan to use, would love input from people smarter than me ❤️ Post: https://medium.com/@jacksonbowe98/mafia-a-serverless-multiplayer-game-5e15ad64a1fa
j
I was going to share this on Twitter. If you have a Twitter handle I can mention you in it!
a
How are you gonna transition the phases (day/night). Time based or turn based like in regular turn based games (all players finish their actions)?
Also, this is of course not correct: Being serverless I’m somewhat limited by not being able to have persistent data.
Just because each individual lambda call is stateless, doesn't mean that your whole application can't have persistent state or data
But you already know this of course, or you wouldn't even have started the project, because it would be impossible
j
I don't really use twitter. The states transitions will be triggered by timers. I probably shouldnt have used persistent data, persistent variables would be more accurate. Good catch
a
then one cron could pull a list of active games and for each push a day-night or night-day event into a queue, and there you have a lambda that is then called for each game and calculates the new state
could also use step functions of course
j
Yeah its honestly unclear to me at this point. I know theres many ways to go about it, just trying to pick the most appropriate
a
for that you would first have to make a criteria analysis about the importance of aspects such as cost, resilience, scalability, performance, etc.
but honestly, I would just start with the most basic approach of lambda + dynamodb and see how far you can get
j
Yeah I've done a fair bit so far. Im just now writing it all out. Partly so others can follow and partly to keep it clear in my head too. Only been doing cloud stuff for 6 months and feels like I learn 10 new things a day 😅
a
Yeah, it's quite a deep dive. I haven't been on it much longer than you.