Lite-C

Lite-C is a programming language for multimedia applications and personal computer games, using a syntax subset of the C language with some elements of the C++ language. Its main difference to C is the native implementation of multimedia and 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.

Lite-C
DeveloperAtari, Inc
First appeared2007
Stable release
8.45 / February 9, 2014 (2014-02-09)
OSWindows XP, Vista, 7, 8
Licensefree
Websitewww.3dgamestudio.de/litec.php

Lite-C claims to allow very fast programming with a minimum of code, and easy access to non-programmers. For this, the developer provides a 25-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 A8 rendering engine.

History

The lite-C language and compiler was originally developed in 2007 by Conitec, Inc. for Atari, Inc., with the focus on creating computer games by non-programmers. Since 2010, lite-C is also used for defining automatic trade algorithms in day trading software.

Features

Lite-C has the following differences to standard C:

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

Lite-C supports rudimentary classes and function overloading, but does not support advanced language concepts such as inheritance, polymorphism, or operator overloading.

Examples

The following lite-C program prints "Hello World", then plays a movie file and exits.

void main()
{
   printf("Hello, World!"); // message box
   screen_size.x = 400;
   screen_size.y = 400; // resize the window
   int handle = media_play("greetings.mpg",NULL,50); // start a movie in the whole window at volume 50.
   while(media_playing(handle)) wait(1); // wait until movie was finished
   sys_exit(NULL);
}

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

void main()
{
   level_load(""); // open an empty level. you can use NULL instead of ""
   ENTITY* sphere = ent_create("sphere.mdl",vector(0,0,0),NULL); // create sphere model at position (0,0,0)
   while(1) {
      sphere->pan += 1; // rotate the sphere with 1 degree per frame
      wait(1);  // wait one frame
   }
}
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.