Free Game Programming Libraries and Source Code

Free game engines, development kits, source code, and programming libraries

Free Game Engines, Programming Libraries and Source Code

Fancy developing your own games? The game engines, programming libraries and development kits listed on this page may make your job easier. Note that there is considerable overlap between the things listed on this page and those listed on the 3D Engines / 2D Engines / Graphics Libraries and Free Physics Engines (Source Code and Libraries) pages, so you might want to check them out as well in case I've listed them on a page different from where you imagine it should be listed. Another page that may be related to game development is Free Audio, Sound, Music and Digitized Voice Libraries and Source Code page where you can get libraries and source code for managing sound. The Free 3D Content Creation Software and Free Image Editing and Drawing Tools pages may be also handy for free software that you can use to create your 3D or 2D graphics content or game backgrounds and objects.

If you are looking for more information on game programming, you might want to check out the list of books on Game Programming on

Related Pages

Free 2D and 3D Game Engines, Game Programming Libraries and Source Code

Godot Engine

Godot is a cross-platform game engine that you can use to create 2D or 3D games for Windows, Mac OS X, Linux and the mobile platforms (Android and iOS). You can also use to create web-based (HTML5) games. You can use either its scripting language or C++ to write your program. It has its own physics engine, a script editor, built-in animation system, a GUI for editing animation, video playback, audio system, multithreading, etc (too many to meaningfully list). The graphics engine uses OpenGL ES 2.0. It is released under the MIT licence.


The CryEngine is a cross-platform game engine for Windows, PlayStation 4, Xbox One, and Oculus Rift. The engine comes with a sandbox/level editor, material editor, designer tool, cinematic editor, audio controls editor, etc. It features Physically Based Rendering, tessellation, motion blur and depth of field, volumetric fog shadows, realistic vegetation, real-time local reflections, image-based lighting, anti-aliasing, screen space directional occlusion, per object shadow maps, AI system, DirectX 12 support, and so on (lots more). The engine is free for certain types of games subject to a 5% royalty (less the first 5K € of annual revenue) of your gross revenue for the game. There are other conditions as well (eg displaying their logo or mentioning the use of their engine or something like that), so you should read their licence ("license" if you use a different variant of English) agreement for the details. It comes with source code.


Phaser is an HTML5 game framework for producing games that run on the web browsers of desktop computers and mobile devices (like smartphones). You can code your games in either JavaScript or TypeScript. There are numerous tutorials that help you get started with the framework to create things like platformer games, roguelikes, Flappy Bird clones, and so on. The framework has a built-in support for input from touch screens, mouse, keyboards, etc, game physics, animation, sound, particles (eg explosions, rain, fire), device scaling (to fit any size screen) and so on.

TADS - Text Adventure Development System

The Text Adventure Development System, or TADS for short, lets you write your own interactive fiction using a language specifically designed for writing text adventure games. Originally sold as shareware in its earliest incarnation, it is now free. The system has been used to develop numerous commercial games. Like many programming languages, it is similar to C/C++ (with even complete support for the ANSI C macros), but has features intended to make it easy for you to develop text adventures. Besides text adventure games, you can also use it to write your own "Choose Your Own Adventure" type of games or Role Playing Games (RPG). The software uses HTML as its layout language and lets you integrate graphics, animations, music, sound effects, hyperlinks, etc, into your game. The program compiles your program to a platform-independent byte code that can be run on any system that has a TADS player. In other words, you can develop a game on Windows that works on Windows, Mac OS X and Linux, and vice versa. Versions of TADS are available for Windows, Mac OS X, Linux, other Unix systems, BEOS, AmigaOS and DOS.


Unity, a subset of the commercial game development tool Unity Pro, is available for use to developers subject to certain conditions (please see their website for full licensing details). It comes with integrated visual editor that makes it easy for you to build and test your comes. The graphics engine supports Direct3D and OpenGL and includes things like animated meshes, particle systems, lighting and shadows, built-in support for the NVIDIA physics engine, shaders with a number of built-in shaders, terrains, etc. 3D positional audio and stereo sound, multiplayer networking, texture and audio streaming, scripting support, and so on, are among its other features. The free version adds a splash screen to your standalone games, and a watermark to your web player games.

Weaver Framework

The Weaver Framework is a graphical 2D C library for Linux. It has support for sound files (using the Ogg Vorbis format) and graphic files (using the PNG format). It also has a scripting language that generates basic code and Makefiles for your software. The library is released under the GNU General Public License version 3 which means that means that your game will also be under the GPL by default (although you can apparently also release it under a licence compatible to the GPL). The site has some tutorials on how to use the library and there are a few sample games (a pong game, a maze game and a space war game) with source code that you can look at.

Irrlicht Engine - Open Source 3D Game Engine

This is a realtime 3D engine written in C++ that can be used from C++ and .NET programming languages like Visual BASIC, C# and Delphi.NET. It uses Direct3D (D3D), OpenGL and its own platform and driver independent software renderer. Its features include an extensible material library with vertex and pixel shader support, seamless indoor and outdoor mixing, character animation with skeletal and morph target animation, particle effects, billboards, light maps, environment mapping, stencil buffer shadows, a 2D GUI system with buttons, lists, edit boxes (etc), direct import of common mesh file formats such as Maya (.obj), 3DStudio (.3ds), COLLADA (.dae), DeleD (.dmf), Milkshade (.ms3d), DirectX (.X), Quake 3 levels (.bsp), Quake 2 models (.md2) (etc), direct import of textures (bmp, png, psd, jpg, tga, pcx, etc), 3D maths, integrated XML parser, etc. Platforms supported include Windows 98, ME, NT 4, 2000, XP, XP64, Linux, MacOS and Sun Solaris/SPARC. The engine is licensed under the zlib licence.

Marauroa Multiplayer Online Engine

Marauroa is a multiplayer online games framework and engine. You can use it to create turn based games as well as real time games. The server is coded in Java and is thus somewhat portable, and the backend uses MySQL. Python is used for your games description. The games server uses a UDP transport channel to communicate with the players. The games engine and framework is released under the GNU General Public License. Note: if you're having trouble finding the link to download the engine on their site, you can go straight to the Arianne RPG sourceforge page for the project.

Retribution Engine

This is a 3D game engine for Windows first person shooter (FPS) games. It uses OpenGL for hardware accelerated transformation and lighting and DirectSound for music and 3D sound effects. The engine supports particle effects, shaders, glow maps, volumetric fog and explosions, stencil shadows, chrome maps, weather effects, damage decals, etc. It has support for complex 3D models and a wide variety of generic weapon types (melee weapons like a fist, projectile weapons like a laser blaster, exploding projectile weapons like a rocket launcher, instant hit weapons like a pistol, beam weapons like a rail gun, grenades, and shotgun) that can be customised. It also has a scripting engine with a GUI interface that lets you create scripts without learning the scripting language. The engine comes with a variety of tools, including a level editor, a model editor and an episode editor. Also included are some freeware games. The engine is released under the GNU General Public License.

DUGL - The DOS Ultimate Game Library

For those developing games under MSDOS and FreeDOS, DUGL is a game library written in C, C++ and assembler. (The compiler you need, DJGPP, can be found on the Free C/C++ compilers page.) It supports 8 bits graphics mode, VESA 2.0LFB, and provides line drawing, 12 kinds of polygones (textured, colour, gourand, etc), loading and saving of the PCX image file format, mouse support, keyboard handler and keyboard map editor, timer, synchronisation, sound support with loadable sound drivers (includes sb16 drivers), loading of WAV sound files, IPX network protocol support, some GUI elements (buttons, textbox, checkbox, menu, message boxes, scroll bar, listboxes, etc), etc. The licence permits non-commercial use only.


Pygame is a cross-platform library with a set of Python modules (see the Miscellaneous Free Compilers for links to Python) designed for writing games. It is layered on top of the Simple Directmedia Layer, or SDL, listed elsewhere on this page (the page you are reading). Modules are provided for handling CDs, sound, the clock, fonts, joysticks, movies, drawing, events, music, the mouse, sprites, time, transformations, etc.

Pure Power Tactical Engine: PPTactical Engine

PPTactical is an engine for real-time strategy (RTS) and real-time tactics (RTT) games. The engine supports SDL and DirectX, has editors for maps and resources, scripted behaviour for units, battlegroups, missions, etc. Windows, Linux and Solaris are supported. It is released under the GNU Lesser General Public License (LGPL).


This is a C/C++ game programming library for DOS, Linux, FreeBSD, Irix, Solaris, Darwin, Windows, QNX, BeOS and MacOS X. The library provides functions for graphics, sound, player input such as the keyboard, mouse and joystick, timing (high resolution interrupt timers), 3D, compressed datafiles (LZSS), floating point mathematics, GUI (file selector, dialog boxes), etc. Graphic functions include support for vector drawing, sprites, colour palettes, bitmap fonts, hardware scrolling, triple buffering, mode-X split screens, animation functions for FLI/FLC, etc. Sound functions include support for MIDI, WAV, VOC file formats, streaming audio, the ability to modify the volume, pan, pitch, etc.

SxDL Game Development Toolkit

SxDL is a 2D and 3D Game development framework for writing games for Windows using DirectX. You use the functions in the game development toolkit to handle objects usually needed in video games such as graphics, keyboard input, mouse input, joystick input, music, sound, timing, game loops, etc. All rendering is done through predefined objects like sprites, lines, tile maps, 3D models, sky boxes, etc. This game development framework uses the C++ language, and you currently need Visual C++ (get a free version here). The toolkit is licensed under the GNU General Public License (GPL).

PLIB Portable Games Library

PLIB is an open source (GNU LGPL) games library that features sound effects, a complete 3D engine, font-rendering, GUI, networking, 3D math library, etc, that is portable across numerous computing platforms (MacOS; Windows; Unix systems like BSD, IRIX, Solaris, OS X; etc).

ColDet 3D Collision Detection Library

ColDet is a free 3D collision detection library for generic polyhedra. Intended for 3D games, it is free even for commercial purposes. There are versions for use with Microsoft Visual C++, Borland C++ and Linux (g++).

Torque 3D

Torque 3D is an open source game engine that has a 3D graphics engine with integrated PhysX support, deferred lighting, and modern shader features. It comes with a variety of editors that you can use to create your game world, including editors for creating terrain, forests, roads, rivers, shapes, materials, particles, and decals. Other features include COLLADA support, the ability to create 2 models for first person weapons (one for close-up and one for the third-person view), texture blending, the ability to import Geological Information Survey (GIS) data, a C++-like object oriented scripting language, networking support (so that you can create multi-player games), and so on. You can create Windows games as well as browser-based games with this game engine. The software is released under the MIT License.

Strategus Real-Time Strategy Game Engine

[Update: This software is longer maintained.] This real-time strategy gaming engine works across numerous platforms, including Windows, Linux, BSD, BeOS, MacOS/X, and MacOS/Darwin. It is released under the GNU GPL. It apparently has numerous features, including support for Internet play, an AI for the computer player, ability to play background music, and so on (there is no convenient list of features on their site for me to quote, at the time of this writing).

Crystal Space free 3D Engine

[Update (3 October 2022): It's possible that this project is now defunct, since the linked-to page is now served as plain text. I'm leaving the entry up for now, in case it is just a temporary server misconfiguration.] Crystal Space is an open source 3D engine licensed under the GNU LGPL and written in C++. Among its numerous features are coloured lighting, mipmapping, portals, mirrors, 3D sprites (frame based or with skeletal animation), alpha transparency, true six degrees of freedom, procedural textures, radiosity, particle systems, halos, volumetric fog, scripting, 8-bit, 16-bit and 32-bit display support, Direct3D, OpenGL, Glide and software renderer, font support, hierarchical transformations, etc. (List obtained from their website.)


[Update: This software is no longer available. ] Obsidian is "an open source 3D virtual world for Linux and OpenGL", providing an "extensible virtual world system with a fullblown multiplayer client-server architecture". (Information provided by the Obsidian website.) It features 3D headsup with texture mapping, TCP/IP (for operating across the Internet), a multiplayer client-server architecture, editable worlds and textures, interplayer communications, projectile weapons, etc.

ClanLib Game SDK

[Update: this software appears to be no longer available.] This is a platform independent game development kit that handles sound, display, input, networking, files, threading, etc, allowing you to concentrate on your game proper. It is released under the GNU LGPL and is developed for Linux and Windows. It handles 2D display (has various drawing primitives like lines, pixels, rectangles, as well as image drawing like surfaces and sprites), sound support (wave, Ogg Vorbis, MikMod, etc), input support (keyboard, mouse, joysticks), network support, 3D support (OpenGL), resource management, fonts, scripting, a GUI framework, etc. DirectX, X11, DirectFB and OpenGL are supported.

Related Pages

Newest Pages

Popular Pages

How to Link to This Page

It will appear on your page as:

Free Game Engines (Game Programming Libraries) Free Webmaster Tutorials, Scripts and Articles Free How-To Guides Free Programmers, Webmasters and Security Resources
If you find this site useful, please link to us.