gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Creating a Wifi game

#103644 - El Hobito - Sat Sep 23, 2006 12:44 pm

Hi people i'd like to start a discussion on how to create a wifi based multiplayer game.

Firstly i'm gonna start with one person being the host and the other being the client. In my game everything is an object and every object has an ai method.
For a basic first test i'm gonna make a test that has the host move player 1 and player 2 is moved by the client.
The Host player will have it ai method controlled by the key presses but what it'll also do is then transmit its coords of both players to the other one so that the host is always in sync.
The client player is always out of sync but its positions will be updated as soon as it recieves the reply from the host.

This is naturally not a good way to do it but its a start which i hope can be built on. Now what are your thoughts?

#103652 - OOPMan - Sat Sep 23, 2006 3:40 pm

Hmmmmm, well, I'd do a lot of research on network gaming before jumping in that choppy sea :-)

Maybe it would be a good idea for some links to detailed info on network game programming into the Tuts list, since WiFi is an inevitable question for many homebrew projects...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI

You can find my NDS homebrew projects here...

#103655 - El Hobito - Sat Sep 23, 2006 3:50 pm

I do have some knowledge already of network programming already. The basics should be pretty straight forward all i need to do is send a packet containing certain data that will be interpretted by the host. Once i get a basic test running i'll release it and people can try different things and collaborate will we get somewhere good. At the moment i'm expecting it to work not too differently from my collision code where it only a few objects are synced every frame but by the 5th frame all would have been synced once.

I have two ds's so im in a good position to figure it out as well as already having all the basic framework i need.

#103684 - xtoc - Sat Sep 23, 2006 9:09 pm

i would be nice,if we could see a easy palib wifi example, where you can move 2 players.