Mission engine

Decription
The idea is to give a sense of purpose to the player, to build the storyline and improve game comprehension in the early stage.

You get new missions by chatting with a "central computer" (or whatever suits the story), who would give you instructions.

Sample mission
To describe how the engine would work, a sample "first" mission is provided below in source code format. Basically, that's the one a new player get the first time you connect to the game. The following screenshots illustrate how it works from a player perspective (the mission differ slightly between the screenshots and the source code - the source code is the reference).



Here you can just click on "Reply". Notice that the HackIt bar is not displayed at first. (see the chat section below to get more details about the chat framework, based on AjaxIM).



You don't actually see the answer you make : ) This little trick works quite well in practice.



The first mission allows to introduce the game elements, effectively making it a kind of tutorial.



The chat reacts to your actions, and rewards successful completion of mission objectives.

Source code
The source of the mission. It is the whole content of the file to load by the rest of the system, and should be self-sufficient. It is also object-model oriented, and the code of the engine should not rely on global variables - the necessary object code must be written to support it.

Mission Engine - Introductory Mission Code

Directory structure

 * The game must load all the files in a given directory, and expect to find a subclass of the Mission class inside.
 * The mission scripts must not use any global variable.
 * Details about some of the objects accessible to the missions programmer:
 * Mission - abstract class for defining missions
 * $this-&gt;Player - Contains all the variables from the player that is kept over different sessions
 * $this-&gt;Session - Contains all the session-specific variables

Chat system

 * It is based on Ajax IM
 * Modifications of the framework must be avoided, and if necessary be preapproved and kept minimal
 * In all cases, player-to-player chat features must be kept

Requirements

 * See Requirements and deliverables for patch submission