networking
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).
Direct Play or use windows sockets directly ?
if I use the windows buttons in one session of the game to switch to the other session, will there be a problem ?
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.
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
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.