https://serverless-stack.com/ logo
#random
Title
# random
j

Jackson Bowe

06/14/2022, 3:12 AM
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

Jay

06/14/2022, 5:14 PM
I was going to share this on Twitter. If you have a Twitter handle I can mention you in it!
a

Adrian Schweizer

06/21/2022, 10:06 AM
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

Jackson Bowe

06/21/2022, 10:55 AM
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

Adrian Schweizer

06/21/2022, 10:59 AM
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

Jackson Bowe

06/21/2022, 11:05 AM
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

Adrian Schweizer

06/21/2022, 11:07 AM
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

Jackson Bowe

06/21/2022, 11:10 AM
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

Adrian Schweizer

06/21/2022, 11:11 AM
Yeah, it's quite a deep dive. I haven't been on it much longer than you.