Recent

Author Topic: How does Castle Game Engine compare with engines like Unity, Godot and Unreal?  (Read 3829 times)

vfclists

  • Hero Member
  • *****
  • Posts: 1013
    • HowTos Considered Harmful?
I assume it may not be on the level as Unity and Unreal, but is it comparable to Godot?

FWIW I don't know much about the gaming scene and not in a position to make any meaningful judgments.

What other engines are there with good pascal compatibilitiy?
Lazarus 3.0/FPC 3.2.2

Eugene Loza

  • Hero Member
  • *****
  • Posts: 674
    • My games in Pascal
Well, I must admit most likely I'll be very biased - I program in Pascal since mid-90s, plus myself have made a few small contributions to Castle Game Engine. But personally for me "the same feature" takes roughly twice less time to implement in Pascal/Castle Engine than in C#/Unity3D. It even sounds like a joke: after work I return to my hobby project in CGE and I get genuinely surprised that I don't have to wait for 1-2 seconds after each click in Editor and don't have to wait for 20 seconds after switching from code editor to Editor.

Of course the amount of features may not be as impressive, lacking Asset Store and a huge number of tutorials in the first place, or some platform/OS-specific tools like AR Foundation or DirectX renderer. But as an inartistic programmer I make more logic-heavy games, and currently mostly in 2D, and up to now Castle Engine has only benefits compared to Unity for my hobby projects. Personally for me it's important to "be in control" - with both CGE and Pascal offer me both high-level and low-level tools equally conveniently.

I'm not familiar with Godot engine or Unreal, so cannot compare those. One big recent feature of Godot is an Editor that runs on Android devices, not sure of its capabilities but this fact alone is very impressive.

As for Pascal engines, unfortunately I didn't try any of those myself, but the first one that comes to my mind is GL Scene; I believe it is no longer under active development. Some time ago there was also Terra Engine, but to my knowledge it is now abandoned. I see several active topics on this forum dedicated to ZenGL, seems like it's a 2D-only engine. There is also Apus Engine - in active development.

I also believe there are good Pascal headers available for some popular game development frameworks, like SDL2 and Allegro. That's on top of the fact that depending on the game genre even bare FPC can be used for game development (true roguelikes use ASCII for graphics :)) or some bigger components like BGRA can be used for game development without any additional engines, if the game doesn't require more complex features.
My FOSS games in FreePascal&CastleGameEngine: https://decoherence.itch.io/ (Sources: https://gitlab.com/EugeneLoza)

michalis

  • Full Member
  • ***
  • Posts: 140
    • Castle Game Engine
( Disclaimer: I'm the author / project lead of Castle Game Engine, and it's practically a project of my life, so naturally I'm not objective :) But I'll try to be objective, and actually point out some bigger missing things in CGE -- and what do we plan to do do address them. )

Some relevant links:

  • List of CGE features: https://castle-engine.io/features .

    While it's a long list :), it also implies some things we lack in CGE compared to some others.

    Looking at platforms: In CGE we support a lot of platforms (desktops - Windows, Linux, FreeBSD, macOS, mobile - Android, iOS, consoles - Nintendo Switch), but not everything.

    E.g. VR platforms, WebGL, consoles like XBox and PS. We have plans to add all these platforms, see e.g. Web plans, Oculus post, I also own now both Xbox and PS5 dev kits (and I have knowledge how I did the port to Nintendo Switch).

    On the upside, in regards to platforms, CGE supports fully Raspberry Pi, Pine64 products based on Aarch64, and generally we put quite some effort to support even rather old hardware. Not all other engines support them :) That's of course thanks to FPC supporting them without any issue.
  • Our roadmap also contains a number of TODOs of CGE too. Some of those are already present in other engines.
  • We have a documentation Castle Game Engine Overview For Unity Developers that outlines some correspondence (and some differences) between Unity and CGE API. Long story short, there are quite a lot of differences, but also at a high level we do expose a similar feature set. We are both "general" game engines (for any kind of 2D, 3D game), we both feature an editor, in both our cases you need to actually do some coding in OOP language to achieve anything non-trivial.

    ( Though e.g. Unity is pushing much more the number of things you can do "without coding", with https://unity.com/features/unity-visual-scripting . Same with Unreal and blueprints. We don't have such thing in CGE. Maybe one day -- but that's a more distance future. For sure, for a long time, you will need to know Pascal to do anything non-trivial. But practically, that's also how it is in Unity in my experience -- almost all Unity projects I've seen rely on C# coding, there's limit to what you can (reasonably) do by just clicking in the editor. )
  • We don't have an equivalent of asset store / packages for CGE. Our closest equivalent are


Note: I'm speaking about CGE at some conferences, https://castle-engine.io/conferences . I think my recording from GIC 2022 presents nicely a bit of my "world view" -- https://www.youtube.com/watch?v=Ad3UywYyRGU , why we develop "yet another game engine", what are the challenges and gains :)

Handoko

  • Hero Member
  • *****
  • Posts: 5154
  • My goal: build my own game engine using Lazarus
I tried both Castle Game Engine and Godot but that was long ago. Things have changed, as Castle Game Engine has been improved fast, many new features have added recently. But still, I believe Godot is much better.

Castle Game Engine's features summary:
  • Windows, Linux, macOS, FreeBSD, Raspberry Pi, Android, iOS, Nintendo Switch ... checked.
  • glTF, X3D, sprite sheets, Spine ... checked.
  • Text, fonts, shaders, bump mapping, animation blendind/cross-fading, physically-based rendering, shadow maps, shadow volumes, gamma correction, fog, occlusion culling, OpenGL ES 3.0 ... checked.
  • Visual editor, networking, sound, physics, particles ... checked.
  • Optimization and profiling, native and fast code using modern Pascal, build tool ... checked.
Those sound impressive, right? But this was my experience with Godot:

My experience with Godot


I downloaded and tried Godot. I opened one of their sample project, that was a 3rd person isometric-view demo, something similar to Diablo. It run without any issue on my Linux computer. I followed the instruction to download/install an extension for exporting the project to Android. With some clicks that project that run on Linux now run on my Android phone. Cross-platform, screen resolution/aspect/orientation and all the headache issues that a game programmer needs to solve, all had been handled by Godot. That was really jaw-dropping.

What other engines are there with good pascal compatibilitiy?

As far as I know Godot invented their own scripting language and there is no Pascal extension available. If one is good in Pascal language, Castle Game Engine should be a good choice.

And these are less-featured options:

GLScene


It can be installed on Lazarus using Online Package Manager. I tried it, no complaint about the engine. Unfortunately more than half of the demos couldn't run on Linux, mostly because file-naming issues. It is clear GLScene's developers are using Windows.

ZenGL

This project had been halted for a while. A fellow in the forum, made many improvements recently. It can be used to build Android games, of course the steps for generating Android binaries aren't so easy compare to Godot. ZenGL currently has no 3D support. ZenGL started as 2D engine but recent versions now have full functionality of OpenGL/ES.
https://forum.lazarus.freepascal.org/index.php/topic,66337.msg508286.html#msg508286

Allegro.pas

I tried it, it had no 3D feature. The documentation was impressive. If you're good in Pascal, you should have no problem using it. After days of studying it, I was able to create Furious Paladin:
https://forum.lazarus.freepascal.org/index.php/topic,35313.msg253114.html#msg253114

SDL

I haven't tried it. But I know a member here, who was 13 if I remember correctly, could make simple game using Pascal+SDL, which is similar to Google's Dinosaur Game after days of studying it.



Not popular but it is worthwhile to mention:

ZGameEditor

It is built using Delphi and their scripting language is very Pascal-like, maybe it uses PascalScript.

nxPascal

It's development is slow but their demos look good.
https://wiki.freepascal.org/Choosing_a_Game_Engine#nxPascal
« Last Edit: February 25, 2024, 06:47:22 pm by Handoko »

speter

  • Sr. Member
  • ****
  • Posts: 349
Handoko, very interesting, thanks!

You gave a feature summary of CGE; could you please do the same for Godot!?

Also, why do you believe Godot is much better than CGE!? From your text it sounds like you found it easier to use, is that your view?

cheers
S.
I climbed mighty mountains, and saw that they were actually tiny foothills. :)

Guva

  • Jr. Member
  • **
  • Posts: 84
What other engines are there with good pascal compatibilitiy?

Well, if you need it in 3D, the best option is CGE.
You can also try raylib. But in this case you will need to plan and write everything manually. Only code, only hardcore.

Here is a 3D game template as an example on raylib
https://github.com/GuvaCode/TrueSpace

https://youtu.be/VbkmfL3iuLw?si=3_8QGkL63ZK9M5BL

Handoko

  • Hero Member
  • *****
  • Posts: 5154
  • My goal: build my own game engine using Lazarus
What other engines are there with good pascal compatibilitiy?

Well, if you need it in 3D, the best option is CGE.

I agree too. For Pascal users who want to develop 3D games, Castle Game Engine is the best.

You can also try raylib.

RayLib looks interesting. But I haven't tried it so I have no comment about it.

Handoko, very interesting, thanks!

You gave a feature summary of CGE; could you please do the same for Godot!?

Godot Game Engine's features summary
  • Target platforms: Windows, macOS, Linux, Android, web browsers, iOS, consoles.
  • Editor features: scene tree, script, support for external script editors (Visual Studio Code, Vim, etc), debugger, visual profiler, performance monitoring.
  • Rendering: Vulkan, OpenGL, OpenGL ES, WebGL.
  • 2D graphics: sprite, polygon, line, AnimatedSprite2D, parallax layers, 2D lighting, font, GPU-based and CPU-based particles, 2D HDR.
  • 3D graphics: HDR, perspective & orthographics cameras, physically-based rendering, real-time lighting, shadow mapping, global illumination, reflection, decals, sky, fog, GPU-based and CPU-based particles, post-processing (tonemapping, glow/bloom, etc), resolution scaling.
  • 2D/3D tools: tilemaps, Path2D, built-in meshes, GridMaps, constructive solid geometry, procedural geometry generation, Path3D, visual shader editor.
  • Scripting: OOP design pattern, cross-language scripting, GDScript, C#, GDExtension (C, C++, Rust, D, etc).
  • Others: audio, input mapping system, gamepad, pen/table input with pressure support, networking, internationalization, GUI system (buttons, checkboxes, text entry, dropdown menus, scrollbars, etc), theming, movie maker mode.
Actually the features list is several pages long, if you're interested to see it, here:
https://docs.godotengine.org/en/stable/about/list_of_features.html#

Why I think Godot is better than CGE

I could be wrong but I think Godot is better than CGE, because:

  • CGE is very feature-rich, it has almost all the features of Godot. But Godot has a bit more: both GPU-based and CPU-based particles, built-in theme editor, etc.
  • Godot has bigger user base, finding tutorials is easier for Godot. For example, go to YouTube and search for "Castle Game Engine Android", you will get only a few results. Do the similar but on Godot, you will get more results.
  • Unless you're a Pascal fan, or you maybe be interested to know Godot's scripting supports varieties of languages: C#, C, C++, Rust, D, Haxe, Swift. They even invented their own scripting language GDScript, which they believe is better for game development.
« Last Edit: February 23, 2024, 07:24:04 am by Handoko »

michalis

  • Full Member
  • ***
  • Posts: 140
    • Castle Game Engine
I could be wrong but I think Godot is better than CGE, because:

Thank you for this nice summary!

As CGE author, I'm looking at such comparisons through the lens "how can we make CGE better", and such concrete and constructive comparison is really very valuable. ( I believe I also saw a feedback from you about CGE a few years back, and this was productive too -- pushing CGE into being more friendly to newcomers. )

Those are all good points. Some notes what we have / what we plan to do:

  • Particle systems: It is indeed a weak point that we don't have a particle system "built-in" into CGE.

    But for now, we have 2 external projects (by Trung Le aka Kagamma) that provide this functionality for CGE projects. See the "Additional Components", https://castle-engine.io/additional_components.php , links to "Particle Emitter" and "Effekseer Integration". They both are GPU-accelerated. The 2nd approach ("Effekseer Integration") is nicer in that it has a ready particle editor, and ready repository of existing effects. The 1st approach ("Particle Emitter") is more "how to add particles in a way completely native to CGE, and friendly to CGE editor" and it is likely what we will eventually extend and incorporate into CGE core one day.

    People do use them -- e.g. recently we had a post about "Gem Islands" game on https://forum.castle-engine.io/t/gem-islands-first-playable-version/ . The author used Effekseer, from what I saw.

    Improving this is mentioned on the roadmap, https://castle-engine.io/roadmap#particles .
  • Ease of deploying on Android: We could indeed make it even better.

    I think our support for Android is quite nice already: If you install Android SDK and FPC cross-compiler once (following https://castle-engine.io/android ), connect your Android using USB, then CGE will do the rest -- just switch CGE editor "Run -> Platform" to "Android", hit "F9" (from any CGE cross-platform project, e.g. any example), and it will build for you Android APK, deploy it to your device, show the logs from running application. You don't need to know anything about Android specifics, Java etc. -- we will "sum up" the Pascal compilation result + Android project template, adding Android services ( https://castle-engine.io/android_services ) you declared.

    We also have automatic UI scaling, much like Unity, that works out-of-the-box. So mobile UI looks sensible. I saw you mentioned this as Godot advantage in post above. UI scaling in CGE works much similar, and it is enabled in all our examples and new projects by default.

    That said, I agree we could be better on Android. The fact that user still has to do the instructions https://castle-engine.io/android once is not optimal. We could largely eliminate it. Other engines or IDEs (Unity, Godot, actually Delphi too for FMX) provide more "works out-of-the-box" experience, as they bundle cross-compilers for Android and Android SDK in this way or another. We want to follow this in CGE too.
  • We plan to make much more YouTube videos, yeah :) A primer "how to develop game for Android" is one of the things on the TODO list.
  • Good point about search in the docs. We actually had a search at some point, but disabled it, as it used some Google snippet and wasn't really looking good. I shall look to resurrect this feature using DuckDuckGo :)

    Other than that, I can point out we write a lot of docs. I'm happy with some parts of the docs, e.g. stuff on https://castle-engine.io/viewport_and_scenes and tutorials on https://castle-engine.io/viewport_3d#_add_a_scene_showing_the_3d_car_adjust_camera_lights_and_navigation , https://castle-engine.io/wp/2023/12/02/two-new-articles-to-learn-castle-game-engine-and-a-fun-toy-to-play-bad-way-to-play-chess-aka-3d-physics-fun/ . But of course there are things we want to document better (e.g. our docs for 2D games have some blanks where we tell you "this works similar to 3D, just use this-and-this camera and viewport settings" -- but this is not optimal for people who come specifically looking only to develop 2D games).

Thank you again. This is excellent food for thought. Keep it coming in this thread, everyone! :), I am very happy from this constructive thread.

Handoko

  • Hero Member
  • *****
  • Posts: 5154
  • My goal: build my own game engine using Lazarus
Thank you Castle Game Engine's developers for making and improving it. This is a game development tool that makes Pascal's users proud.

Actually I already tried it very long ago, maybe 10 years or more, its name was Kambi VRML. I had problem making its demo to run on my computer. I contacted the author via email (if I remember correctly) but I didn't think I would get any response. I was wrong, I got reply that guided me to fix the issue.

I'm not a very creative person, my passion isn't about developing games but to understand the science behind the graphics and game. Making a graphics/game engine isn't easy but I really enjoying it. Kudos to CGE team.

After being financially supported using Patreon, CGE has improved a lot. If I am allowed to voice my suggestions, here are somethings I believe will boost CGE development and increase its user base.

WordPress has the largest market share as a cms/web development tool, one of the contributing factor - I believe - is it has good management for developers and designers to earn money by writing plugins and themes for it. Anyone can submit their plugins or themes to WordPress repository and the submission will be checked. All the submissions must be free to use, but authors are allowed to make money by providing pro versions. That is a win-win solution.

If CGE has an official marketplace and good management for handling digital license, it will attract more contributors. If there are more both paid and free extensions, scripts, graphics, 3D models, audio, etc, more people will be attracted to use it.

I frequently mentioned Allegro has 'great' documentation. See it yourself:
https://liballeg.org/a5docs/trunk/index.html

Almost or maybe all of the pages there, have sample source codes. That really makes a big difference. Not all programmers are good learning by reading the documentation, some are good by studying example codes.

One of my friends, uses Unreal Engine a lot for 3D visualization. He told me its killer feature is Nanite.
https://www.youtube.com/watch?v=-50MJf7hyOw
https://www.youtube.com/watch?v=JLUzi3y_uvM

I don't know how they can do it. I only know it is similar to but better than LOD. If I remember correctly, I heard it has something to do with cluster culling and DirectX 12. Maybe CGE can try to do research on this technology.
« Last Edit: February 23, 2024, 04:28:03 pm by Handoko »

Joanna

  • Hero Member
  • *****
  • Posts: 768
@michalias I saw that you recommended GitHub recently and wanted to know if you were aware that GitHub blocks people from certain countries and will not let people who aren’t logged in see code in public repositories?

I’ve also heard that everything in there Including private repositories is harvested and used to develop ai without giving developers credit for their work...

I’m glad you have your own website for project  :D
« Last Edit: February 24, 2024, 01:05:37 am by Joanna »
✨ 🙋🏻‍♀️ More Pascal enthusiasts are needed on IRC .. https://libera.chat/guides/ IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channel #fpc  Please private Message me if you have any questions or need assistance. 💁🏻‍♀️

michalis

  • Full Member
  • ***
  • Posts: 140
    • Castle Game Engine
@michalias I saw that you recommended GitHub recently and wanted to know if you were aware that GitHub blocks people from certain countries and will not let people who aren’t logged in see code in public repositories?

I’ve also heard that everything in there Including private repositories is harvested and used to develop ai without giving developers credit for their work...

I’m glad you have your own website for project  :D

Can you give details, cite to some confirmed sources? What users in what countries are being blocked by GitHub? We use GitHub in CGE, and in my company, and in a number of other companies I worked with. In open-source, public, and closed-source, private projects. I haven't heard so far that anyone is blocked from GitHub.

Anyhow:

- Public GitHub repositories are available for viewing without the need to log-in. You can easily check it.

- Anyone is welcome to mirror CGE repository, using GIT, anywhere else.

- CGE is relying on GitHub just as myriad of other software around the world.

I'll leave the concerns "private repositories are harvested for AI" as off-topic. CGE doesn't have anything private we are concerned about. GitHub indeed uses it's data to train Copilot. Everyone can go ahead and read about it on Internet and make their opinion. Let's not spread FUD.

vfclists

  • Hero Member
  • *****
  • Posts: 1013
    • HowTos Considered Harmful?
@michalias I saw that you recommended GitHub recently and wanted to know if you were aware that GitHub blocks people from certain countries and will not let people who aren’t logged in see code in public repositories?

I’ve also heard that everything in there Including private repositories is harvested and used to develop ai without giving developers credit for their work...

I’m glad you have your own website for project  :D


Can you give details, cite to some confirmed sources? What users in what countries are being blocked by GitHub? We use GitHub in CGE, and in my company, and in a number of other companies I worked with. In open-source, public, and closed-source, private projects. I haven't heard so far that anyone is blocked from GitHub.

Anyhow:

- Public GitHub repositories are available for viewing without the need to log-in. You can easily check it.

- Anyone is welcome to mirror CGE repository, using GIT, anywhere else.

- CGE is relying on GitHub just as myriad of other software around the world.

I'll leave the concerns "private repositories are harvested for AI" as off-topic. CGE doesn't have anything private we are concerned about. GitHub indeed uses it's data to train Copilot. Everyone can go ahead and read about it on Internet and make their opinion. Let's not spread FUD.

US companies are not allowed to trade with business and individuals from countries which the US Govt considers "terrorist" or on some proscribed list of one sort or the other.

It is probably why ZenGL (Russian? Ukraine war?) has switched to Sourceforge and I suspect it may be why Free Pascal maintains its sourceforge based system, though that could be just down to history.

The problem is even if some projects prefer to be apolitical the benefits of Github and Gitlab are too compelling to resist

Countries like Sudan, Iran, North Korea, Syria, Yemen etc are on the list.  If you check the terms and conditions of a lot of US companies selling some goods and services you will see them listed.
Lazarus 3.0/FPC 3.2.2

michalis

  • Full Member
  • ***
  • Posts: 140
    • Castle Game Engine
If CGE has an official marketplace and good management for handling digital license, it will attract more contributors. If there are more both paid and free extensions, scripts, graphics, 3D models, audio, etc, more people will be attracted to use it.

Indeed, I agree with all you said. I know that having an equivalent of "asset store" is a big thing that we'll have to enable (enable technologically, provide infrastructure to manage packages, features in editor to use them...; but also "enable" by encouraging people to actually contribute there). And it will take time to grow, but also be worth it. We need an ecosystem of components and graphic assets.

I don't know how they can do it. I only know it is similar to but better than LOD. If I remember correctly, I heard it has something to do with cluster culling and DirectX 12. Maybe CGE can try to do research on this technology.

Nanite is a new thing in UE 5. It is indeed amazing :) But it's not really something we can hope to have in CGE anytime soon, from my rather quick reading about it. It's a combination of a few technologies and huge undertaking to try to do.

But we do have room open in CGE for many other optimizations and improvements, and we can get nice rendering, comparable to e.g. Unity HDRP pipeline I believe (realistic lighting and materials, reflection probes, shadows). This is more within our reach, we actually have some similar features but not as performing (yet) and not as comfortable to setup (yet).  To be clear, we do not plan to make Unity HDRP clone. Just achieve similar features, looking at high-level picture. E.g. we want to rely on Khronos and MaterialX for realistic materials using standards. (see e.g. cool things for glTF: https://castle-engine.io/roadmap#gltf_material_features ).

michalis

  • Full Member
  • ***
  • Posts: 140
    • Castle Game Engine
US companies are not allowed to trade with business and individuals from countries which the US Govt considers "terrorist" or on some proscribed list of one sort or the other.

It is probably why ZenGL (Russian? Ukraine war?) has switched to Sourceforge and I suspect it may be why Free Pascal maintains its sourceforge based system, though that could be just down to history.

The problem is even if some projects prefer to be apolitical the benefits of Github and Gitlab are too compelling to resist

Countries like Sudan, Iran, North Korea, Syria, Yemen etc are on the list.  If you check the terms and conditions of a lot of US companies selling some goods and services you will see them listed.

Interesting, thank you.

I recall SourceForge was/is also blocking those countries, SourceForge is also a US company. There was some backlash about it long time ago. Though I see SourceForge has later given projects a choice ( https://sourceforge.net/blog/some-good-news-sourceforge-removes-blanket-blocking/ ).

I wonder how exactly are these users blocked by GitHub (and other companies, which I guess would put GitLab on par) -- are they prohibited from accessing anything on `github.com` domain? Can they do `git clone`? Can they download files from GitHub releases? Can they circumvent the problem using VPNs, or are these blocked -- from what I read, at least in some countries you mention, using VPNs is not so trivial anyway.

Anyhow. To get back to things I can actually do something about: if there's anyone from affected countries, who is genuinely blocked by GitHub but wants to try CGE -- just let me know. Let me know how exactly you are blocked, what you actually can do and what you cannot, from what domain, from what protocol. I will organize a mirror for you, with CGE downloads or source code. If you have trouble reaching me, there are various ways listed how to reach me personally and 100% securely at the bottom of https://michalis.xyz/ .

Joanna

  • Hero Member
  • *****
  • Posts: 768
@michalias
The person I know of is in Syria. He uses vpn to circumvent I believe.
Personally I think it’s deplorable that GitHub will not let me see public repositories that people link to, it didn’t used to be that way. To be fair I am trying to access git hub from different computer and it looks hung up in the screen after I clicked the code link.

It’s fine that you want your code to be public. But I am of the opinion that you should be given credit for it. Ai removes information about who wrote the code and claims credit for other people’s work.

This was already discussed in depth here in threads started by people trying to promote ai.
https://forum.lazarus.freepascal.org/index.php/topic,65538.msg499972.html#msg499972

Dzandaa provided some links scroll up a little to see them
« Last Edit: February 24, 2024, 03:23:44 am by Joanna »
✨ 🙋🏻‍♀️ More Pascal enthusiasts are needed on IRC .. https://libera.chat/guides/ IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channel #fpc  Please private Message me if you have any questions or need assistance. 💁🏻‍♀️

 

TinyPortal © 2005-2018