Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Oncer

example for sdl_net

This topic is 2857 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

Has anyone got an example for using sdl_net in a game? I think I can only understand it, when I see sourcecode. The demos with the chat-server-client-systems are not suitable for a game engine, I think... I also looked on google and found nothing. And... I don''t want to use any libraries except SDL and addons. Oncer

Share this post


Link to post
Share on other sites
Advertisement
Hey
I hacked up a c++ wrapper for a 48h game i did a while ago.. your welcome to look though it .. wouldnt call it a shining example.. but better than nothing...

http://www.roidsofdoom.mine.nu/ld48-alia/doxygen/html/network_8h.html

atm the source isnt online.. ill put it up tonight (forgot to upload the zipfile)

A.

Share this post


Link to post
Share on other sites
hey anti could you show a simple example of sending messages across 2 computers... like one program which could choose client or server.. im trying to teach myself network programming but i cant get a simple program to work of just sending "hello there" from one comp to another.. if you read my thread below maybe you could help? or show some examples with your wrapper and ill use it.. i jsut need a simple example to get me started... thanks a lot for any help

Share this post


Link to post
Share on other sites
Yeah! It looks useful, but the source still isn''t up...
I tried to make a small network demo using the programs that came with sdl_net.
But the source is not suitable for games, the networking is much too slow!
I still don''t get a working game example to run!

Share this post


Link to post
Share on other sites
hey oncer, could you take a look at my thead right here?// im trying to write a VERY simple program with SDL net, just sending a message in the console from one computer to another... im having problems and i just need to figure this out so i can start writing some real code... thanks alot! btw, did you make a game with sdl net and it was slow? how do you know its slow? if it is, why do you still want to use it?

Share this post


Link to post
Share on other sites
Try the SDL_net demonstration code. You get it at http://jcatki.no-ip.org/SDL_net/!
My game is okay, but the network is not working well. When I move my ship on the one client, the move appears on the other clients a few seconds later.
This is why I'm looking for the sourcecode of a game which uses SDL_net properly.
The game I wrote is very, very simple. It's just a try before I do something serious...
If you want I can upload the source. Maybe someone can help me

[edited by - Oncer on June 4, 2004 5:25:43 AM]

Share this post


Link to post
Share on other sites
Ack! Sorry ive been sick for the last few days and I totally forgot..

anyway for what its worth (not much by now - you have prob already got past this stage

http://www.roidsofdoom.mine.nu/ld48-alia/zip/diaspora_src_1_1.zip


- Alia.

Share this post


Link to post
Share on other sites
Heaps late, and probably not useful now. But here's a sdl_net example I threw together recently: [url="http://www.breakersgambit.com/?p=24"]sdl_net game example[/url]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!