Back during the last two months, I have been working with myself to create the BlueSky Engine from scratch, using only pure C#. There aren’t any third party libraries apart from the normal . NET core ones, there isn’t unity nor Unreal. I have used simple plain C# code, and pure desire of my want to learn.
In my intention, there was nothing I wished to come and challenge all other game engines to build another big engine. My main ambition was just to uncover the secret about any game engine. How to make them render ? What happens in physics engine again and again in every single frame? The structure of any kind of internal net systems? The concept of loading any kinds of animation into the game? Simply I wanted to experience it directly and do not look any information about it as something black but learn by every single mistake made by me. Slowly I had this project named as “BlueSky Engine”.
So one of the thing which I have found most fascinating is, let me name this thing “Project Polaris” – which is a Ray Tracing on CPU. Most of you’d have a thought that Ray Tracing = RTX GPU and some hardware dedicated for raytracing and stuff. So I have a thing- how much more I could have been to get these work done on my old system? Luckily my implementation is about 77 FPS on an Intel i5-2410M(10 year old core 2 duo) with the integrated Intel HD graphics 3000 graphics. Project Polaris renders at native 320*180 then upscaled it to 720p via smart filters, and renders using AVX instruction to draw 8 rays in the same time for computation. Having a Ray Tracing rendering in front of me, on my hardware, felt like everything I have worked upon has paid off.
Anyway Polaris is just one part of the BlueSky Engine. Some Features of BlueSky Engine:-
- Project Polaris: CPU based Ray Tracer that don’t require any specific hardware.
- Multiple backend RHI: It support Metal, Vulkan and DirectX 11 through a single abstraction layer.
- ECS Architecture Based on Archetypes: Here the entities hold their components as tight chunks of memory allowing much efficient use of cache and SIMD friendly processing.
- My scripting language with own lexer, parser and interpreter –TeaScript, which support hot-reloading as well as integration.
- Vehicle Physics: supports 4 wheel independent suspension, tire forces modeling and bones-driven wheels in animation system.
- Editor with docked panel system support: I built a very basic tool with skeletal animation tool and a online multiplayer support using Epic Online Services integration in this.
Most important things I learned:
- Data Layout matters most: Actually optimization seems to always boil down to placing data tightly together in the most optimal way in the memory. Keeping my component in close memory layout made much more sense.
- Do not always believe your assumptions blindly(profiling everything helps a lot): what I would guess would be the issue would actually not be. Using a profiler became vital to me.
- SIMD programming comes to the rescue for real speedups. Doing things in parallel rather than in a straight line, saves the day for me.
- Invest hours in building tools: The time I spend in making my editor and other useful tools for building seems to pay me off.
More to come
I am working on Visual Scripting system using a node-graph system, and planning a NavMesh system. I plan to extend my networking for both LAN and Epic Online services.
It became a pretty big project which I intended to be something more like an exploration project to know about inside games engines. The structure gives a good space for new ideas. Also, it helps me to grow by breaking things and making things! It is the fun part.
If you’re interested in giving it a look yourself, here is the repository : https://github.com/Soham-Anand/BlueSky-Engine, I would like to hear your opinion in it.
Top comments (0)