3 ms·
I tried the excruciating task of building a real-time multiplayer game with server-side authority using only Firebase and Google Cloud Functions. Basically I h
by hopfog 9y ago
I tried the excruciating task of building a real-time multiplayer game with server-side authority using only Firebase and Google Cloud Functions.
Basically I handle all the logic in Firebase rules and lambdas. Any destructive action goes through a GCF that updates the Firebase Realtime Database. Actions that happen often (like moving) are updated directly by the client but validated with some overly complicated Firebase rules.
It's very nice not having to worry about servers and scaling, but it can be a really painful development experience.
Let me know if you want to try it out and I'll post the URL.
- tabdon 9y agoThat sounds really cool. I'd like to check it out. Now that you've been through it, would you do it again? Or stick to a more traditional architecture?
- hopfog 9y agoYou can play it at https://tombs.io/ https://tombs.io/ It's pretty much a collaborative and social experiment where I wanted to explore the concept of using in-browser cryptocurrency mining as a monetization and bot fighting method (something I had a problem with in the original Ludum Dare entry it's based on). That's a different discussion though. (You need to manually start the mining and you can explore the map without doing it. It's only when digging and chatting it's required.) I'm actually planning on rewriting the whole backend in a more traditional Node.js + WebSockets stack so no, I probably wouldn't do it again for this type of application. However, I will probably use it again for other things.
- mmjaa 9y agoNice little hack .. you get Monero, and I get .. 'tombs.io coins' that can be used to keep me playing each level while you mine .. more Monero! Such a great idea, I think I should do it as well .. ;). But I won't use Firebase, following your advice ..
- test1235 9y agoI get this from your site: Security risk detected: Trojan.Gen.NPE