Engine Overview

Engine overview

The engine's main development goal was to create a quick, powerful and fully extensible game engine.
The result was a linear-execution, interrupt-enabled engine, that can render the action result in many different ways.

linear-execution means that a game action is a file that contains the action script in simple code rows, without needing the initialization of any other functions or classes.
interrupt-enabled means that the engine provides the ability to create scriptable hooks that a future script can be hooked in and executed there.

The result can be rendered in different ways, so that it can be displayed or handled by different kinds of handlers without any modification on the original action code.
For example: the contents of a bag can either be shown on a new pop-up window in HTML format, or shown on a dynamic window created by Javascript, that handles JSON data. In both cases, the action code is the same, but the result is rendered in 2 different ways (HTML and JSON)

Technical information

All the game actions are performed through POST/GET requests to the index.php file. The parameters can be sent with the request are the following:

  • a= The action to be executed. The engine will run the action specified (found on /data/engine/actions) using the appropriate action information (found on /data/engine/actions.manifest)[/*:m]
  • m= The output mode to be selected. Usually, this is automatically set by the action manifest, but there are cases the data has to be shown in a different way. If this is neither specified by the manifest file, nor by the request, 'html' will be selected as default (output processors are found on /engine/outputprocessors)[/*:m]
  • iface= The interface the output processor shall use. This is usually used by the html output processor, and specifies the SMARTY template to be chosen (found on /data/interfaces).[/*:m]
  • buffered= The second output processor to use. This is used if you want to redirect the data received from the first output processor[/*:m]
  • json= JSON-encoded variables that will be expanded and merged with the $_RESULT array. (This is mostly used by Javascript)[/*:m]
Nevertheless, most of the actions are just executed with the "index.php?a=action" format, since they have a configuration file (called manifest file) that contains all the remaining information.

[/]