Core Concepts

From Archon Wiki
Revision as of 20:47, 16 February 2016 by Phil (talk | contribs)
Jump to navigation Jump to search

Summary

Archon is a family of engines build on a common core of functionality which includes a scripting language, 3D renderer, and other basic components for games. Iteration is the key driving aim of the engine, which is why you can iterate shaders, scripts, and textures without leaving a running game.

Archon is also based on the idea of allowing us to support developers as fully as possible. Control of the codebase allows for new features and requests to be turned around in a matter of hours, rather than weeks or until some unknown release window.

Scripting

Scripting allows a developer to control all aspects of the game design at all levels from the UI to game mechanics. The system has been designed to be resilient to bugs (hard to crash) as well as providing detailed feedback of errors during development. It also includes an integrated debugger. Scripts can be reloaded at any time while the game is running, even if structures or variables have been changed, with all data still valid.

The basic scripting syntax is similar to the C language, and supports structures and arrays.

#define MAX_DATA 8  // macro expansions are supported

struct TData  // define a structure
{
  char name[32] ;
  int value ;
  int data[MAX_DATA] ;
}

TData gData[256] ;  // global variable, these are shared across scripts

FUNCTION ProcessData(int index)  // define a function
{
TData a ;

  a = gData[index] ;

  a.value += 1 ;
  a.data[0] = a.value ;

  gData[index] = a ;  // we could of course just operate on gData[index] directly

  return a.value ;  // functions can only return int values
}

Scripts are hooked into the system at a variety of points, ranging from UI events and updates, to rendering of controls or 3D objects. The script framework needed to (for example) customise a UI screen is common, so developers need only write the logic that is needed.

Graphics

Archon is built for high quality graphics using Shader Model 3.0, which allows for high quality visuals while still running on a wide variety of machines - critical given the ongoing popularity of laptops.

An importer allows models and other assets to be built in a variety of tools and exported as industry-standard FBX files. These can then be previewed and tweaked in the tool before exporting as compact and quickloading game files. The tool also allows for custom shaders to be applied to models and sub-meshes.