際際滷

際際滷Share a Scribd company logo
nCine: a world with custom in-house
engines is possible
Angelo "Encelo" Theodorou
1 / 62
The author 
Born in 1983, grown up with C= Amigas for ten years (1991- 2001)
Fell in love with Amiga games and its demoscene
An everyday desktop *nix user for almost 25 years
Using Arch Linux daily since 2005
Interested in low-level coding and computer graphics
Engine and graphics programmer for mobile and console games
Natural Motion's Echo engine (Clumsy Ninja, Dawn of Titans)
EA Frostbite (FIFA 18-20, Battlefield V, Battlefront II, Anthem)
Bethesda's Creation Engine 2 (Starfield)
Developing the nCine since June 2011
2 / 62
What is a custom in-house engine? 
Custom: developed alongside a game to serve its needs
In-house: tech and game teams work under the same roof
3 / 62
What is a custom in-house engine? 
Custom: developed alongside a game to serve its needs
In-house: tech and game teams work under the same roof
With lots of exceptions:
Can be reused for multiple games (RAGE)
Can be licensed to other studios (id Tech)
Can be developed by a specific division within a company (Frostbite)
4 / 62
What is a custom in-house engine? 
Custom: developed alongside a game to serve its needs
In-house: tech and game teams work under the same roof
With lots of exceptions:
Can be reused for multiple games (RAGE)
Can be licensed to other studios (id Tech)
Can be developed by a specific division within a company (Frostbite)
The opposite of this is a generic software technology
Can be used to develop different types of games
Distributed or sold by a specialized (sometimes non-game) company
Think of Unreal, Unity, CryEngine, Godot, GameMaker, 
5 / 62
What is a custom in-house engine? 
Custom: developed alongside a game to serve its needs
In-house: tech and game teams work under the same roof
With lots of exceptions:
Can be reused for multiple games (RAGE)
Can be licensed to other studios (id Tech)
Can be developed by a specific division within a company (Frostbite)
The opposite of this is a generic software technology
Can be used to develop different types of games
Distributed or sold by a specialized (sometimes non-game) company
Think of Unreal, Unity, CryEngine, Godot, GameMaker, 
Custom engines are especially employed in AAA games
But there are some notable indie exceptions 
6 / 62
Can't you just use Unity/Unreal like everyone else?
Yes, but also no. 
7 / 62
Can't you just use Unity/Unreal like everyone else? #0
Well, we all know how well it went... 
8 / 62
Can't you just use Unity/Unreal like everyone else? #1
Articles on this theme:
On the Perceived Inevitability of Unreal by Alex Tardif
Ships, Icebergs, Game Engines by Ryan Fleury
A case for building your own tech | Opinion by Dan Baker
Handmade Network
List of game engines and frameworks:
Custom Game Engines: A Small Study by raysan5
Indie Bookmarks: some indie games and their technology by Encelo
9 / 62
Can't you just use Unity/Unreal like everyone else? #2
The author is a Lead Graphics Programmer at ZeniMax Online Studios.
In-house engine development has declined over the last decade
The pool of game engine and graphics talent is shrinking
Independent game middlewares are dead (bought by Unity/Epic)
The framework and tooling infrastructure is too much work
(From "On the Perceived Inevitability of Unreal" by Alex Tardif)
10 / 62
Can't you just use Unity/Unreal like everyone else? #3
Written just after The Machinery was obliterated from the face of the Earth.
When you give up ownership, you give up your rights
You lose your agency over time, money, professional development
Something that is more abstract exposes fewer capabilities
Not everything you could do in your own engine is possible in a pre-
built game engine
The "don't reinvent the wheel" mantra diminishes ownership and scoffs at
self-reliance
(From "Ships, Icebergs, Game Engines" by Ryan Fleury)
11 / 62
Can't you just use Unity/Unreal like everyone else? #4
Written by Oxide Games' co-founder and CTO.
Innovation and unique gameplay: build a game that breaks the mold
Attract top devs who want to leave a mark, solve novel problems, work on
cutting-edge technology
Custom tech can be initially expensive, but the investments can yield long-
term savings
It seems Unity and Unreal won't stay inexpensive and perpetual
A custom engine usually compiles faster and runs faster in debug
Some games have technological requirements that off-the-shelf engines
cannot satisfy
Even off-the-shelf solutions need a technical investment for customization
(From "A case for building your own tech | Opinion" by Dan Baker)
12 / 62
Can't you just use Unity/Unreal like everyone else? #5
Computers are amazing
So why is software so terrible?
Slow to load, thirsty on batteries, crashes all the time
We made it terrible
We ignored the hardware, we glued together libraries so we didn't
have to learn, we built layers on top of layers until no one knew how
anything worked
We're building Rube Goldberg machines, and users are paying the
cost.
But there is another way
We can build software that works with the computer, not against it.
All you need is an open mind and a sense of curiosity.
(From the Handmade Network Manifesto)
13 / 62
They didn't use Unity/Unreal
Some examples from the indie ecosystem
14 / 62
They didn't use Unity/Unreal #1
Spelunky Classic, 21/12/2008 (GameMaker)
Spelunky HD and Spelunky 2 use a custom engine
15 / 62
They didn't use Unity/Unreal #2
Legend of Grimrock, 11/04/2012, by Almost Human Games (Custom)
Legend of Grimrock 2 also made with the same custom engine
16 / 62
They didn't use Unity/Unreal #3
Little Inferno, 19/11/2012, by Tomorrow Corporation (Custom)
World of Goo, Human Resource Machine, and 7 Billion Humans are all
based on a custom engine too 17 / 62
They didn't use Unity/Unreal #4
Guacamelee!, 09/04/2013, by DrinkBox Studios (Custom)
Guacamelee! 2 also on a custom engine
18 / 62
They didn't use Unity/Unreal #5
Don't Starve, 23/04/2013, by Klei Entertainment (Custom)
Most of their games are made with custom technology (Mark of the Ninja,
Invisible, Inc., Griftlands), Oxygen Not Included is made with Unity  19 / 62
They didn't use Unity/Unreal #6
Hammerwatch, 12/08/2013, by Crackshell (Custom)
Heroes of Hammerwatch and Hammerwatch 2 use a custom engine too
20 / 62
They didn't use Unity/Unreal #7
Banished, 18/02/2014, by Shining Rock Software (Custom)
His next solo game also runs on custom technology
21 / 62
They didn't use Unity/Unreal #8
Shovel Knight, 26/06/2014, by Yacht Club Games (Custom)
Pocket Dungeon made with GameMaker Studio, Mina the Hollower with a
custom engine 22 / 62
They didn't use Unity/Unreal #9
Crypt of the Necrodancer, 23/04/2015, by Brace Yourself Games (Custom)
Industries of Titan made with UE4 し 23 / 62
They didn't use Unity/Unreal #10
Victor Vran ARPG, 24/07/2015, by Haemimont Games (HaemimontSol)
All their games are made with their custom engine, including Surviving
Mars, Tropico 3-4-5, Jagged Alliance 3 24 / 62
They didn't use Unity/Unreal #11
Prison Architect, 06/10/2015, by Introversion Software (Custom)
25 / 62
They didn't use Unity/Unreal #12
Darkest Dungeon, 19/01/2016, by Red Hook Studios (Custom)
Darkest Dungeon 2 runs on Unity  26 / 62
They didn't use Unity/Unreal #13
Stardew Valley, 26/02/2016, by ConcernedApe (XNA, then MonoGame)
Haunted Chocolatier is in development using MonoGame
27 / 62
They didn't use Unity/Unreal #14
Celeste, 25/01/2018, by Matt Makes Games (FNA and MonoGame)
28 / 62
They didn't use Unity/Unreal #15
Into the Breach, 27/02/2018, by Subset Games (Custom)
Faster Than Light also made with a custom engine
29 / 62
They didn't use Unity/Unreal #16
Yoku's Island Express, 29/05/2018, by Villa Gorilla (Custom)
30 / 62
They didn't use Unity/Unreal #17
Dead Cells, 06/08/2018, by Motion Twin (Heaps)
All Shiro Games titles are made with Heaps too (Evoland, Evoland 2,
Northgard, Darksburg, Dune: Spice Wars) 31 / 62
They didn't use Unity/Unreal #18
Wargroove, 01/02/2019, by Chucklefish Games (Halley)
Wargroove2 and Witchbrook also on the same engine
32 / 62
They didn't use Unity/Unreal #19
Pathway, 11/04/2019, by Robotality (Custom)
Devlog #18: The Art and Tech behind Pathway
33 / 62
They didn't use Unity/Unreal #20
Factorio, 14/08/2020, by Wube Software (Custom)
34 / 62
They didn't use Unity/Unreal #21
Hades, 17/09/2020, by Supergiant Games (The Forge)
Previous games are all made with XNA or MonoGame (Bastion, Transistor,
Pyre) 35 / 62
They didn't use Unity/Unreal #22
Eastward, 16/09/2021, by Pixpil (MOAI)
"Behind the garage scene. Showing deferred buffers." from Twitter
36 / 62
They didn't use Unity/Unreal #23
The Riftbraker, 14/10/2021, by EXOR Studios (Custom)
37 / 62
They didn't use Unity/Unreal #24
Teardown, 21/04/2022, by Tuxedo Labs (Custom)
38 / 62
They didn't use Unity/Unreal #25
Return To Monkey Island, 19/09/2022, by Terrible Toybox (Custom)
Thimbleweed Park also made with the same custom engine
39 / 62
They didn't use Unity/Unreal #26
Balatro, 20/02/2024, by LocalThunk (LVE)
40 / 62
They didn't use Unity/Unreal #27
Norland, 16/05/2024, by Long Jaunt (GameMaker Studio)
The Four Elements and Their Graphic Effects: Exploring Shaders in a 2D Game
Simulation of three-dimensional buildings in a 2D game 41 / 62
The nCine 鏝
42 / 62
What is nCine?
Encelo + engine = nCine 
Cross-platform 2D game framework
Linux, Windows, macOS, Android, Emscripten, MinGW-w64
Tested on: Nvidia Shield, Asus ZenWatch 1, Raspberry Pi, Steam Deck
Supports multiple compilers: GCC, Clang, MSVC, AppleClang
Suitable for games, prototypes, tools, demos
Open source with a MIT license
Small enough to be fully understood by one person
43 / 62
Main Features #1
Written in C++11 but can be scripted with Lua
Uses OpenGL 3.3 and ES 3.0 for graphics, OpenAL for the audio
Can load and save PNG and WebP images (via libpng and libwebp)
Can also load GPU-compressed formats like ASTC, ETC2, PVR, DXT, etc.
Can load WAVE sounds or stream Vorbis music (via libogg and libvorbis)
Automatic culling and batching of sprites
Sprites can be rectangles or 2D meshes, with spritesheet animations
Custom user shaders without sacrificing automatic batching
Multiple viewports (for split-screen or post-processing)
Bitmap font rendering with kerning pairs and Unicode characters
Logging system with multiple levels, and console or file output
44 / 62
Main Features #2
nCTL custom template library used in place of STL
Containers (arrays, lists, hashmaps, sparse sets), iterators, algorithms
Unique and shared smart pointers
Basic math library for vectors, 4x4 matrices and quaternions
Custom code for strings, atomic operations, monotonic clocks
Custom memory allocators (linear, stack, pool, free-list)
Filesystem functions for queries and operations on files and directories
Thread pool creation, synchronization, and affinity assignment
Can use GLFW, SDL2, or Qt5 as desktop backends
Gamepad support with SDL2 gamepad mapping strings on all backends
Integration with Dear ImGui and Nuklear for user interfaces
Integration with RenderDoc (gfx debugger) and Tracy (frame profiler)
45 / 62
Main Features (screenshots #1)
Sprite batching, Tracy integration, ImGui debug overlay, Lua scripting
46 / 62
Main Features (screenshots #2)
Multiple viewports, custom shaders, custom allocators test, text rendering
47 / 62
Development Tools
CMake and CPack for build and installation on all platforms
Google Test for unit testing and Benchmark for micro-benchmarks
Gcovr for unit test coverage
GitHub Actions for Continuous Integration
Cppcheck for static C/C++ code analysis
Valgrind and AddressSanitizer (ASAN) for memory debugging
clang-format for automatic code formatting
Doxygen for documentation (extracted from source comments)
48 / 62
Development Tools (screenshots)
Gcovr, Doxygen, Google Test, Valgrind
49 / 62
Lines of code
/-------------------------------------------------------------------------------
|Language files blank comment code|
|-------------------------------------------------------------------------------|
|C++ 368 15601 2974 76181|
|C/C++ Header 334 7093 3958 29288|
|CMake 44 704 383 5587|
|YAML 7 177 14 879|
|XML 2 0 1 676|
|Lua 8 137 5 531|
|GLSL 21 67 0 340|
|Markdown 1 10 0 63|
|Gradle 2 1 0 23|
|INI 1 2 0 10|
|-------------------------------------------------------------------------------|
|SUM: 788 23792 7335 113578|
-------------------------------------------------------------------------------/
Just the main nCine repository, not including any external projects
50 / 62
Some projects #1
Jazz族 Resurrection, a Jazz Jackrabbit 2 reimplementation by deathkiller
51 / 62
Some projects #2
JugiMap, a level editor that integrates with nCine, by Jugilus
52 / 62
Some projects #3
ncJump, a platform with Box2D physics and integrated editor, by Fahien
53 / 62
Some projects #4
SpookyGhost, a tool to create procedural animations for sprites, by Encelo
54 / 62
Some projects #5
ncTracer, a simple brute-force multi-threaded CPU path tracer
55 / 62
Some projects #6
ncTiledViewer, a loader for the Tiled TMX map format (using pugixml)
56 / 62
Some projects #7
ncParticleEditor, an ImGui editor for the nCine particle system
57 / 62
Some projects #8
ncInvaders, a simple version of Space Invaders
58 / 62
Some projects #9
ncPong, an example game also available in Lua
59 / 62
Recent developments
Latest big feature added: binary shader cache
Helps with slow shader compilation time with ANGLE on UWP/Xbox
On hold but nearly complete: Crashpad integration for crash reporting
Probably with missing Android support 
Work in progress: OpenAL EAX/EFX audio effects and filters
What's next: an editor? Vulkan support? multi-threading? a game?
60 / 62
Future tasks and ideas
Better documentation, tutorials, and site presentation
Full-fledged ImGui editor
Graphics API abstraction and Vulkan backend
Lock-free multi-threaded jobs system and data-oriented ECS
Bindings for Rust/Haxe, scripting integration with Wren/AngelScript
A simple free game to release on Itch.io and/or Steam
Box2D integration for physics and collisions
Metal backend and thus iOS port
A game jam with prizes
61 / 62
Links
Site: https://ncine.github.io/
GitHub: https://github.com/nCine/
Twitter: https://twitter.com/nCine2D
Discord: https://discord.gg/495ab6Y
YouTube: https://www.youtube.com/@ncine
Blog: https://encelo.github.io/tags/#nCine
Questions?
62 / 62

More Related Content

nCine - A World With Custom In-house Engines Is Possible.pdf

  • 1. nCine: a world with custom in-house engines is possible Angelo "Encelo" Theodorou 1 / 62
  • 2. The author Born in 1983, grown up with C= Amigas for ten years (1991- 2001) Fell in love with Amiga games and its demoscene An everyday desktop *nix user for almost 25 years Using Arch Linux daily since 2005 Interested in low-level coding and computer graphics Engine and graphics programmer for mobile and console games Natural Motion's Echo engine (Clumsy Ninja, Dawn of Titans) EA Frostbite (FIFA 18-20, Battlefield V, Battlefront II, Anthem) Bethesda's Creation Engine 2 (Starfield) Developing the nCine since June 2011 2 / 62
  • 3. What is a custom in-house engine? Custom: developed alongside a game to serve its needs In-house: tech and game teams work under the same roof 3 / 62
  • 4. What is a custom in-house engine? Custom: developed alongside a game to serve its needs In-house: tech and game teams work under the same roof With lots of exceptions: Can be reused for multiple games (RAGE) Can be licensed to other studios (id Tech) Can be developed by a specific division within a company (Frostbite) 4 / 62
  • 5. What is a custom in-house engine? Custom: developed alongside a game to serve its needs In-house: tech and game teams work under the same roof With lots of exceptions: Can be reused for multiple games (RAGE) Can be licensed to other studios (id Tech) Can be developed by a specific division within a company (Frostbite) The opposite of this is a generic software technology Can be used to develop different types of games Distributed or sold by a specialized (sometimes non-game) company Think of Unreal, Unity, CryEngine, Godot, GameMaker, 5 / 62
  • 6. What is a custom in-house engine? Custom: developed alongside a game to serve its needs In-house: tech and game teams work under the same roof With lots of exceptions: Can be reused for multiple games (RAGE) Can be licensed to other studios (id Tech) Can be developed by a specific division within a company (Frostbite) The opposite of this is a generic software technology Can be used to develop different types of games Distributed or sold by a specialized (sometimes non-game) company Think of Unreal, Unity, CryEngine, Godot, GameMaker, Custom engines are especially employed in AAA games But there are some notable indie exceptions 6 / 62
  • 7. Can't you just use Unity/Unreal like everyone else? Yes, but also no. 7 / 62
  • 8. Can't you just use Unity/Unreal like everyone else? #0 Well, we all know how well it went... 8 / 62
  • 9. Can't you just use Unity/Unreal like everyone else? #1 Articles on this theme: On the Perceived Inevitability of Unreal by Alex Tardif Ships, Icebergs, Game Engines by Ryan Fleury A case for building your own tech | Opinion by Dan Baker Handmade Network List of game engines and frameworks: Custom Game Engines: A Small Study by raysan5 Indie Bookmarks: some indie games and their technology by Encelo 9 / 62
  • 10. Can't you just use Unity/Unreal like everyone else? #2 The author is a Lead Graphics Programmer at ZeniMax Online Studios. In-house engine development has declined over the last decade The pool of game engine and graphics talent is shrinking Independent game middlewares are dead (bought by Unity/Epic) The framework and tooling infrastructure is too much work (From "On the Perceived Inevitability of Unreal" by Alex Tardif) 10 / 62
  • 11. Can't you just use Unity/Unreal like everyone else? #3 Written just after The Machinery was obliterated from the face of the Earth. When you give up ownership, you give up your rights You lose your agency over time, money, professional development Something that is more abstract exposes fewer capabilities Not everything you could do in your own engine is possible in a pre- built game engine The "don't reinvent the wheel" mantra diminishes ownership and scoffs at self-reliance (From "Ships, Icebergs, Game Engines" by Ryan Fleury) 11 / 62
  • 12. Can't you just use Unity/Unreal like everyone else? #4 Written by Oxide Games' co-founder and CTO. Innovation and unique gameplay: build a game that breaks the mold Attract top devs who want to leave a mark, solve novel problems, work on cutting-edge technology Custom tech can be initially expensive, but the investments can yield long- term savings It seems Unity and Unreal won't stay inexpensive and perpetual A custom engine usually compiles faster and runs faster in debug Some games have technological requirements that off-the-shelf engines cannot satisfy Even off-the-shelf solutions need a technical investment for customization (From "A case for building your own tech | Opinion" by Dan Baker) 12 / 62
  • 13. Can't you just use Unity/Unreal like everyone else? #5 Computers are amazing So why is software so terrible? Slow to load, thirsty on batteries, crashes all the time We made it terrible We ignored the hardware, we glued together libraries so we didn't have to learn, we built layers on top of layers until no one knew how anything worked We're building Rube Goldberg machines, and users are paying the cost. But there is another way We can build software that works with the computer, not against it. All you need is an open mind and a sense of curiosity. (From the Handmade Network Manifesto) 13 / 62
  • 14. They didn't use Unity/Unreal Some examples from the indie ecosystem 14 / 62
  • 15. They didn't use Unity/Unreal #1 Spelunky Classic, 21/12/2008 (GameMaker) Spelunky HD and Spelunky 2 use a custom engine 15 / 62
  • 16. They didn't use Unity/Unreal #2 Legend of Grimrock, 11/04/2012, by Almost Human Games (Custom) Legend of Grimrock 2 also made with the same custom engine 16 / 62
  • 17. They didn't use Unity/Unreal #3 Little Inferno, 19/11/2012, by Tomorrow Corporation (Custom) World of Goo, Human Resource Machine, and 7 Billion Humans are all based on a custom engine too 17 / 62
  • 18. They didn't use Unity/Unreal #4 Guacamelee!, 09/04/2013, by DrinkBox Studios (Custom) Guacamelee! 2 also on a custom engine 18 / 62
  • 19. They didn't use Unity/Unreal #5 Don't Starve, 23/04/2013, by Klei Entertainment (Custom) Most of their games are made with custom technology (Mark of the Ninja, Invisible, Inc., Griftlands), Oxygen Not Included is made with Unity 19 / 62
  • 20. They didn't use Unity/Unreal #6 Hammerwatch, 12/08/2013, by Crackshell (Custom) Heroes of Hammerwatch and Hammerwatch 2 use a custom engine too 20 / 62
  • 21. They didn't use Unity/Unreal #7 Banished, 18/02/2014, by Shining Rock Software (Custom) His next solo game also runs on custom technology 21 / 62
  • 22. They didn't use Unity/Unreal #8 Shovel Knight, 26/06/2014, by Yacht Club Games (Custom) Pocket Dungeon made with GameMaker Studio, Mina the Hollower with a custom engine 22 / 62
  • 23. They didn't use Unity/Unreal #9 Crypt of the Necrodancer, 23/04/2015, by Brace Yourself Games (Custom) Industries of Titan made with UE4 し 23 / 62
  • 24. They didn't use Unity/Unreal #10 Victor Vran ARPG, 24/07/2015, by Haemimont Games (HaemimontSol) All their games are made with their custom engine, including Surviving Mars, Tropico 3-4-5, Jagged Alliance 3 24 / 62
  • 25. They didn't use Unity/Unreal #11 Prison Architect, 06/10/2015, by Introversion Software (Custom) 25 / 62
  • 26. They didn't use Unity/Unreal #12 Darkest Dungeon, 19/01/2016, by Red Hook Studios (Custom) Darkest Dungeon 2 runs on Unity 26 / 62
  • 27. They didn't use Unity/Unreal #13 Stardew Valley, 26/02/2016, by ConcernedApe (XNA, then MonoGame) Haunted Chocolatier is in development using MonoGame 27 / 62
  • 28. They didn't use Unity/Unreal #14 Celeste, 25/01/2018, by Matt Makes Games (FNA and MonoGame) 28 / 62
  • 29. They didn't use Unity/Unreal #15 Into the Breach, 27/02/2018, by Subset Games (Custom) Faster Than Light also made with a custom engine 29 / 62
  • 30. They didn't use Unity/Unreal #16 Yoku's Island Express, 29/05/2018, by Villa Gorilla (Custom) 30 / 62
  • 31. They didn't use Unity/Unreal #17 Dead Cells, 06/08/2018, by Motion Twin (Heaps) All Shiro Games titles are made with Heaps too (Evoland, Evoland 2, Northgard, Darksburg, Dune: Spice Wars) 31 / 62
  • 32. They didn't use Unity/Unreal #18 Wargroove, 01/02/2019, by Chucklefish Games (Halley) Wargroove2 and Witchbrook also on the same engine 32 / 62
  • 33. They didn't use Unity/Unreal #19 Pathway, 11/04/2019, by Robotality (Custom) Devlog #18: The Art and Tech behind Pathway 33 / 62
  • 34. They didn't use Unity/Unreal #20 Factorio, 14/08/2020, by Wube Software (Custom) 34 / 62
  • 35. They didn't use Unity/Unreal #21 Hades, 17/09/2020, by Supergiant Games (The Forge) Previous games are all made with XNA or MonoGame (Bastion, Transistor, Pyre) 35 / 62
  • 36. They didn't use Unity/Unreal #22 Eastward, 16/09/2021, by Pixpil (MOAI) "Behind the garage scene. Showing deferred buffers." from Twitter 36 / 62
  • 37. They didn't use Unity/Unreal #23 The Riftbraker, 14/10/2021, by EXOR Studios (Custom) 37 / 62
  • 38. They didn't use Unity/Unreal #24 Teardown, 21/04/2022, by Tuxedo Labs (Custom) 38 / 62
  • 39. They didn't use Unity/Unreal #25 Return To Monkey Island, 19/09/2022, by Terrible Toybox (Custom) Thimbleweed Park also made with the same custom engine 39 / 62
  • 40. They didn't use Unity/Unreal #26 Balatro, 20/02/2024, by LocalThunk (LVE) 40 / 62
  • 41. They didn't use Unity/Unreal #27 Norland, 16/05/2024, by Long Jaunt (GameMaker Studio) The Four Elements and Their Graphic Effects: Exploring Shaders in a 2D Game Simulation of three-dimensional buildings in a 2D game 41 / 62
  • 43. What is nCine? Encelo + engine = nCine Cross-platform 2D game framework Linux, Windows, macOS, Android, Emscripten, MinGW-w64 Tested on: Nvidia Shield, Asus ZenWatch 1, Raspberry Pi, Steam Deck Supports multiple compilers: GCC, Clang, MSVC, AppleClang Suitable for games, prototypes, tools, demos Open source with a MIT license Small enough to be fully understood by one person 43 / 62
  • 44. Main Features #1 Written in C++11 but can be scripted with Lua Uses OpenGL 3.3 and ES 3.0 for graphics, OpenAL for the audio Can load and save PNG and WebP images (via libpng and libwebp) Can also load GPU-compressed formats like ASTC, ETC2, PVR, DXT, etc. Can load WAVE sounds or stream Vorbis music (via libogg and libvorbis) Automatic culling and batching of sprites Sprites can be rectangles or 2D meshes, with spritesheet animations Custom user shaders without sacrificing automatic batching Multiple viewports (for split-screen or post-processing) Bitmap font rendering with kerning pairs and Unicode characters Logging system with multiple levels, and console or file output 44 / 62
  • 45. Main Features #2 nCTL custom template library used in place of STL Containers (arrays, lists, hashmaps, sparse sets), iterators, algorithms Unique and shared smart pointers Basic math library for vectors, 4x4 matrices and quaternions Custom code for strings, atomic operations, monotonic clocks Custom memory allocators (linear, stack, pool, free-list) Filesystem functions for queries and operations on files and directories Thread pool creation, synchronization, and affinity assignment Can use GLFW, SDL2, or Qt5 as desktop backends Gamepad support with SDL2 gamepad mapping strings on all backends Integration with Dear ImGui and Nuklear for user interfaces Integration with RenderDoc (gfx debugger) and Tracy (frame profiler) 45 / 62
  • 46. Main Features (screenshots #1) Sprite batching, Tracy integration, ImGui debug overlay, Lua scripting 46 / 62
  • 47. Main Features (screenshots #2) Multiple viewports, custom shaders, custom allocators test, text rendering 47 / 62
  • 48. Development Tools CMake and CPack for build and installation on all platforms Google Test for unit testing and Benchmark for micro-benchmarks Gcovr for unit test coverage GitHub Actions for Continuous Integration Cppcheck for static C/C++ code analysis Valgrind and AddressSanitizer (ASAN) for memory debugging clang-format for automatic code formatting Doxygen for documentation (extracted from source comments) 48 / 62
  • 49. Development Tools (screenshots) Gcovr, Doxygen, Google Test, Valgrind 49 / 62
  • 50. Lines of code /------------------------------------------------------------------------------- |Language files blank comment code| |-------------------------------------------------------------------------------| |C++ 368 15601 2974 76181| |C/C++ Header 334 7093 3958 29288| |CMake 44 704 383 5587| |YAML 7 177 14 879| |XML 2 0 1 676| |Lua 8 137 5 531| |GLSL 21 67 0 340| |Markdown 1 10 0 63| |Gradle 2 1 0 23| |INI 1 2 0 10| |-------------------------------------------------------------------------------| |SUM: 788 23792 7335 113578| -------------------------------------------------------------------------------/ Just the main nCine repository, not including any external projects 50 / 62
  • 51. Some projects #1 Jazz族 Resurrection, a Jazz Jackrabbit 2 reimplementation by deathkiller 51 / 62
  • 52. Some projects #2 JugiMap, a level editor that integrates with nCine, by Jugilus 52 / 62
  • 53. Some projects #3 ncJump, a platform with Box2D physics and integrated editor, by Fahien 53 / 62
  • 54. Some projects #4 SpookyGhost, a tool to create procedural animations for sprites, by Encelo 54 / 62
  • 55. Some projects #5 ncTracer, a simple brute-force multi-threaded CPU path tracer 55 / 62
  • 56. Some projects #6 ncTiledViewer, a loader for the Tiled TMX map format (using pugixml) 56 / 62
  • 57. Some projects #7 ncParticleEditor, an ImGui editor for the nCine particle system 57 / 62
  • 58. Some projects #8 ncInvaders, a simple version of Space Invaders 58 / 62
  • 59. Some projects #9 ncPong, an example game also available in Lua 59 / 62
  • 60. Recent developments Latest big feature added: binary shader cache Helps with slow shader compilation time with ANGLE on UWP/Xbox On hold but nearly complete: Crashpad integration for crash reporting Probably with missing Android support Work in progress: OpenAL EAX/EFX audio effects and filters What's next: an editor? Vulkan support? multi-threading? a game? 60 / 62
  • 61. Future tasks and ideas Better documentation, tutorials, and site presentation Full-fledged ImGui editor Graphics API abstraction and Vulkan backend Lock-free multi-threaded jobs system and data-oriented ECS Bindings for Rust/Haxe, scripting integration with Wren/AngelScript A simple free game to release on Itch.io and/or Steam Box2D integration for physics and collisions Metal backend and thus iOS port A game jam with prizes 61 / 62
  • 62. Links Site: https://ncine.github.io/ GitHub: https://github.com/nCine/ Twitter: https://twitter.com/nCine2D Discord: https://discord.gg/495ab6Y YouTube: https://www.youtube.com/@ncine Blog: https://encelo.github.io/tags/#nCine Questions? 62 / 62