Difference between revisions of "Castle Game Engine"

From Free Pascal wiki
Jump to navigationJump to search
(* mention "ProcessEvents := true" call)
(Reflect features of Castle Game Engine 7.0, more screenshots, updated youtube link)
(32 intermediate revisions by 8 users not shown)
Line 1: Line 1:
== Features ==
+
{{Castle_Game_Engine}}
 +
{{Menu_Game_Development}}
  
[http://vrmlengine.sourceforge.net/ Kambi VRML game engine] allows you to render 3D models in various formats. In particular, support for [http://web3d.org/ VRML / X3D] format is very versatile. You can define animations, interactions, scripting, shaders and many more in VRML/X3D, so you get 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]].  
  
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).
+
* You can use any 3D or 2D software to create models in various formats: [https://castle-engine.io/creating_data_model_formats.php glTF, X3D, VRML, Spine JSON, Collada...]. In particular creating game models in [https://castle-engine.io/creating_data_blender.php Blender] is fully supported, through the glTF format.
  
The engine homepage is http://vrmlengine.sourceforge.net/. In particular, [http://vrmlengine.sourceforge.net/kambi_vrml_game_engine.php this page lists all the engine features].
+
* The engine can be used to compile desktop (Linux, Windows, macOS), mobile (Android, iOS) and consoles ([https://github.com/castle-engine/castle-engine/wiki/Nintendo-Switch Nintendo Switch]) games.
  
Engine is open-source (GNU GPL >= 2), developed in nice object-oriented way, only for FPC/Lazarus (everything is in objfpc mode).
+
* You can [https://castle-engine.io/manual_editor.php design and build applications in a visual editor]. The editor utilizes a [https://github.com/castle-engine/castle-engine/wiki/Build-Tool command-line build tool under the hood]. The build tool calls FPC and some other tools to compile and run the project.
  
== Lazarus components ==
+
* Many graphic effects are available: physically-based rendering, shadows, mirrors, bump mapping, shader effects, gamma correction. Rendering is done through OpenGL or OpenGLES.
  
We have two components for now: TKamOpenGLControl (simple descendant of standard TOpenGLControl) and TKamVRMLBrowser (descendant of TKamOpenGLControl that allows you to load any 3D model, and acts as VRML browser). If your game is fully contained within a single VRML model, and you just want to "execute" it, then TKamVRMLBrowser component is for you. You just drop this on the form, from code you call
+
* Numerous services, like in-app purchases and game services, are available on mobile devices. See [https://github.com/castle-engine/castle-engine/wiki/Android-Services Android servcies], [https://github.com/castle-engine/castle-engine/wiki/iOS-Services iOS services].
  
<code>
+
* The user interface is cross-platform and supports anchors and automatic scaling.
  Browser.Load(FileName);
 
  Browser.Scene.ProcessEvents := true;
 
</code>
 
  
and you're done. Animations work, rendering in OpenGL works, navigation and key/mouse sensors work, etc.
+
The engine is open-source. [https://castle-engine.io/license.php The engine may be used under GNU LGPL with "static linking exception"], just like FPC RTL and Lazarus LCL. So you can make both open- and closed-source games.
  
To install Lazarus components, download the engine sources, and see inside "<tt>packages/</tt>" directory. You probably want to install packages <tt>(unix|windows)/kambi_units.lpk</tt> and <tt>components/kambi_components.lpk</tt>.
+
== Screenshots ==
  
For more examples, see inside engine sources --- look for "<tt>examples</tt>" subdirectories.  For example VRML browser done with Lazarus, see inside <tt>kambi_vrml_game_engine/3dmodels.gl/examples/lazarus_vrml_browser/</tt> directory.
+
glTF 3D scene with outlines:
Full [http://vrmlengine.sourceforge.net/reference.php API reference] and more high-level [http://vrmlengine.sourceforge.net/vrml_engine_doc.php documentation about VRML handling] are available.
 
  
Enjoy! Author: [[User:Michalis|Michalis Kamburelis]]
+
[[File:castle_game_engine_scene_outlines.png|500px|]]
 +
 
 +
Using gizmo to design 2D game:
 +
 
 +
[[File:castle_game_engine_gizmo2d.png|500px]]
 +
 
 +
"Escape from the Universe" game localized to Japanese:
 +
 
 +
[[File:castle_game_engine_japanese_game.jpg|500px]]
 +
 
 +
Strategy game, using Tiled to design maps:
 +
 
 +
[[File:castle_game_engine_strategy_game.png|500px]]
 +
 
 +
3rd-person camera demo:
 +
 
 +
[[File:castle_game_engine_third_person_camera.png|500px]]
 +
 
 +
3D model browser in Lazarus:
 +
 
 +
[[File:kambi_vrml_browser.jpg|500px]]
 +
 
 +
==External links==
 +
 
 +
* [https://www.youtube.com/c/CastleGameEngineX3d/ 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-unstable/html/index.html API reference]
 +
* [https://www.patreon.com/castleengine Patreon page]
 +
 
 +
[[Category:Components]]
 +
[[Category:Graphics]]
 +
[[Category:Games]]
 +
[[Category:Game Development]]

Revision as of 21:57, 22 February 2021

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

Game Development

Castle Game Engine is a cross-platform 3D and 2D game engine.

  • The engine can be used to compile desktop (Linux, Windows, macOS), mobile (Android, iOS) and consoles (Nintendo Switch) games.
  • Many graphic effects are available: physically-based rendering, shadows, mirrors, bump mapping, shader effects, gamma correction. Rendering is done through OpenGL or OpenGLES.
  • The user interface is cross-platform and supports anchors and automatic scaling.

The engine is open-source. The engine may be used under GNU LGPL with "static linking exception", just like FPC RTL and Lazarus LCL. So you can make both open- and closed-source games.

Screenshots

glTF 3D scene with outlines:

castle game engine scene outlines.png

Using gizmo to design 2D game:

castle game engine gizmo2d.png

"Escape from the Universe" game localized to Japanese:

castle game engine japanese game.jpg

Strategy game, using Tiled to design maps:

castle game engine strategy game.png

3rd-person camera demo:

castle game engine third person camera.png

3D model browser in Lazarus:

kambi vrml browser.jpg

External links