Lite-c

From Wikipedia, the free encyclopedia

Lite-C is a programming language for multimedia applications and computer games, with a syntax similar to the C programming language. Its main difference to C is the native implementation of computer game related objects like sounds, images, movies, GUI elements, 2D and 3D models, collision detection and rigid body physics. Lite-C executables are compiled instead of interpreted. Lite-C runs on 32-bit and 64-bit Windows XP or Vista operating systems.

For being easily accessible to non-programmers, the lite-C package contains a simple 24-lesson workshop that especially deals with the game and multimedia related objects of the language.

Lite-C supports the Windows API and the Component Object Model (COM); therefore OpenGL and DirectX programs can directly be written in lite-C. It has integrated the free A7 rendering engine.

[edit] Example

The following lite-C program opens a 3D window and displays a spinning sphere

void main()
{
   level_load(""); // open an empty level
   ENTITY* sphere = ent_create("sphere.mdl",vector(0,0,0),NULL); // load sphere model
   while(1) {
      sphere.pan += 1; // rotate the sphere
      wait(1);  
   }
}

[edit] Features

Lite-C has the following differences to standard C:

  • Native multitasking support
  • On the fly compiling
  • Supports external classes (OpenGL, DirectX, Windows API)
  • Implementation of the A7 rendering engine
  • Function set for display/manipulation of 3D models
  • Function set for rigid body physics
  • Function set for vector and matrix functions
  • Function set for GUI objects
  • Function set for playing sound and movie files
  • Native support of DirectX 9 functions
  • Small footprint - ca. 15 MB with compiler, IDE, debugger

[edit] External links

Languages