My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Links

ComineGL Game Library

The Comine Game Library(ComineGL) is a streamlined C/C++ API focused on writing games to learn programming in a fun and simple way.

Tutorials

Tutorials and videos can be found at http://comine.com in the ComineGL Section.

Please Always Download the latest version of the library when running the Tutorials

The ComineGL API is constantly being extended to add more features which the tutorials explain. An older version of the library may not work with a new feature discussed in a tutorial.

---

The example example how easy it is start up the game engine. The code consists of a single instance variable in C++ which automatically initializes the game engine. When the the variable goes out of scope, the engine automatically de-initializes.

// Exampe #1: Simple Program to get started

#include <ComineGL/ComineGL.h>

int main(void)
    {
    // Create an instance of the Game Engine with an output
    // Window of 400 pixels by 400 pixels
    CGLEngine engine(400,400);

    // Perform the Game Loop
    CGLGameLoop();

    return 0;
    }

Next example demonstrates, how easy it is to load up a quake level with collision detection.

#include <ComineGL/ComineGL.h>

int main(void)
	{
	CGLEngine engine(600,600);
	
	// Load up quake pk3 file
	CGLZipFileAdd("map-20kdm2.pk3");

	// Load up castle mesh as id 1
	CGLMeshLoadFile(1,"20kdm2.bsp");

	// Load up Scene Node 10 from mesh 1
	CGLNodeLoadMesh(10,1);

	// Load up a Camera First Person Shooter Camera 
	//  as id 0.  Set position as (1000,1000,1000)
	CGLNodeLoadCameraFPS(0);
	CGLNodeSetPosition(0,1000,1000,1000);

	// Enable Collision response with node 0(camera)
	// and node 10(Castle) with the given mesh 1.
	CGLNodeAnimatorAddCollisionResponse(0,10,1,5,50,-0.5);

	engine.GameLoop();
	return 0;
	}

Powered by Google Project Hosting