Download the PHP package furic/game-essentials without Composer
On this page you can find all versions of the php package furic/game-essentials. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download furic/game-essentials
More information about furic/game-essentials
Files in furic/game-essentials
Package game-essentials
Short Description The essentials and basic data for a gaming backend server.
License MIT
Homepage https://github.com/furic/laravel-game-essentials
Informations about the package game-essentials
laravel-game-essentials
Game Essentials for Laravel 5.*. This package is required and used by few packages in Sweaty Chair Studio creating the basic data and essential functions for a gaming server backend. This provides functions such as registering players and assign the players to a game. After that the data can be used for analytics purpose.
If you are using other packages that requires this package, this will be added automatically and you do not need to install it manually. However, you can still use this package alone without using other packages.
Table of Contents
- Installation
- Configuration
- Usage
- Games Table
- Players Table
- GamePlayer Privot Table
- API URLs
- TODO
- License
Installation
Install this package via Composer:
If you are using Laravel 5.5 or later, then installation is done. Otherwise follow the next steps.
Open config/app.php
and follow steps below:
Find the providers
array and add our service provider.
Configuration
To create table for game essentials in database run:
Usage
Games Table
- Name: The name of the game/app.
- iOS Version: The latest version number in iOS, used for force update in client.
- Android Version: The latest version number in Android, used for force update in client.
- tvOS Version: The latest version number in tvOS, used for force update in client.
Players Table
- Facebook ID: The Facebook ID of a player. (Optional)
- Game Center ID: The Game Center ID of a player in iOS. (Optional)
- Google Play Games ID: The Google Play Games ID of a player in Android. (Optional)
- UDID: The unique device UDID of a player. If the player is using multiple devices, only the first device UDID is used here.
- Name: The name of the player input in game/app. (Optional)
- IP: The IP of the player when being first seen.
GamePlayer Privot Table
- Game ID: The ID of a the game that player launched.
- Player ID: The ID of a player.
- Channel: The channel of the player getting into the game. Mostly used for Android players, e.g. Sumsung Store, Huawei App Gallery, etc. (Optional)
- Version: The current game version that the player device is running.
- Is Hacked: A boolean to mark if the player ever performed any hack in game, for analytics and limiting functions in client.
API URLs
GET <server url>/api/games/{id}
Returns a JSON data from a given game ID, for debug usage only.
GET <server url>/api/games/{id}/versions
Returns a JSON data containing the versions from a given game ID, for client checking the latest game version and perform force-update.
GET <server url>/api/games/{id}/players
Returns a JSON array of all players from a given game ID, for debug usage only.
GET <server url>/api/players/{id}
Returns a JSON data from a given player ID, for debug usage only.
GET <server url>/api/players/name/{name}
Returns a JSON data from a given player name, for debug usage only.
POST <server url>/api/players
Creates a JSON data of a player with given POST data. If the player is already exists with the given UDID, Facebook ID, or game servies IDs, it update the player data instead.
PUT <server url>/api/players/{id}
Updates a JSON data of a player with a given player id.
GET <server url>/api/players/{id}/games
Returns a JSON array of all players from a given game ID, for debug usage only.
API Document can be found here.
TODO
- Create the web console to add/edit games.
- Add admin login for web console.
- Add tests and factories.
License
laravel-game-essentials is licensed under a MIT License.