Initial Configuration
The initial configuration must be run in order to upload and use a new game on the system.
Upon startup, main.js looks for a file named savedConfiguration.txt in the application root directory. If this file doesn't exist then the initial configuration app is loaded, otherwise the system uses a pre-existing database and continues straight to the Test Arena.
To get the initial configuration to run again, just delete the savedConfiguration.txt file.
JSON GameStates
JSON Game states are used to communicate between your java Game class and your Game javascript file. See JSON Game States to learn more about these game states, what components they must include, and see some examples.
What makes up a Game?
A Bot!Battle! Game consists of 4 components that must be uploaded to the initial configuration page.
-
Game Name: This name will be URL encoded and then used both in local storage file paths and urls to all game specific files and resources.
-
All files uploaded and derived from your uploads to initial configuration page will be stored in
-
application_root/local_storage/game_modules/[Game Name]
-
-
All game specific hosted files will be available at urls rooted at
-
/game/[Game Name]
-
-
-
Game Rules: A pdf file containing the rules of the game.
Hosted at: /game/[Game Name]/rules
-
Game.java file – Please refer to the following java doc for help writing this class and implementing the GameInterface.
-
Game Javascript - [fileName].js
-
Hosted at: /game/[Game Name]/javascript
-
The built in test arena javascript file (testArena.js) will automatically load this file when the test arena page is loaded.
-
This file must implement a global javascript object named GAME that has a number of required functions that are called directly by the built in test arena javascript file. See the Game js Documentation for detailed descriptions of these functions.
-
See the Test Arena Developer's Guide for more insight into when these methods are called and how they interact with the Test Arena.
-
-
Game Resources: A zip archive containing any additional files and folders that you would like to be hosted by Bot!Battle!
-
Hosted at: /game/[Game Name]/resources/[Unzipped Resources]
-
This allows you to upload sprites, images, audio, and any anything else that your game javascript file might require to display and animate the game to the user.
-