VgaGames 3 - Tutorial 5

[.. upper level ..]

Tutorial 5

Now we want to modify our ping-pong game using VgaGames3-objects from tutorial 4 to play with two players over network connection.
On the left we will find our well-known green player-racket.
On the right the vertical border is cancelled and replaced by a new lila player-racket.

As playing over network just sends key-strokes and otherwise every client operates autarkically we don't have really much to change.
It is important to open the network connection before generating random numbers using VG3_nw_get_random().
So we will finish the connection before creating the object-instances.

One player is the master-client, all others are normal clients.
The master-client normally starts the network-server and is only distinguished from the others when connecting, after that there will be no difference any more.

<<Prev Top Next>>