Difference between revisions of "Castle Game Engine"

From Free Pascal wiki
Jump to navigationJump to search
m (Fixed right-aligned Infobox)
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Features ==
+
{{Castle_Game_Engine}}
 +
{{Menu_Game_Development}}
  
[http://castle-engine.sourceforge.net/ Castle Game Engine] (previously "Kambi VRML game engine") allows you to render 3D models in various formats. In particular, support for [http://castle-engine.sourceforge.net/vrml_x3d.php VRML / X3D] format is very versatile. You can define animations, interactions, scripting, shaders and many more in VRML/X3D, so you get a quite capable 3D game engine in the end.
+
[https://castle-engine.io/ Castle Game Engine] is a cross-platform 3D and 2D [[Game Engine|game engine]]. It provides an extensible API to create and manage 3D objects, with out-of-the-box levels, items, intelligent creatures and more. It support 3D models and animations in various formats, in particular [https://castle-engine.io/vrml_x3d.php very versatile VRML / X3D], but also Collada, Wavefront OBJ, and Spine JSON, that allows 2D animations. Many graphic features are available, like shadows, bump mapping, mirrors, screen effects and shaders.
  
Rendering is done through OpenGL. We can use OpenGL context initialized in any way, including Lazarus [[OpenGL|TOpenGLControl component]], our own TGLWindow class (which allows you to create windows with OpenGL context, menu bars and dialog boxes, completely without the LCL), or any other library capable of creating GL context (glut, SDL).
+
The engine can be used to compile both desktop (Linux, Windows, Mac OS X) and mobile games (Android, iOS).
  
The engine homepage is http://castle-engine.sourceforge.net/. In particular, [http://castle-engine.sourceforge.net/engine.php this page lists all the engine features].
+
Rendering is done through OpenGL or OpenGLES2.
  
The engine is open-source (the core engine may be used under GNU LGPL, with "static linking exception" like FPC RTL), developed in a nice object-oriented way, only for FPC/Lazarus. The engine is not dependent on LCL, Lazarus components are just comfortable "extras".
+
It is component based.
  
== Screenshot (VRML/X3D browser in Lazarus) ==
+
The engine can be used just as a set of units and components. You can also use the [https://github.com/castle-engine/castle-engine/wiki/Build-Tool engine build tool] to easily compile and package your games, e.g. for Android or iOS.
  
[[Image:kambi_vrml_browser.jpg]]
+
The engine is open-source --- the core engine may be used under GNU LGPL, with "static linking exception" like FPC RTL, so you can make both open- and closed-source games. Developed using a clean Object Pascal, for FPC/Lazarus.
  
== Lazarus components ==
+
== Screenshots ==
  
Major components that you can drop on a form:
+
VRML/X3D browser in Lazarus:
# TCastleControl: descendant of the standard TOpenGLControl that makes it easy to add our engine 2D controls and 3D objects. Has a scene manager instance (as TCastleControl.SceneManager) that collects information about your whole 3D world.
 
# TCastleScene: loaded 3D model (that may contain animation etc.).
 
  
You just drop TCastleControl on the form, and call
+
[[Image:kambi_vrml_browser.jpg]]
 
 
<syntaxhighlight>Scene.Load(FileName);
 
Scene.Spatial := [ssRendering, ssDynamicCollisions]; // if you want collisions
 
Scene.ProcessEvents := true; // if you want animations and interaction
 
 
 
Control.SceneManager.MainScene := Scene;
 
Control.SceneManager.Items.Add(Scene);</syntaxhighlight>
 
  
and you're done. Animations work, rendering in OpenGL works, navigation and key/mouse sensors work, etc. For more advanced uses, you can add 2D controls to Control.Controls list, and more 3D objects to Control.SceneManager.Items.
+
FPS example game:
  
To install Lazarus components, download the engine sources, and look in the "<tt>packages/</tt>" directory. You probably want to install packages <tt>castle_base.lpk</tt> and <tt>castle_components.lpk</tt>.
+
[[Image:castle_game_engine_fps_game.jpg]]
  
For more examples, see the "<tt>examples</tt>" subdirectory in engine sources.  For an example VRML/X3D browser (and viewer for other 3D models) done with Lazarus, see the <tt>castle_game_engine/examples/lazarus/model_3d_viewer/</tt> directory.
 
Full [http://castle-engine.sourceforge.net/reference.php API reference] and more high-level [http://castle-engine.sourceforge.net/vrml_engine_doc.php documentation about VRML/X3D handling] are available.
 
  
Enjoy! Author: [[User:Michalis|Michalis Kamburelis]]
+
==External links==
 +
* [https://www.youtube.com/channel/UCq9jJ5ivIXC5VEWiUAfxBxw Castle Game Engine YouTube channel]
 +
* [https://castle-engine.io/features.php More complete list of engine features.]
 +
* [https://castle-engine.io/documentation.php Getting started]
 +
* [https://castle-engine.io/apidoc/html/index.html API reference]
 +
* [https://www.patreon.com/castleengine Patreon page]
  
 
[[Category:Components]]
 
[[Category:Components]]
 
[[Category:Graphics]]
 
[[Category:Graphics]]
 
[[Category:Games]]
 
[[Category:Games]]
 +
[[Category:Game Development]]

Revision as of 14:15, 16 January 2020

English (en) suomi (fi) français (fr)

Game Development

Castle Game Engine is a cross-platform 3D and 2D game engine. It provides an extensible API to create and manage 3D objects, with out-of-the-box levels, items, intelligent creatures and more. It support 3D models and animations in various formats, in particular very versatile VRML / X3D, but also Collada, Wavefront OBJ, and Spine JSON, that allows 2D animations. Many graphic features are available, like shadows, bump mapping, mirrors, screen effects and shaders.

The engine can be used to compile both desktop (Linux, Windows, Mac OS X) and mobile games (Android, iOS).

Rendering is done through OpenGL or OpenGLES2.

It is component based.

The engine can be used just as a set of units and components. You can also use the engine build tool to easily compile and package your games, e.g. for Android or iOS.

The engine is open-source --- the core engine may be used under GNU LGPL, with "static linking exception" like FPC RTL, so you can make both open- and closed-source games. Developed using a clean Object Pascal, for FPC/Lazarus.

Screenshots

VRML/X3D browser in Lazarus:

kambi vrml browser.jpg

FPS example game:

castle game engine fps game.jpg


External links