Free Games Programming Libraries and Source Code

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.
Micropolis
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.
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.
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).
SpriteCraft Freeware 2D Game Engine
Among the features of the SpritCraft 2D game engine are a high level interface for handling game objects and events, the ability to create and use tile maps and particle systems, arranging sprites into hierachies, and a script language based on JavaScript. The engine is based on COM technology, so you can interface to it from Visual Basic, Delphi, C++ and other languages that supports COM objects.
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.
Xgame - X11 Game Programming Library
Xgame is a widget that allows you to create windows, read the keymap, display transparent sprites, etc, with Xlib and Xpm. It works under Linux, FreeBSD, SunOS, NetBSD, and probably others. It does not have any sound support.
Allegiance
The source code for the game Allegiance, a multiplayer space-combat game, is available from Microsoft Research. The website does not specify the licence under which the source code is distributed.
Pygame
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.
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).
Golden T Game Engine
Golden T Game Engine is a 2D game engine written in Java. The engine supports GIF, PNG, JPG, mouse and keyboard input, MIDI, MP3, WAV, OGG, sprite management, built-in collision check, high-resolution timer, etc. It may be used in your games free of charge, provided you credit the engine's creators.
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.
Allegro
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.
QuakeII.NET
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.
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.
Quake III Arena, Quake III Team Arena, Quake II, Quake
Id Software makes the Quake source code available from their site, including Quake III Arena, Quake III Team Arena, Quake II (released under GNU GPL), and the original Quake (also GPL).
Doom
The Doom source code is available from Id Software for non-profit use. This source code, unfortunately for DOS users, only compiles on Linux because apparently the DOS version uses a third party sound library. Note that the above link leads to a downloadable file.
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
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.
Pathlib
Pathlib is a C library for finding optimal paths for objects in a map, timing objects and their movements, collision detection and solving of deadlocks. The library appears to be free.
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++).
GGL Game Library
This library provides a high level API for game programmers with support for graphics, devices, sound, Aritifical Inteligence (AI), real-time video, loading of graphics formats, advanced sprite management, network support, maps, etc. It is written in C and is currently developed under Linux.
Id Software's Wolfenstein
This is the free 3D engine that drove Id software's famous Wolfenstein program. If you are writing game software, you probably cannot afford to ignore this.

0 comments: