Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

lxmcf/virgil-runtime

Repository files navigation

Virgil

🚨 Virgil development is currently on hold 🚨

🚧 API is not yet final, API changes are to be expected 🚧

< Description | Dependencies | Compiling | Compiling >

What is Virgil?


Virgil is the result of 'if it ain't broken, break it and reinvent the wheel lmao', a basic 2D game engine built using Raylib and Vala aimed at beginners to experienced developers running a Linux desktop (Windows coming soon™).

Dependencies


  • raylib
  • glib-2.0

Virgil uses very minimal depencies and due to being base on Raylib; has no runtime dependencies!

To install raylib, follow the instructions HERE then come back and continue reading on...

Compiling


Compiling will output the main runtime executable as well as the C header and Vala VAPI for game module development, you can follow the below steps on any supported platform to build Virgil:

meson setup build
meson compile -C build

# This will compile the engine and sandbox
build/virgil --test-build

Alternatively you can simply run:

./build.sh

Congratulations! you shoud now see the 'sandbox' application and are well on your way to game development!

How to use?


To create a basic application that print's 'Hello World!' to the console...

// filename: Game.vala
using Virgil;

public class MyNewGame : Game {
    public override void start () {
        print ("Hello World!"\n);
    }
}

[ModuleInit]
public Type register_game (Module module) {
    return typeof (MyNewGame);
}

Now you can build this using the command line as follows:

valac -o game.so --pkg gmodule-2.0 -X -fPIC -X --shared virgil.vapi Game.vala --library Game

Releases

No releases published

Packages

No packages published

Languages