Core Concepts: Difference between revisions

From Archon Wiki
Jump to navigation Jump to search
(Blanked the page)
No edit summary
Line 1: Line 1:
= 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.
<nowiki>#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
}
</nowiki>

Revision as of 20:39, 16 February 2016

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
}