SFML community forums

Help => Network => Topic started by: kol on February 03, 2015, 01:56:18 pm

Title: Network SFML large projects
Post by: kol on February 03, 2015, 01:56:18 pm
I can use the "API Network" of SFML for large projects? I do not know much about networking, if anyone has any tutorial on this subject, I will be grateful! :)
Example: Dota 2, League of Legends, Ragnarok.

What did I consider in a server with multiple players?

Sorry my english.
Title: Re: Network SFML large projects
Post by: Gambit on February 03, 2015, 08:42:24 pm
You question is quite ambiguous. Ragnarok is an MMO, and whilte Dota2 and LoL arent, they are still network-heavy regardless.

If you dont know much about networking, then you need not worry about this sort of network usage. But in short, probably not. The network module of SFML is sufficient for an intermediate level of networking. When you get into MMOs and network-heavy applications, you should look at engineering your own networking libraries.
Title: Re: Network SFML large projects
Post by: Jesper Juhl on February 04, 2015, 01:16:06 am
Not to mention the known bugs in the SFML network module :-(
Title: Re: Network SFML large projects
Post by: Gambit on February 04, 2015, 08:31:39 am
SFML has bugs?
Title: AW: Network SFML large projects
Post by: eXpl0it3r on February 04, 2015, 09:16:13 am
In the end all you need are sockets and SFML provides them. The hard part is implementing your own protocols etc.
Then again other libraries such as asio can make things a bit easier.

As for the mentioned issue: https://github.com/SFML/SFML/issues/749
Title: Re: Network SFML large projects
Post by: kol on February 04, 2015, 11:12:28 am
Could give me some tutorial on how to create my own protocols?
Title: Re: Network SFML large projects
Post by: eXpl0it3r on February 04, 2015, 11:23:11 am
Learn about networks in general first. I mean you probably don't even know when the usage of UPD or TCP is appropriate. Without such very basic knowledge you shouldn't try to go further. ;)

There's plenty of resources about networking in your local book library or online.
Title: Re: Network SFML large projects
Post by: kol on February 04, 2015, 11:37:54 am
About using the UPD and TCP I know. And speaking of the same subject, how can I make a connection with them? In order to send UDP and TCP for the same player in SFML?

And I will start reading about network and protocols. Very thanks for all. :)
Title: Re: Network SFML large projects
Post by: eXpl0it3r on February 04, 2015, 11:55:20 am
The official tutorials (http://www.sfml-dev.org/tutorials/2.2/#network-module) explain how to use SFML's network module.
Title: Re: Network SFML large projects
Post by: kol on February 04, 2015, 11:57:11 am
Thanks