Starpoint Arena - Extension guide

Starpoint Arena is easy to extend. Learn how!

Extending the game

Self implemented items, computer figures and fogs can easily be added without modifiying the core game. Simply put a selfmade JAR-file containing the necessary classes into the /lib folder, and all images and WAV-files into the folders /pics and /sound. Starpoint Arena will identify all additional items, figures and fogs during initialization and provide them in the quest editor.

Creating new items

New Items must be derived from classes com.starpoints.game.Item or com.starpoints.game.ItemPermament. All items that have an immediate effect when picked up or when being used derive from class item, all items that can be added to a figures inventory, need to inherited ItemPermanent. All main functionality for game handling is implemented in these base classes, special behaviour can be implemented in the following methods: For reactions to certain events during game event listener interfaces from the com.starpoints.game.listener package can be implemented.
If items should be moved around the field this should be done in method performFieldEffect() or onBeUsed() by calling method Game.registerThingMove() to handle the move correctly with other things moves, create the animation for painting etc.
Access to the game is provided through method getGame().
Creation of other items should always be done by using method one of the Game.createItem()-methods.
For painting purposes an item should provide a PNG which should have a transparent background, and a size maximum of 105x75 px, which is the size of the point images as well. The image name (without .png-suffix) must be returned by the getImageName() method - for animated item display this method is called on each UI update.
Sounds to be played need to be provided as Wave-Files (at least for Win desktop application) in the sound folder. The item might define sounds by overriding methods getPickUpClip() or getUseClip(), return the spund file name (without suffix).

Creating new figures

New Computer enemies must be derived from classes com.starpoints.game.ComputerFigure (or one of the figure subclasses in com.starpoints.game.figure). All main functionality for game handling is implemented in this base classes, special behaviour can be implemented in the following methods:

See API-Doc for details.

Game integration for experts

For usage in editor games all additional classes are integrated automatically. For League integration etc. you will need to modify some Ini-files.
The Starpoint Arena game is configured by some ini-files (SP_Levels.ini for 1 player game, SP_Levels2.ini for multi-player game, SP_League.ini for league games) containing the Computer figure settings, the level designs etc.

Items can simply be integrated in the game by putting their fully classified classname in the item configuration of each level.

Documentation of the level-initialization file settings.

Computer figures can (but not necessarily need) to be specified in the SP_Figures.ini file, which defines the figure properties and the implementing class.

Documentation of the figure-initialization file settings.