Report as inappropriate.
Beta: A reusable utility for onsite user 2-player games. Provides user online status, opponent selection, client communication, etc.
This demo scenario features the Tic-Tac-Toe game with an instant messenger.
Please feel free to reuse this utility to make your own onsite user 2-player games (just include in the description the appropriate credit).
And same for the GUI Components.
Needless to say, likes/votes are always appreciated.
Note, my utility replaces UserInfo (in that UserInfo should not be used on the side)
The classes that are required for using TwoPlayerUserInfo are:
** NO live-action multiplayer **
Live-action is not feasible! It is not possible to get updated information to clients fast enough using UserInfo!
Turn-based and similar styles are what this utility was meant for.
** TwoPlayerUserInfo’s EFFICIENCY using UserInfo **
- While paired with opponent - getNearby(3) is called to retrieve list of user data containing data for opponent.
- While in the lobby (opponent selection) and during the pairing process with opponent - getTop is called to retrieve full list of user data.
** Overhead **
TwoPlayerUserInfo reserves the score field and the last int field for its operations. As well as the last String field but only during the pairing process with opponents (meaning it still can be carefully used to store data, and of course to be included for a message).
A score can be stored in another int, and a full list retrieved through TwoPlayerUserInfo can be sorted by it (to create a highscore table etc.)
** Opponent Selection / Lobby **
Only users that are online appear in list (should always give a few moments as it listens for user activity).
Use help button for more info.
** TO-DO **
- More documentation.
- Ironing out things.
For a collection of onsite user multiplayer games, visit:
For reusable GUI Components, visit: