Jump to content

  • Log In with Google      Sign In   
  • Create Account

networking


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 ncsu121978   Members   -  Reputation: 523

Like
Likes
Like

Posted 13 June 2000 - 09:10 AM

Is there any way to test multi-player via tcp/ip with only one comp. Like could i start one game as the server then start another game as the client and tell the client to connect to my own IP address ? "Now go away or I shall taunt you a second time" - Monty Python and the Holy Grail

Sponsor:

#2 Dogfood   Members   -  Reputation: 122

Like
Likes
Like

Posted 13 June 2000 - 09:33 AM

You can set up your server on your machine and then tell your client to connect to "localhost", that''s how I test a lot of my code when I''m just starting out. It also helps you make sure your code IS working, and packet loss is not to blame for something going wrong(of course you need to correct for things like that later, but it helps verify your initial work).



#3 ncsu121978   Members   -  Reputation: 523

Like
Likes
Like

Posted 13 June 2000 - 09:37 AM

what would be easier to woirk with ?
Direct Play or use windows sockets directly ?


#4 ncsu121978   Members   -  Reputation: 523

Like
Likes
Like

Posted 13 June 2000 - 10:22 AM

MY game runs in DirectDraw full screen exclusive.....
if I use the windows buttons in one session of the game to switch to the other session, will there be a problem ?


#5 Dogfood   Members   -  Reputation: 122

Like
Likes
Like

Posted 18 June 2000 - 05:05 PM

I''ve never used direct play. I prefer sockets myself, and if you are interested in portability(to say Linux) sockets are the way to go(almost every platform with networking supports sockets style access).


If you do use sockets, you need to write a layer on top of it to provide additional functionality(this is similiar in purpose to what DirectPlay does although your implementation will probably vary).


I have a library I wrote for sockets(works on both *nix and Windows) it supports a message passing style of connection. A client connects to a server and gets a message queque, the server is sent a message in its message queque. The server can create additional named message queques on the client. A "message" in this case is a message number(int), and an array of bytes(whose interpretation is up to you). Its a fairly simple abstraction, but it makes programming a client/server app pretty simple. It uses lots of threads for scalable performance issues and to make up for differences in the Windows and BSD style sockets handle asynchronous I/O. If you''re interested in talking further, or want to look at some of my code, I''ll be glad to help.



#6 ncsu121978   Members   -  Reputation: 523

Like
Likes
Like

Posted 19 June 2000 - 12:47 PM

If you could mail me your code and let me have a look, it would be greatly apprecieated..........I was thinking of doing it that way by using sockets and just writing my own functions using sockets to do what I want.......but I am not real familiar with sockets......although I do have this programming book but it doesnt go into much detail about networking or sockets.......
I could look over your code and it would help me to learn it
mailto:djsteffe@unity.ncsu.edu


"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
themGames Productions



#7 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 23 June 2000 - 01:50 PM

I could use your code as well.
razorz@www.com thanx in advance


#8 iwasbiggs   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 June 2000 - 05:10 PM

quote:
Original post by ncsu121978

what would be easier to woirk with ?
Direct Play or use windows sockets directly ?



Personal choice, the general side tends to lean toward sockets, but I would guess that this is primarily because of the lack of tutorials on directplay.

Once you get past dplay initialization troubles it''s easy sailing.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS