Free Games Programming Libraries and Source Code
Free game development kits, source code, and game programming libraries
Free Game Programming Libraries and Source Code
Fancy developing your own games? The games 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 Amazon.com.
Note that following the list of game development frameworks and libraries below is a list of the source code of some famous games. They are mentioned here in case you want to learn from the famous games, or perhaps even modify them.
Free 2D and 3D Game Engines, Game Programming Libraries and Source Code
- 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.
- 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.
- 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.
- 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.
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.
- Unreal Development Kit
Unreal Engine 3, the game engine used by lots of games, is available free of charge to developers for non-commercial and educational use. It features real world physics using Nvidia's PhysX engine (see the Free Physics Engines page), an integrated editing environment, a multi-threaded rendering system with a 64-bit HDR rendering pipeline, a high level scripting language, built-in networking, real-time shaders, an animation editor, particle effects, artificial intelligence (AI), 3D location based sound, etc. (There're too many things to even begin listing here, and I don't know where to start, so read their documentation yourself.) Note: the source code is not available, just the engine and tools.
- 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.
- Arianne RPG - Multiplayer Online Engine
Arianne RPG 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 sourceforge page for the project.
- 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.
- 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).
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).
- SDL - Simple Directmedia Layer
SDL is a GNU LGPL multimedia library that allows your programs to use audio, the keyboard, mouse, joystick, 3D hardware (via OpenGL) and 2D video framebuffer. The site mentions that the library is used by MPEG playback software, emulators and various games. Operating systems supported include Linux, Windows, BeOS, MacOS Classic, Mac OS X, FreeBSD, OpenBSD, Solaris, IRIX and QNX. Code is also available for Windows CE, AmigaOS, Dreamcast, Atari, NetBSD, AIX, OSF/Tru64, RISC OS and Symbian OS. You can access the library with C, C++, Ada, Eiffel, Java, Lua, ML, Perl, PHP, Pike, Python, Ruby and possibly others.
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.
- SCI Studio
SCI Studio allows you to create adventure games like Sierra's King Quest, Space Quest, Police Quest, Leisure Suit Larry and Quest for Glory, using the very game engine that Sierra used for those games. The SCI game development system and the tools necessary for creating SCI games run on Windows 95, 98, NT, 2000, ME, XP and is free. The site also has documentation, tutorials, an SCI script compiler and an SCI disassembler, a demo SCI Quest game (a multiroom demo game with inventory, doors, etc), source code to SCI Studio itself, etc.
- Strategus Real-Time Strategy Game Engine
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
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.)
- 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).
- ClanLib Game SDK
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.
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.
- 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++).
- Doom 3 source code
This is the source code for the Doom 3 game from id Software, direct from id Software's ftp site. Note that id Software also makes available the source code of several of its other games (eg, Doom, Quake, etc); see elsewhere on this page (the page you're looking at). Versions are available for Windows, Mac and Linux.
- Heretic and Hexen
Activision and Raven have released the source code for the well known Heretic and Hexen games have been released under the open source GNU General Public License ("GPL"). You can use them as the basis to create games licensed under the GPL, or even just use them as a means to learn how to write your own games. (Or, if you want to find out why they were such hits in their time, compile it and play it.)
- Hexen II: Hammer of Thyrion
Based on the source code for Hexen II, the Hammer of Thyrion is a port of the Hexen II and HexenWorld source code (released under the GNU GPL) to Linux, BSD and Mac OS X. It also includes continued support for Windows, which was already supported in the original source code. The code base features bug fixes and some new features. Both source code and binaries (executables) for the program are available for the supported operating systems.
The Unix version of the source code for SimCity, the well-known simulation program that allows you to build cities, is available under the GNU General Public License (with additional terms). The open source version is renamed Micropolis (since the "SimCity" name is trademarked), and can be compiled under Linux as well as Windows. Although not a programming library, it is listed here since, as an open source software, it can form the basis of your simulation software if you wish.
- Microsoft MechCommander 2
Microsoft has released the source code for Mech Commander 2 under their Shared Source licence. Note that you should read the licence to find out whether it is suitable for your purpose before using the code.
- Apolyton Civilization Call to Power II
(To get the source code from the above link, click the "CtP2 Source Code Project FAQ" forum post and read it to find the appropriate links.) The source code for Apolyton Civilization Call to Power 2 is available. Note that you should read the licence, which has a number of restrictions, to find out whether it is suitable for your purpose before downloading or using the source code.
QuakeII.NET is a port of the Quake II game engine to native and managed C++ under Microsoft Visual Studio .NET 2003. Note: you can find a free version of Visual Studio listed on my Free C and C++ Compilers page though I'm not sure if the free version is sufficient for this port. The code has also been extended to allow the display of radar of items in the Quake world.
This is a port of Wolfenstein 3D (see elsewhere on this page) to numerous platforms, including Windows, Linux, Dreamcast, GP2X, etc. It is open source. Precompiled binaries are available for Windows.
- Wolfenstein 3D for the iPhone
The open source Wolfenstein source code (listed elsewhere on this page) has been ported by its creators to the iPhone, and the source code is available for free from Id Software. Those who are interested in John Carmack's notes on the development can check out his write-up on it. Wolfenstein 3D is a very well-known first person shooter (FPS) game released in the 1990s for MS-DOS.
- Quake III Arena, Quake III Team Arena, Quake II, Quake, Doom, Wolfenstein
Id Software makes available the source code to a large number of their games, including Quake III Arena, Quake III Team Arena, Quake II (released under GNU GPL), the original Quake (also GPL), Doom (Linux-only version, since the DOS version uses a third party sound library), and Wolfenstein.
Can't Find What You're Looking For?
Search the site using Google.
How to Link to This Page
It will appear on your page as: