Difference between revisions of "Castle Game Engine"

From Free Pascal wiki
Jump to navigationJump to search
(category)
(Reflect features of Castle Game Engine 7.0, more screenshots, updated youtube link)
(25 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 (core engine may be used under GNU LGPL, with "static linking exception" like FPC RTL), developed in nice object-oriented way, only for FPC/Lazarus. The engine is not dependent on LCL, Lazarus components are just comfortable "extras".
+
* 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.
  
== Screenshot (VRML browser in Lazarus) ==
+
* Many graphic effects are available: physically-based rendering, shadows, mirrors, bump mapping, shader effects, gamma correction. Rendering is done through OpenGL or OpenGLES.
  
[[Image:kambi_vrml_browser.jpg]]
+
* 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].
  
== Lazarus components ==
+
* The user interface is cross-platform and supports anchors and automatic scaling.
  
Major components that you can drop on the form:
+
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.
# TKamOpenGLControl: descendant of the standard TOpenGLControl that makes it easy to add our engine 2D controls. In particular you can add a scene manager to handle and render your 3D world.
 
# TKamVRMLBrowser: more simplified descendant of TKamOpenGLControl, with scene manager already created. Allows you to easily load any 3D model, acts as a ready VRML browser.
 
  
You just drop TKamVRMLBrowser on the form, and call
+
== Screenshots ==
  
<code>
+
glTF 3D scene with outlines:
  Browser.Load(FileName);
 
  Browser.Scene.Spatial := [ssRendering, ssDynamicCollisions];
 
  Browser.Scene.ProcessEvents := true;
 
</code>
 
  
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 Browser.Controls list, and 3D objects to Browser.SceneManager.Items.
+
[[File:castle_game_engine_scene_outlines.png|500px|]]
  
To install Lazarus components, download the engine sources, and see inside "<tt>packages/</tt>" directory. You want to install packages <tt>kambi_base.lpk</tt> and <tt>kambi_components.lpk</tt>.
+
Using gizmo to design 2D game:
  
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/examples/vrml/lazarus_vrml_browser/</tt> directory.
+
[[File:castle_game_engine_gizmo2d.png|500px]]
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]]
+
"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:Components]]
 +
[[Category:Graphics]]
 +
[[Category:Games]]
 +
[[Category:Game Development]]

Revision as of 22: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