PDA

View Full Version : Saving a Place for Networking


Roosterhouse
2004.08.06, 01:12 PM
While I do, at some point want to put a networking feature into my uDG entry, I don't think that I'll be implementing it before the contest, for a couple of reasons.

I have no idea how
I don't think I'll be able to learn in time to get it to work properly
It seems like it might be a good feature for a post-uDG shareware version


One thing I'm afraid of, though, is that implementing it down the road will require rebuilding the game from ground up. Obviously, this is something I'd like to avoid.

So what is the best way to make sure that implementation will go smoothly? I would guess keeping the code as object-oriented as possible is key, but are there any other tips out there or "gotcha's" to look out for?

Thanks
Chris

chris.roosterhouse.ca (http://chris.roosterhouse.ca)

Sohta
2004.08.06, 01:21 PM
I would advise the following:

Keep in mind what information you will want to transfer beetween the computers, and how that information will reach the part of your application that will handle the data packets themselves.

GoodDoug
2004.08.06, 01:43 PM
Treat the player input as a black box that gets information from the user. By abstracting away from keypresses/HID device buttons you can later shim a network layer in as well.

For example, say I have key presses for up, down, left and right. I abstract the input to offer only up, down, left and right. Then when i want to put the networking in later, I only need a network shim that translates the network packets into up, down, left and right without changing the whole architecture.

FCCovett
2004.08.06, 05:05 PM
Has someone tried the HawkNL networking library? It seems it's free, open source and it works in Mac OS X.

Also, that CodeWhore web-site (see article on iDG front-page) seems to have a wealth of information on networking for games.