[airstrike] dev-cpp support (networking)
eero.tamminen at netsonic.fi
Sun Aug 14 18:01:01 EDT 2005
On Sunday 14 August 2005 23:21, Ulf Ekström wrote:
> > > I think, that i can add net support for this project. I have little
> > > expirience with network programming under linux&windows and now learn
> > > SDL_net.
> > What kind of an approach you've thought of?
> > Peer-to-peer or client-server?
> > You can transmit the game state across network on different levels,
> > simplest one is transmiting just:
> > - random seed
> > - the level name
> > - player interaction (key presses/joystick movements)
> I once did a little game which bounced all the keypresses off a
> central server. I think that can work if everyone is on the same LAN,
> but otherwise the lag will make it unplayabe (my guess). It would be
> fun to try, once single player is "finished".
Peer-to-peer local lan play could be had with a "net AI", maybe just by
adding implementation for following command line parameters:
-seed <random seed>
And Airstrike would then connect the other instance at <host> and wait until
it had agreed with it on the random seed and level. The Net AI would then
just transfer keys to the other end.
PS. Pavel, Airstrike includes it's own pseudo-random number generator so
that the random numbers generated with the same seed match at both ends.
More information about the airstrike