Hey! I'm using Prometheus and Grafana for the backend metrics currently. Yeah the game is still a work in progress. You can play the constantly updating dev-server demo here: mythfall.com@@LawZist
thanks! btw, do you use Client-Side Prediction and Server reconciliation in your game? also, is there a source of knowledge that you recommend to learn about game dev backend design etc? thanks again@@UnitOfTimeYT
Hey @LawZist I just saw this. Yeah I do client-side prediction. My actual network tick rate is very very slow (right now its like 4 Hz, I'm thinking of increasing it though). But its viable because my game can be deterministically simulated on both the client and server. If I had a PVP game, then I wouldn't be able to get away with that kind of tick rate. These are the best articles I've found about game networking design: gafferongames.com/categories/game-networking/
Glad you liked it! I was using this one before: github.com/kelindar/binary My serialization journey looked kinda like this: JSON, Gob, Flatbuffers, binary, and now Cod. There's a good serialization comparison github repo here: github.com/alecthomas/go_serialization_benchmarks But don't get too caught up on picking the fastest possible serialization strategy if you don't need it for your game/app. Honestly Gob probably works in most cases just fine. Unfortunately in my case it didn't fit so well.
Hey, Yeah I actually started with flatbuffers, but I found the generated code really hard to work with so I stopped using it. I've never really used protobufs so I'm not sure if that's any easier. Also, According to this: github.com/alecthomas/go_serialization_benchmarks - Flatbuffers is slower and encodes to larger bytestreams than a manual binary encoder (You can compare to the MUS encoder, which my code is very similar to). Also, my packets are really small, and I almost always need to decode all of the data anyways, so the partial decoding benefits of flatbuffers doesn't really help me much. The only other benefit those would have over mine is that *i think* they provide better backwards compatibility support. So right now, whenever I update the game server code I always push a client update as well. This guarantees that clients will have the latest serialization code. That said, the structs that get serialized don't change very frequently, so its not too big of a deal. Plus my game is browser based, so I have a lot of control over when people download new versions of the game (I can essentially force it). I'm not really trying to say flatbuffers/protobufs/or any other encoding strategy is bad. I use JSON for a lot of web requests that don't need as much performance, and I use Gob for some asset data files. It just so happens that the majority of my bandwidth is the high-frequency updates, so I figured I'd make that as fast as I can. Sorry for the long message!
@@UnitOfTimeYT Thanks for the detailed answer, I'll read the cod code and learn a little more about this serialization part, benchmarks always saving us.
@@wils-caru Sure. Feel free to take a look! The AST parsing and codegen portion is a bit hacked together. But it ultimately generates code which calls these encoding functions: github.com/unitoftime/cod/blob/master/backend/backend.go
Yeah from what I've seen from benchmarks, Contabo is very good value. In the upper tiers, I think they are better value than the VPS provider I currently use (HostHatch). . So at some point I might shop around once I start purchasing more expensive servers. I'll definitely look at contabo again.
I actually used flatbuffers for a while in this project before eventually moving to a reflection-based binary serializer. I wasn't a huge fan of flatbuffers, I found it way too complicated to work with, then the reflection serializer was just simply too slow and caused too many allocations. You can look here for a benchmark comparison of several serializers. github.com/alecthomas/go_serialization_benchmarks Mines probably most similar to a code generated version of the MUS serializer.
When I first started, I made the full game open source, But later decided to finish the game as a closed source project. I try and push anything that's not "game-specific" out to OSS though. You can see those on my main github page: github.com/unitoftime Your more than welcome to try/use my OSS libraries. If you have any questions/feedback, I'd be glad to try and answer!
Your devlogs are awesome
Haha thanks! Glad you like them!
I really liked the graph comparison! 👌It really showed the improvements.
Thanks! Yeah I'm super glad I added some backend performance metrics. It's been incredibly helpful.
what tools did you use for the backend performances metrics? do you still work on your game?@@UnitOfTimeYT
Hey! I'm using Prometheus and Grafana for the backend metrics currently. Yeah the game is still a work in progress. You can play the constantly updating dev-server demo here: mythfall.com@@LawZist
thanks! btw, do you use Client-Side Prediction and Server reconciliation in your game?
also, is there a source of knowledge that you recommend to learn about game dev backend design etc? thanks again@@UnitOfTimeYT
Hey @LawZist I just saw this. Yeah I do client-side prediction. My actual network tick rate is very very slow (right now its like 4 Hz, I'm thinking of increasing it though). But its viable because my game can be deterministically simulated on both the client and server. If I had a PVP game, then I wouldn't be able to get away with that kind of tick rate.
These are the best articles I've found about game networking design: gafferongames.com/categories/game-networking/
Woah Wtf you’re a genius
More goroutines then monies in the bank
If I had a nickle for every goroutine I've used. I'd be the richest man on earth
This is really awesome, what encoder was you using before? I'm using gob atm for my game but fortunately it's a 1v1 kinda thing :)
Glad you liked it!
I was using this one before: github.com/kelindar/binary
My serialization journey looked kinda like this: JSON, Gob, Flatbuffers, binary, and now Cod.
There's a good serialization comparison github repo here: github.com/alecthomas/go_serialization_benchmarks
But don't get too caught up on picking the fastest possible serialization strategy if you don't need it for your game/app. Honestly Gob probably works in most cases just fine. Unfortunately in my case it didn't fit so well.
hey, what do you think about flatbuffers and protobuffers for the problem you mentioned on serialization?
Hey, Yeah I actually started with flatbuffers, but I found the generated code really hard to work with so I stopped using it. I've never really used protobufs so I'm not sure if that's any easier. Also, According to this: github.com/alecthomas/go_serialization_benchmarks - Flatbuffers is slower and encodes to larger bytestreams than a manual binary encoder (You can compare to the MUS encoder, which my code is very similar to).
Also, my packets are really small, and I almost always need to decode all of the data anyways, so the partial decoding benefits of flatbuffers doesn't really help me much. The only other benefit those would have over mine is that *i think* they provide better backwards compatibility support. So right now, whenever I update the game server code I always push a client update as well. This guarantees that clients will have the latest serialization code. That said, the structs that get serialized don't change very frequently, so its not too big of a deal. Plus my game is browser based, so I have a lot of control over when people download new versions of the game (I can essentially force it).
I'm not really trying to say flatbuffers/protobufs/or any other encoding strategy is bad. I use JSON for a lot of web requests that don't need as much performance, and I use Gob for some asset data files. It just so happens that the majority of my bandwidth is the high-frequency updates, so I figured I'd make that as fast as I can.
Sorry for the long message!
@@UnitOfTimeYT Thanks for the detailed answer, I'll read the cod code and learn a little more about this serialization part, benchmarks always saving us.
@@wils-caru Sure. Feel free to take a look! The AST parsing and codegen portion is a bit hacked together. But it ultimately generates code which calls these encoding functions: github.com/unitoftime/cod/blob/master/backend/backend.go
awesome
you might want to try a contabo VPS those come pretty cheap and extremely fast.
Yeah from what I've seen from benchmarks, Contabo is very good value. In the upper tiers, I think they are better value than the VPS provider I currently use (HostHatch). . So at some point I might shop around once I start purchasing more expensive servers. I'll definitely look at contabo again.
@@UnitOfTimeYT Contabo costs like $8 for 4 cores and 50GB NVMe
Good luck with the development
nice i have no clue what your talkin ab but its a good video
Haha. Still, glad you enjoyed the video!
Do you try/test protobuf?
I actually used flatbuffers for a while in this project before eventually moving to a reflection-based binary serializer. I wasn't a huge fan of flatbuffers, I found it way too complicated to work with, then the reflection serializer was just simply too slow and caused too many allocations. You can look here for a benchmark comparison of several serializers. github.com/alecthomas/go_serialization_benchmarks
Mines probably most similar to a code generated version of the MUS serializer.
Is full game open source or only some parts?
When I first started, I made the full game open source, But later decided to finish the game as a closed source project. I try and push anything that's not "game-specific" out to OSS though. You can see those on my main github page: github.com/unitoftime
Your more than welcome to try/use my OSS libraries. If you have any questions/feedback, I'd be glad to try and answer!
Try rack nerd vps
ooo I love VPS suggestions. Thanks! I'll check it out!
Still not over 9000
stop vocal fry
Haha I had no idea what that meant so I googled it, but yeah I definitely do that a lot. I'll keep working on it! Thanks for the feedback!