Welcome to the Gel2D Game Engine API documentation.
(brief summary of documentation)
(brief summary of game engine)
While reading, keep in mind that some class members are inherited, and are documented in the base class only, not in the inherited class.
Please note: Gel2D is in an early, possibly unstable stage of development. I recommend not attempting any full-scale games with it at this time, as the API is subject to change considerably without notice.
The following code demonstrates how to set up a minimal Gel2D application:
#include <gel2d/Basics> using namespace gel; int main(int argc, char *argv[]) { bool running = true; // Start up the game engine GelEngine::start(); // Create a new window GelWindow::createWindow("Minimal Gel2D Application", 800, 600, 32, GEL_WINDOWED, GEL_WND_MIN ); // Create a timer GelTimer timer; // Create a new sprite GelSprite sprite(Gel2dVec(128, 128), Gel2dVec(400, 300), 0); // Create a new texture GelTexture tex("./media/lyteStudio.png", IMG_PNG); sprite.setTexture(&tex); // Setup camera GelCamera cam; // Game loop while( running ) { // Lock FPS timer.setFPS(60); // Render scene GelEngine::getRenderSystem()->beginScene(); cam.render(); sprite.render(); GelEngine::getRenderSystem()->endScene(); // Poll for events GelWindow::pollEvents(); running = !GelInput::keyPressed(GEL_KEY_ESC) && GelWindow::getParam(GEL_WND_OPEN); } // Clean up and shut down GelEngine::shutdown(); }
The preceding code sets up a complete Gel2D gaming environment, displaying a textured sprite in the center of the screen.
(a few closing thoughts)
API Documentation by Mark D. Procarione | Generated by |