#158642 - Metju - Sun Jun 15, 2008 2:57 pm
Hi, i was wondering if anyone knew how to code a game so it can use the gamelink cable (or wireless for the GB micro). if anyone knows how or where to find that out that would be great.
Thanks a lot, Met
#158643 - kusma - Sun Jun 15, 2008 3:06 pm
Metju wrote: |
(or wireless for the GB micro) |
Uh, what?
#158645 - Metju - Sun Jun 15, 2008 4:21 pm
i mean does anyone know how to code the game so it knows when a gamelink cable is in so it can communicate with another gameboy (as in multiplayer)
By wireless i mean wireless adapter for gameboy micro.
#158657 - eKid - Mon Jun 16, 2008 12:58 am
http://nocash.emubase.de/gbatek.htm#gbacommunicationports\
^ the only document good on the subject :(
I haven't used the wireless adapter, but if it works with all games then it should be compatible with "SIO Multi-Player Mode"
Multi-Player mode is the one that games usually use (compatible with the cable with the little box in the middle).
#158661 - Miked0801 - Mon Jun 16, 2008 4:16 am
There's 2 wireless adaptors - one that was proprietary and have really funky stuff going on, and other that emulated the serial cable so in theory to be usable by anything.
BTW, don't torture yourself into making a serial multiplayer game. It's nearly impossible to debug and hell to keep "in sync." Take it from someone who has done a few commercial games with the &*$# thing.
#158670 - tepples - Mon Jun 16, 2008 12:32 pm
You could probably more easily make a serial game for Game Boy Player, where GBAs 2-4 act as controllers and all the action is displayed on GBA 1.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#158681 - Dwedit - Mon Jun 16, 2008 3:08 pm
For linked games, you really only need to transfer controller data, and possibly an initial game state. Run the exact same game logic code on both systems. Verify that controller data is correct, and that both players correctly know all players' input. Everything should work fine and dandy as long as there aren't any memory corruption bugs, and the random number generators return the exact same values.
Oh yeah, also make sure that the game logic runs at the same rate. So if one system displays more graphics than the other and slows down, make both systems slow down. That pretty much should already be covered by protocols which exchange controller data.
I once made a linked game. Now this wasn't for the GBA or NDS, this was on the TI83. One time, I made the mistake of using a random number generator that fetched random bytes out of RAM to enhance randomness. Not a good way to go, both players get different data that way.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
#158710 - Miked0801 - Mon Jun 16, 2008 7:07 pm
All the things you mention are indeed big ifs. Plus the fact that you waste a lot of time waiting for all systems to complete there gameloops before going on to the next. All systems run at the speed of the slowest. Also, you need error an error correction protocol to go with your timing protocol and these both have to be hand written as the hardware does none of it.
Again I'll say it, Multiplayer is not fun to write with the best of available tools. For home-brew, it is very difficult, though a few have pulled it off.
#159061 - ScottLininger - Wed Jun 25, 2008 12:13 am
There's an example of doing this at the very bottom of my GBA page...
http://www.scottlininger.com/gba/
_________________
Some of my GBA projects