Jump to content
  • Advertisement
Sign in to follow this  
wanderinghobo

[SDL] TCP/UDP example testing

This topic is 2597 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,
I made a number of tcp/udp game examples with sdl_net and uploaded them onto my site here: http://www.breakersgambit.com/?p=24&preview=true&preview_id=24&preview_nonce=0f26c76157

To be honest, I only tested these examples on the one machine(which was stupid) they worked under that scenario and assumed they would work in the real scenario too. I think some randoms who have visited have tested it properly, but feedback is minimal. I tried testing a later example I've been working on with my brother. The TCP stuff works, but not the UDP. I gather I either did something wrong or my udp portforwading stuff isn't working. I find all of that stuff a bit tricky.

To cut it short, is anyone able to test this first example across the net with friends or anyone to see if it works?

The example gets quite a few views and there's so few udp game examples, I guess it would be nice to know if my one works haha. Like the example says, I chopped and changed a few existing examples to work as 1.

It's a big ask, but it would be nice to know.

Share this post


Link to post
Share on other sites
Advertisement
Ok, finally fixed it. Looks like this topic had a bunch of views but no one helped. That's ok though.

SDL_Net+Multiplayer Game Example

The problem before was that it didnt actually send the udp packets out properly, they ended up just being sent locally. That's why testing on the one machine looked like it was working. This has been Fixed in this new release.

The link explains how it all works and has a link to the actual example. But basically a server runs, clients connect and the clients can move their character around with the directional keys and their positions are updated for all other players. More detail on how inside the link and even more inside the example itself.

I'll have to update the other 4 examples that sprouted from this original one. Regardless, hope this helps a few people.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!