Skip to content

Simple and easy to use Android framework for creating geolocation games.

License

Notifications You must be signed in to change notification settings

Robyer/Gamework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Gamework

An easy to use Android framework for creating geolocation games.

Definition of game scenario is located in *.xml file which allows easy reconfiguration - often without changing any application code.

How to use

  1. Create your Android application (with Activities, etc.)
  2. Include Gamework library into your project
  3. Create file with game scenario (*.xml)
  • Look at GameworkApp / assets / example.xml to understand scenario structure
  1. Create your game service by inheriting cz.robyer.gamework.game.GameService class and implement needed methods:
  • getGameNotification()
  • onGameStart()
  • onEvent()
  1. Don't forget to add definition of your service into AndroidManifest.xml
  2. Now you can start game by startService(intent) with Extra String name "filename", whose value represents filename of scenario in your assets folder

Example of start game service:

Intent intent = new Intent(this, GameService.class);
intent.putExtra("filename", "example.xml");
startService(intent);

Example of own listener for game events:

if (GameService.isRunning()) {
    GameService game = GameService.getInstance();
    game.registerListener(new GameEventListener() {
        @Override
        public void receiveEvent(GameEvent event) {
            if (event.type == UPDATED_LOCATION) {
                ...
            }
            ...
        }
    });
}

License

Gamework library is licensed under Apache License Version 2.0.

About

Simple and easy to use Android framework for creating geolocation games.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages