Game Development Reference
In-Depth Information
How it works
The entire assignment of players depends on what action and data the packet is sent with,
and how it is parsed at the receiver's end according to the convention set by the sender. To
accomplish the allotment of the player's identity, we used a random number variable, which
is locally generated and passed in the allotment packet. At the receiving end, the logic of
allotment is written, checking the locally set and remotely passed random number. Based
on this comparison, the first and second players are decided.
Some text is shown on both the devices, informing the players about their identity, as
shown here:
Search WWH ::




Custom Search