GamePlayer - Historical

Applied By Maximvdw: Jan 9, 2018 at 11:04 PM

GamePlayer
ArcadeBoard API - GamePlayer


Introduction(top)

A 'GamePlayer' is a player that uses ArcadeBoard. It is an encapsulation of a normal player, but with more features. It is used internally as a way to keep track of players that are playing a game, but can be used as developers to get specific information about other games (or your game) and store them in the database the player has configured.

Persistent Game storage(top)

The GamePlayer API offers a way for games to store data in a "key" "value" method. This means that you can give a key of your choice to store data. For example: "killed puppies"=3.


On top of that, there is a statistic API that allows you to specifically store statistics. Internally this uses the same key/value storage method. This allows external developers to get specific information from your game without having to understand what it actual stores.

storeGameData(top)

This stores a key/value pair of a player for your game.
It takes 4 arguments: The Game (GameInformation is a downcasted instance of your Game instance), the player you are saving the data to, and the key/value pair.

getGameData(top)

This gets a stored key/value pair of a player by its key.

storeStatistic(top)