I recently upgraded this blog to use a Rust based web framework called Leptos, so that took away time and brainpower from this project.
Project Phantasy is fundamentally a clash game. You spawn avatars who will make their way to the goal on the other players' side. There are no towers. It's really simple to play. The goal is to get the most score, so anyone can pick it up.
I've been implementing a timer on the server side. While easy when you have one sense of time in an application, a game has two senses of time when you use fixed time-step. It seems intuitive to use the fixed update portion to run the timer, but since we want the timer to reflect time with respect to game it makes more sense to do it outside of the fixed timestep. Besides, why try to guarantee many calls to a timer update? If the game lags for whatever reason, the delta times increase so we just add it to the timer and trigger whatever that needs triggering.
When it comes to networking, websockets with Actix Web was selected. Defold and Web support were the primary factors there. Each websocket client connection/instance runs on actix_rt. It makes it easier to do different kinds of loops such as msg recv, send, ping, etc. on the same future using select macro!. I'm sure there are better ways to go about it, but it resembles an event loop using futures. I just don't like the idea of using multiple threads per client. It's better that every client instance is looked upon as a task to be run by actix_rt.
Spawning has a cost and I think it makes sense to consider a heat meter that fills up as you spawn. Now you can spawn as many as you want but if you overheat, then you have to wait until the overheat is done. There are two ways to do it, either make the player vulnerable until the bar is completely down to zero or just wait until the overheat (excess heat) portion is done. The overheat portion could be made to cool down slower than normal. I understand other games use an energy bar that goes down as you spawn, but I want to consider letting you being able to take risks with spawning. Ultimately, taking risks means more strategy/tactics and competition.
I think this game will be fun with the variety of avatars, special effects and themes. There are some more ideas to add variety of course but haven't gotten to really thinking about that. Just core game play matters for an alpha to test with people. The first alpha for this game really is just being able to get into a match with some avatars clashing then match end. A friction-less experience.
My hope for version 1 is that I won't need to ask users to sign up for anything just use your Gamecenter/GPlay Games account to get in. This is the most friction-less as you can get so that users can return later even if they uninstalled the game at first or moved between phones. For desktop and web, assuming I go there, well sign up with Epic/FB Account.