Game Kit(game_kit)
Introduction
Game Kit is a toolbox to provide some features relative to game endpoint, game management and control in gaming platform.
Features
Infrastructure
Infrastructure features in game_kit is to provide game endpoint management currently.
Endpoint
Game endpoint is composed by gateway host(default: http://localhost, game ID and IDC environment(default: int). Currently, you can specify gateway host and IDC environment in environment valuables GW_HOST and IDC_ENV. Here is the example of default return game endpoint, such as game id is 10000
http://localhost/int_game10000_app
If you specify GW_HOST is 'http://my_gateway', so you can get the game endpoint as:
http://my_gateway/int_game10000_app
Similarly, setting IDC_ENV to 'stg', the game endpoint can be:
http://localhost/stg_game10000_app
Usage
gem install game_kit
require 'game_kit/infra'
GameKit::Infra.endpoint_for(10000) # http://localhost/int_game10000_app
# Specify gateway host in API call
GameKit::Infra.endpoint_for(10000,'http://my_gateway') # http://my_gateway/int_game10000_app
# Specify gateway host and idc environment in API call
GameKit::Infra.endpoint_for(10000,'http://my_gateway', 'stg') # http://my_gateway/stg_game10000_app
Contributors
Ben Wu [email protected]