| ← Users | Developers → | |||||||||||||||||||
| Intro | News | view3dscene | The Castle | All Programs | Forum | Donate | Engine | VRML/X3D | Blender | |||||||||||
Castle Game Engine |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Contents:
This is a free/open-source (LGPL / GPL) 3D game engine. In short:
Our main 3D scene format is VRML / X3D, which is an open standard (you'll find you can export to it from virtually any 3D modeler), and a lot of our strength comes from it (it's a 3D scene format that can also express interactive world features, scripting etc.). Even if you don't know VRML/X3D, the whole engine is designed as a general-purpose 3D engine, and other 3D model formats are supported as well (Collada, Wavefront, MD3 and others).
We have a lot of 3D graphic features. Shaders, shadows, bump mapping, mirrors, custom viewports, screen-space effects, and much more. Just look at the screenshots on this page :)
We have a comfortable and extensible implementation of scene manager and 3D objects. You have a ready implementation of levels, creatures (with AI), items, players and other things typical to 3D games. You can extend it in many ways. You can also make your own 3D objects (if your game 3D world doesn't fit in our idea of creatures/levels etc.) by descending from T3D and adding to TCastleSceneManager.Items directly.
The engine is developed for the Free Pascal Compiler, an open-source cross-platform compiler, and the engine is cross-platform as well (Linux, Mac OS X, Windows, and more). We have Lazarus components for RAD development, although the core engine doesn't depend on Lazarus LCL and you can develop full games with pure FPC (we have our own OpenGL window management unit, if you want). The whole engine is 100% clean Object Pascal code.
The features section below on this page contains more exhaustive list of engine features, with links to detailed information.
Many demo movies about Castle Game Engine are available in Michalis Kamburelis YouTube channel.
This archive contains the whole engine sources. There are many simple example programs included (see examples/ subdirectory). Compile everything with simple "make" inside the castle_game_engine/ directory. Compile examples by simple "make examples". Or you can compile and run from Lazarus.
For more details about compiling the engine and examples see the "Introduction" page in our reference.
An important strength of our engine is that you can express a lot of stuff inside your data, that is inside VRML/X3D models. So many features of our engine (shaders, screen effects, mirrors and many many more) don't have any special ObjectPascal examples, because they are simply not needed. For simple uses, you just define what you need inside VRML/X3D file (of course, for advanced usage you can do a lot more with ObjectPascal code, and you can always build/modify VRML/X3D graph by ObjectPascal code). So be sure to grab our demo VRML/X3D models and try opening them with any engine example program (like scene_manager_basic.lpr, or even our view3dscene) — you will find that everything just works, not requiring a single line of ObjectPascal code.
Remember to install required libraries: programs developed using our engine (engine examples and normal programs) may use a couple of libraries. The full list of libraries is at the "Requirements" section at the documentation of each program, and the reference also lists the libraries in the introduction section. In short, you will most likely want to have libpng, zlib, OpenAL, and vorbisfile.
Instead of downloading the archive, you can also get the latest (bleeding-edge) engine sources from Subversion by:
svn checkout http://svn.code.sf.net/p/castle-engine/code/trunk/castle_game_engine
Exhaustive list of our engine features:
You need the Free Pascal Compiler (FPC) to use our engine. We always support and advice the latest stable (from freepascal.org) release of FPC (currently 2.6.2). Usually, we also support a couple of older FPC releases. Currently (for engine 4.0.1) FPC versions >= 2.6.0 are supported.
You may also find it comfortable to use Lazarus, which is an IDE (editor, debugger etc.) built around FPC with a visual classes library (LCL). Our engine components can be used together with Lazarus forms (although we also have an alternative window classes, independent from Lazarus LCL). Any Lazarus version based on FPC >= 2.6.0 is supported now.
The whole engine and all related programs' sources are licensed on terms of GNU General Public License. See www.gnu.org for more information about this license (including translations of it to various languages) and philosophy of free software.
Moreover, the core of the engine is also alternatively available under the more permissive GNU Lesser General Public License with the so-called "static linking exception". The idea of this exception is to allow statically linking with the engine on the same terms as dynamically linking. (Static linking is what normally happens when you compile a program using my units, without wrapping them in a DLL / Delphi runtime package.)
All this basically means that you have to share your modifications to the engine, and you can use the engine in closed-source programs.
The precise legal text of the "static linking exception" follows (it's the same as used by FreePascal Runtime Library and many other projects):
As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.
Important notes:
If you want to use the engine on LGPL terms (as opposed to more strict GPL) you must compile the engine with CASTLE_ENGINE_LGPL symbol defined in file castle_game_engine/base/castleconf.inc. Just put there {$define CASTLE_ENGINE_LGPL} line (or simply remove the beginning space in already prepared comment { $define CASTLE_ENGINE_LGPL}).
This is necessary to avoid pulling in GPL-only dependencies. For now, this is only the NURBS unit (uses GPL-only code from White_dune). This missing NURBS implementation is the only difference between LGPL and "strict GPL" engine version.
Note that LGPL stuff concerns only the engine, i.e. things inside castle_game_engine archive. The rest of the programs (view3dscene, castle etc.) are still strict GPL.