Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Lys

Pages: [1]
1
Network / Re: SFML network library vs ?
« on: September 03, 2014, 04:36:14 am »
Thanks guys, these were the replies I was looking (and hoping) for.
SFML itself isn't slowing anything down as far as I know.

For very demanding applications, [...]
Especially yours was insightful, Jesper.

2
Network / Re: SFML network library vs ?
« on: September 03, 2014, 12:51:47 am »
Sorry for bringing up this old thread. I've been using SFML in my project for quite some time now because I like the simplicity of networking, at least when I compared it to boost.asio which I used in another project.
Since my current project is a (dedicated) server software I'm wondering about the speed of the networking library so I found this thread and read this:
The only real downside to using SFML for a multiplayer game is that TCP isn't that fast (though depending on the game, that might not matter)
Now I'm wondering whether that is actually true. First of all I'm unsure what he means. Latency (very unlikely, isnt it?) or the CPU power necessary to read/send out packets? And then again, so far I've found the library to be very well implemented so I'm not really sure why there would be any unnecessary overhead in TCP sockets that other libraries do not have.

3
Network / TCP Packets - Custom recipient?
« on: January 18, 2014, 02:48:52 pm »
Hello,
I intend to use SFML for the server side of my game and so far I've managed to register incoming clients etc. and it is working fine.
The next logical step would be sending real data between the server and the client but I am not using SFML for my client side. I wanted to use the SFML packets with TCP but I just read the following in the packets tutorial:
Quote
However, it has a drawback: to preserve message boundaries, sf::Packet has to send extra bytes with your data, which implies that you can only receive them with a sf::Packet if you want them to be properly decoded. In other words, you can't send a SFML packet to a custom recipient, it has to use a SFML packet too. Note that this applies to TCP only, UDP is fine since the protocol itself ensures message boundaries.
So as far as I understood, it is required to use SFML on both ends if I want to use the SFML packet structure, right? If this is the case, there surely is another way to "decode" the packet on the client side, can anyone point me to the code where the packet is encoded or has anyone ever written a function that would manually do this (C++ preferably)? I guess it would be easier to write something like that instead of wrapping my send functions to use byte arrays.
Thanks, Lys

Pages: [1]
anything