Fenix

From GPWiki

Files:GUITutorial_warn.gif The Game Programming Wiki has moved! Files:GUITutorial_warn.gif

The wiki is now hosted by GameDev.NET at wiki.gamedev.net. All gpwiki.org content has been moved to the new server.

However, the GPWiki forums are still active! Come say hello.

A retro style 2D platformer made in Fenix
Enlarge
A retro style 2D platformer made in Fenix

Fenix is an easy to use interpreted language designed primarily for 2D games.

Contents

About Fenix

Its main feature, is the pseudo-parallel programming similar to Coroutines, i.e. it gives the developer the chance of programming different processes (enemies, characters, etc.) separately, and the engine will synchronize them. This makes video game developing much easier. Most of its features are now based on Simple DirectMedia Layer (SDL). This makes Fenix a very portable project. Other features include full 2D support (scaling, transparencies, blend ops...), 16 bpp color, sound (.ogg, .mod, .it, .s3m, .wav), joystick support, mode7 and extensions via libraries.

Features

  • Fast sprite blitting with rotation, scaling, animation and transparency
  • Pixel perfect collisions
  • PNG graphic support plus a custom archive format (.fpg)
  • Parallax background scrolling
  • Compiled for Windows, Mac, Linux (including GP2X console) and many more systems
  • OGG, WAV and MOD/XM/S3M/IT sound support
  • Based on SDL

A small language example

program fenixexample;
global
    int png_ship;
begin
    // Load a PNG graphic (alternatively could use an FPG archive)
    png_ship = load_png("example.png");

    // Create a process of type "spacecraft"
    spacecraft(100, 100);

    repeat
        frame;
    until(key(_esc))
end

// "graph" (graphic), "x" and "y" are predefined local variables
process spacecraft(x, y)
private
    int health;
begin
    graph = png_ship;
    health = 100;

    loop
        if (key(_left))
            x -= 4;
        end
        if (key(_right))
            x += 4;
        end
        if (collision(type enemy))
           health -= 20;
        end
        frame;
    end
end

process enemy()
begin
// You get the idea ;)
end

Games made using Fenix

Fenix programming resources