GNet Speed

BlitzMax Forums/BlitzMax Programming/GNet Speed

BLaBZ(Posted 2010) [#1]
Is GNet a fast networking solution? Would it be a good choice for an rts game with hundreds of units?


Dreamora(Posted 2010) [#2]
No it would be horrible as gnet is a fullscale object sync solution.

but for hundreds of units you will need a lot more to get it working than just good networking.
stuff like movement paths so you can send the paths of whole platoons etc is required, as oyu can't expect 10mbit upstream connections from players to play your game ;)


BLaBZ(Posted 2010) [#3]
mhmm I was actually thinking of just thinking of networking player actions, such as mouse clicks and structures being built, is GNet "Reliable"?


Czar Flavius(Posted 2010) [#4]
Are you making a strategy game?

Yes = use Raknet, don't even bother with anything else. Read this http://www.gamasutra.com/view/feature/3094/1500_archers_on_a_288_network_.php

No = only a few units at a time? Send all data each time and don't complicate things.


xlsior(Posted 2010) [#5]
Keep in mind, when designing network games:

You shouldn't trust the client when it comes for valid input. Either have a dedicated server, or appoint one of the clients to be the server/gamehost. The host is the one who verifies and approves gameplay affecting 'moves': for example, in an RTS you may have the host validate the number of credits available to the clients and validate purchases. Without that, it's easy for a client to cheat. Likewise, have deaths and damage validated by the host. Shooting a guy with weapon x: have the host assign a damage, and keep track of it. That way you can prevent a client from making his own 'superweapons' by modifying his local copy of the game.

Ignoring concepts like that can really come back to bite you if you skip thinking about the possible effects before implementation. If someone along the road ends up cracking/patching your game, it's much harder to fix it at that point. One person cheating ruins the fun for a lot of other people, after all.


Czar Flavius(Posted 2010) [#6]
When sending new info to the host for validation, your client should continue with the change locally as normal, but retain enough info to keep the change reversable. Then if there is a cheat or even error, the client backtracks and will suddenly display the correct game state, but if the change is validated as normal, there is no interuption to gameplay while you are waiting.