> How would I add a net play feature to my games so I can play over the
> internet with my friends? And would it be possible to do it
> multi-platform, so Mac and Windows can verse?
If it's a real-time game (everybody plays at once), use UDPSocket. If it's a
turn-taking game, use TCPSocket. Either can be done cross-platform; for a
very basic cross-platform TCPSocket example, see
http://ljensen.com/rb
and download MyFirstSocket. This will show you how to exchange bytes between
machines, but it doesn't guarantee that messages will arrive in one chunk.
You will need to invent or borrow a protocol -- a way to group the bytes
together into messages and decide what they mean. (That's for TCP; I believe
UDP works the same way but I haven't used it myself.)
Also check out the Socket ReadMe on the above page.
lj
---
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
|