Hi,
My game is quite heavy as all calculations are done on server and for a 1v1 match I need to push updates of full game state to both players every 1 second.
This game state involves moving of lots of units from one pos to other. I want to send it by UDP.
Also I have other updates like units getting killed and new units being spawned , which needs to be sent by TCP.
1. Can I be able to use both TCP and UDP and get better performance. Currently everything is TCP.
Using TCP and UDP at same time in game?
Re: Using TCP and UDP at same time in game?
Yes, you can use UDP for all unreliable messages and limit TCP to only those messages that must have guaranteed delivery.
It's a common approach used in many games.
Cheers
It's a common approach used in many games.
Cheers
Re: Using TCP and UDP at same time in game?
Lapo wrote:Yes, you can use UDP for all unreliable messages and limit TCP to only those messages that must have guaranteed delivery.
It's a common approach used in many games.
Cheers
Any way how to achieve it?
Can I know what part has relevant documentation?
Re: Using TCP and UDP at same time in game?
Hi,
by default all messages SFS2X sends are sent via TCP.
You can override the transport (TCP vs UDP) in your Extension calls.
Here's the relevant doc:
http://docs2x.smartfoxserver.com/Advanc ... p-protocol
Hope it helps
by default all messages SFS2X sends are sent via TCP.
You can override the transport (TCP vs UDP) in your Extension calls.
Here's the relevant doc:
http://docs2x.smartfoxserver.com/Advanc ... p-protocol
Hope it helps
Who is online
Users browsing this forum: No registered users and 102 guests