Presentation about Castle Game Engine ( https://castle-engine.io/ ) at GIC 2022 conference. We briefly show Castle Game Engine features then talk about important reasons and things you should take into account if you want to be as crazy as me -- and develop your custom engine :)
2. The Plan is to tell 2 things
1. Why
● And what decisions we made
● And which decisions were good
2. Presentation of the engine
● Download it and try yourself
● It is actually used to make production games (on Steam, Android, iOS, Nintendo Switch)
https:/
/castle-engine.io
13. Why
1. Open-source game engine (100% open-source, including tooling,
support etc.)
2. Choose one good language for both engine and games
3. Use open standards for data formats, i.e. 2D and 3D graphics
14. ● Long long time ago: What Blender supports as export?
○ -> A lot of limited formats
○ -> And this cool thing called VRML 1.0
○ It has a spec. I can implement it just as well as anyone else.
○ It has real hope for tools around it. Because everyone, like me and
Blender, can read this spec.
○ Good (scalable) design. Someone (many someones!) thought
about future when designing it.
Decision: Use open standards for 3D and 2D
15. ● The reasons for choosing open standards for 3D models have been
confirmed.
● Data standards are your most important dependency, because you cannot
change them easily, invest wisely into things that will continue to exist in the
future.
We focus on glTF and X3D now
16. X3D
● I did a few improvements
around X3D, e.g. for
"compositing shaders" (think
Unity surface shaders, but a
bit better :) ).
● I'm a Web3D member and
liaison Web3D <-> Khronos.
17. glTF
● Great design from Khronos
● Great set of features for
gamedevs (skinned animation,
PBR, efficiency…)
● Suitable to be read at runtime (no
need to transform meshes before
they are ready for runtime)
● Ecosystem of stuff around it, like
Blender support
Coming soon to Castle Game Engine
thanks to it:
● Build your 3D environment from
ready models on Sketchfab (they
do have API and can return glTF!)
18. Decision: Pascal
● Clean (type-safe) language
● Code engine and games in the same language (every user is contributor)
● Compiled to native code
● Higher-level language that scales - OOP, units, generics
● Cross-platform (desktop, mobile, WebAssembly)
● General purpose, so existing libraries for everything
○ database
○ xml, json
○ ai, blockchain
● Integration with any existing library with C API
○ any renderer, sound library, physics - we can use everything
19. Fast compilation
$ castle-engine cache # once after installation
$ cd castle-engine/examples/viewport_and_scenes/cars_demo/
$ castle-engine clean # build from scratch, like a new project
$ time castle-engine compile
...
real 0m2,513s
$ time castle-engine package --target=android # 32 and 64-bit devices
...
Build cars_demo-0.1-android-debug.apk
...
real 0m10,188s
20. Easy to pick up if you know any OOP language
https://castle-engine.io/modern_pascal
21. Automation rocks and it is free for open-source
GitHub Actions, GitLab CI - build your games using their free runners, just copy a "recipe" we prepared.
22. Cross-platform
● Desktop (Linux, Windows, macOS, FreeBSD...)
● Raspberry Pi too
● Mobile (Android iOS)
● Nintendo Switch
Coming soon:
● VR (Oculus Quest, using OpenXR)
● WebGL (FPC WebAssembly compiler is waiting!)
● XBox (we got a devkit)
24. Evangelizing your technology
Eye-opening: CoRecursive podcast #040: Tech Evangelism with Gabriel Gonzalez.
● Think about making the core of your thing small (start vertical) and make that core shine
● Think about your slogan/catchphrase/elevator pitch -- not because it's PR, because it is your
priority compass
Have fun while developing because it will take a long time.
25. Declarative is good
● Declarative API - "your things have properties and are inter-connected"
○ (vs "your things can act to do something").
● Declarative is simpler
● Declarative is serializable
● Declarative enables editing
● Declarative allows to change how it works easier (e.g. use a rendering technique that is multi-pass
or make batching)
● Pascal components and RTTI were designed from the ground-up for this: classes have properties
and an object inspector shows them and you can serialize them.
26. OpenGL(ES) still rocks
● We have lots of enticing alternatives - Vulkan, Direct3D, Metal.
● OpenGL(ES)-like API is the only API that really works everywhere, today.
○ (and where it doesn't there's Angle, MetalAngle etc.)
27. Controlling your technology
● Amazing when a big thing comes together.
● Big thing is not a one finished thing -- it is a tool that opens possibilities to make more things.