WebSocket transmission on the issue

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Raymond
Posts: 2
Joined: 07 Apr 2017, 17:22

WebSocket transmission on the issue

Postby Raymond » 07 Apr 2017, 17:54

Hi team,
I made shoting game to SmartFox2X and html.
But I have two problems.

1. WebSocket is always in the normal state of the network delay (delay 40ms), leading to my bullets are stuck together, what is a good way to solve the packet delay or packet slow?

2. How do I get the client to send a object to the client not through the server?

noted thanks :)
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: WebSocket transmission on the issue

Postby Lapo » 07 Apr 2017, 18:29

Hi,
latency is a normal part of networked applications. There's not much you can do about, beside trying to "hide it" with different techniques.
If you're not familiar with this I'd recommend taking a look at the realtime examples we provide for different platforms such as Unity, Flash etc... there're a lot of interesting concepts to learn that are universally valid and can be applied to HTML or any client type.
http://docs2x.smartfoxserver.com/ExamplesUnity/fps
http://docs2x.smartfoxserver.com/Exampl ... space-race
http://docs2x.smartfoxserver.com/Exampl ... pacewar-p1

2. How do I get the client to send a object to the client not through the server?

You can't.
The only way to do that would be via a peer-to-peer connection, but browsers don't support it.

cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
Raymond
Posts: 2
Joined: 07 Apr 2017, 17:22

Re: WebSocket transmission on the issue

Postby Raymond » 08 Apr 2017, 10:48

I'm trying to see
thanks for your advice.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 76 guests