VgaGames 3 - Network man-pages

[.. upper level ..]

VG3_nw_get_random()

Return random integer number suitable for network games.
SYNTAX
unsigned int VG3_nw_get_random(unsigned int value_from, unsigned int value_to)

FUNCTION PARAMETERS
value_from Lowest number to return
value_to Highest number to return

RETURN VALUE
Returns random integer number between including value_from and value_to.

DESCRIPTION
As for network games only key-strokes are sent and received, all computing has to be done by each client for all objects. To keep them in sync, random numbers must not be really random, but replicable by each client. This function returns such replicable numbers and must be used since at least after calling VG3_nw_connect(). It may be used also in non-networking games.