Difference between revisions of "Choosing a Game Engine"

From Lazarus wiki
Jump to navigationJump to search
(Mention CGE improvements in version 7, we have visual editor and you can create new games easily)
Line 29: Line 29:
  
 
It's probably the most powerful Pascal game engine. It is a game framework not a game builder, you have to integrate it into your Lazarus/FPC to use it. Learning the Castle Game Engine is much harder than ZGameEditor and the resulting binaries are much bigger too. I wish I had more time so I could explore or even use it. Castle Game Engine is really an interesting project.
 
It's probably the most powerful Pascal game engine. It is a game framework not a game builder, you have to integrate it into your Lazarus/FPC to use it. Learning the Castle Game Engine is much harder than ZGameEditor and the resulting binaries are much bigger too. I wish I had more time so I could explore or even use it. Castle Game Engine is really an interesting project.
 +
 +
Note: This section is an ''old'' assessment of [https://castle-engine.io/ Castle Game Engine] (around version 6). Since then, lots of improvements around the ease-of-use and RAD (''rapid application development'') have been done for engine version 7. The engine has a [https://castle-engine.io/manual_editor.php visual editor for games], build tool, easy templates (click "New Project" in the editor and you will have a working 3D or 2D game, that instantly builds for all platforms), over 100 examples and documentation (as manual and videos) and [https://github.com/castle-engine/castle-engine/wiki/New-Features-in-Castle-Game-Engine-7.0 lots of other features to easily use models in any format (glTF, sprite sheets...) etc.]. Just try the engine yourself :)
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 38: Line 40:
 
|-
 
|-
 
|Import models form many formats, graphics effects, physics, AI, etc
 
|Import models form many formats, graphics effects, physics, AI, etc
|It is a game framework, learning a game framework is hard
+
|It is a game framework, learning a game framework is hard (old comment)
 
|-
 
|-
 
|Can create both 2D and 3D games
 
|Can create both 2D and 3D games

Revision as of 12:00, 9 March 2021

ZGameEditor

Website: http://www.zgameeditor.org/

This game builder is created using Delphi and its game scripting language is very similar to Pascal (a simplified version of Pascal). Pascal lovers should check this one first. I managed to create a simple vertical scrolling spaceship game in the first few hours of my trying it.

Advantages Disadvantages
Multi platform support: Windows, Linux, macOS, Android The editor runs on Windows only
Can create both 2D and 3D games Requires some programming skills
Can create Windows screensavers
Easy to use built-in audio synthesizer
The generated stand-alone executable is very small
Its scripting language is very similar to Pascal

Castle Game Engine

Website: https://castle-engine.io/

It's probably the most powerful Pascal game engine. It is a game framework not a game builder, you have to integrate it into your Lazarus/FPC to use it. Learning the Castle Game Engine is much harder than ZGameEditor and the resulting binaries are much bigger too. I wish I had more time so I could explore or even use it. Castle Game Engine is really an interesting project.

Note: This section is an old assessment of Castle Game Engine (around version 6). Since then, lots of improvements around the ease-of-use and RAD (rapid application development) have been done for engine version 7. The engine has a visual editor for games, build tool, easy templates (click "New Project" in the editor and you will have a working 3D or 2D game, that instantly builds for all platforms), over 100 examples and documentation (as manual and videos) and lots of other features to easily use models in any format (glTF, sprite sheets...) etc.. Just try the engine yourself :)

Advantages Disadvantages
Multi platform support: Windows, Linux, FreeBSD, macOS, Android, iOS, Nintendo Switch Requires good programming skills in Pascal
Import models form many formats, graphics effects, physics, AI, etc It is a game framework, learning a game framework is hard (old comment)
Can create both 2D and 3D games
Good demos and documentation

GLScene

Website: http://glscene.sourceforge.net/wikka/

This 3D graphics library is very powerful. I thought I'd build some cool 3D games and applications using it. Unfortunately their development focus is mainly on Windows. I monitored it for years but there was not much progress for Linux. It didn't run well on my Linux computer so I abandoned it.

Advantages Disadvantages
Multi platform support: Windows, Linux, macOS Focus is mainly on Windows
Full featured 3D graphics engine Does not run well on Linux
Good demos Where is the documentation?
Zero deployment setup Requires good programming skills in Pascal

Allegro.pas

Website: FPC and Allegro

Allegro.pas is a wrapper for the Allegro game framework. Learning a game framework is hard, luckily the official website of Allegro provides detailed documentation so learning it is relatively easy. After only a few days learning it, I managed to create my demo game Furious Paladin.

Furious Paladin's binary: http://graphicslearning.com/furious-paladin-tutorials/

And this is the source code: https://sourceforge.net/p/allegro-pas/code/HEAD/tree/TRUNK/demos/

Advantages Disadvantages
Multi platform support: Windows, Linux, macOS, iPhone, Android Relies on OpenGL or Direct3D to create full 3D games
Audio, font, video playback, some 3D basic drawing, joystick, keyboard, physics How do you use Allegro.pas to create Android games?
Detailed documentation Requires good programming skills in Pascal

Simple Directmedia Library

Website: FPC and SDL

I never really tried it. But I know a kid (who was a member here) created a simple 2D horizontal scrolling game using FPC + SDL only weeks of learning it. Read more about SDL here

nxPascal

Website: nxPascal

Not as famous as the others and it lacks of documentation. But it has potential. Read more in the Forums: https://forum.lazarus.freepascal.org/index.php/topic,35313.msg253463.html#msg253463

BGRABitmap or TCanvas

If you want to create simple 2D games like Tetris, Snake, Pong, Arkanoid, TCanvas and BGRABitmap is totally capable of doing it. I wrote a 2D scrolling spaceship game using only TCanvas line drawing and it's working well. I then tried to switch the graphics library to use BGRABitmap, it works. Any TCanvas program can easily switch to using BGRABitmap, which offers more graphics features. Read more:

Advantages Disadvantages
Multi platform support: Windows, Linux. macOS
Relatively simple and easy to learn than the others They handle graphics only
BGRABitmap can draw simple 3D objects Not suitable for graphics intensive games
Zero deployment setup Requires good programming skills in Pascal

LAMW + jCanvasES2

I am now exploring the possibility of creating Android games using LAMW + jCanvasES2. I already managed to create my Windows/Linux 2D graphics engine using OpenGL. Maybe I'm too ambitious, I want it to also run on Android. LAMW + jCanvasES2 is the combination to make Lazarus produce Android binaries that allow us to use OpenGL ES2. Unfortunately, it crashes too often. I'm examining it, hope I can fix the crashes.

Acknowledgement

This content was extracted from Handoko's post in the Games sub-forum. Some minor grammar edits have been made and formatting added.