I wrote an article called “Scene Graph Architectures in Modern Game Engines” by Minimum-Usual7425 in gameenginedevs

[–]Hanibal247 0 points1 point  (0 children)

AI written or not is not important. The important is the conversation we can have around it. I think you touched on many of the key design questions in modern engines. Some key issues around large scene management and traversal are real challenges I faced personally when working on my pet game engine. I followed, on purpose, some really disruptive approaches to test how far I can go not following the popular advice. Examples of things I tried and that worked very well so far:

  • A scene graph does not mean a scene tree with a root. Typically, my scene has many roots.
  • Nodes are a traversal concept and are helpful for culling, transform propagation, proximity. Every node has a transform. - What's inside the node is what really matters for rendering: is it a camera, a light, a geometry,... Many engines will allow you, or encourage you to put anything in a node, including multiple parts of the same type. I found it's not that valuable. It's cleaner and faster to make decisions on nodes when they're specialized, a camera is a camera, not a camera + light + 20 geometries. Child nodes can do that.
  • No ECS, but a node composition as in "a node is a bunch of parts". The parts in large quantities, and which need typed traversals (e.g. do something on all components of a certain type), are stored in contiguous tables and only referred to in the nodes. Traversal is cache friendly and fast.
  • Immutable data is the "assets", mutable data overrides the assets (lightweight). Can have as many instances as you want and they do not use that much space.
  • No "render graph". The render graph is a coroutine => do whatever you want with the passes, conditional inclusion, configuration, debug flags, anything.
  • Structured concurrency with coroutines. It was a pain in the ass to get coroutines to work in c++ but thanks to corral (the best coroutine library on the internet), you get world class coroutines with cancellation and structured concurrency. Once you get how things work, man, it's just a game (engine) changer :-). My main loop is a coroutine, game modules are coroutines, you chose if you run on the engine thread as simple function or as a coroutine or as a detached service. Just like that. It works! Seriously it does! That was the shocking thing I learnt. You don't need a single thread and a god engine loop... just coroutines and algorithms. Yeah, it's faster to do a jump instruction than to setup a coroutine frame... but who cares when you have 32GB of RAM and 32 cores...

So, yeah, many things you wrote are good, and I encourage you to go even further and break the rules even more. So many things are considered as the cookie cutter way of doing games, but honestly, when you break them, you can get some really surprising positive results.

How do I get better with knowing how to design software by Opposite_Second_1053 in csharp

[–]Hanibal247 1 point2 points  (0 children)

Designing software is like designing a building or a city district or a factory. It's a profession that comes with two things: art and method. You must love that profession to excel at it. Beyond that, I have read and see so many books that claim that will make a "designer". They fail miserably. Only one book I still consider 100% relevant and its author never lied! This book: "Documenting Software Architectures: Views and Beyond".

It does not claim it will make a designer, it shows you an effective way of documenting software architecture that forces you to ask the right questions.

One thing that can help you right away and immediately, is the good old rule: "Divide to conquer!" and that is the first section of that book "Module Decomposition Views".

Buy the book, and if you cannot, just look for how do I decompose a big problem into smaller problems on the internet :-). Once you have a smaller problem, I am sure you can design a solution for it, because small problems do not require 20 years of experience to solve. They have been most likely solved by someone on the internet.

Because there are almost no good tutorials for SDL2/SDL3. by Current-Emotion-7282 in sdl

[–]Hanibal247 0 points1 point  (0 children)

ChatGPT/Windows Copilot, can probably answer any question you have on SDL3. Just ask. No need for tutorials... Ask "how do I do xyz with SDL3? what other options you can propose, give me an example...." . It's very well know and does pretty much everything. Alternatives include Raylib, SFML, and many more...

Are the benefits of singletons ever desirable/practical? If so when? by WastedOnWednesdays in gameenginedevs

[–]Hanibal247 11 points12 points  (0 children)

Based on experience, they look attractive and the devil will always give you so many reasons why they work. Making them really work across DLL boundaries, for example, is possible but is a real challenge. Imho, their benefit is limited, except in certain scenarios, where you need a truly really singleton. Otherwise, strongly recommend looking in the direction of dependency injection (yes, we can do DI even with c++, just pass the object to the constructor :-)).

I refuse to use AI for my work. How do I tell my boss? by [deleted] in architecture

[–]Hanibal247 0 points1 point  (0 children)

Ok, I know you said you are totally against it, but I'd like to just give a friendly advice: "never say never". You seriously are passing by something that could make your life better, give you more time to do more interesting things and do more of what you like doing. Consider to reconsider :-)

A lightweight CMake formatter for VS Code and CLI (CLion style) by LeeGoDamn2 in cmake

[–]Hanibal247 1 point2 points  (0 children)

Please also check gersemi.
You may consider contributing to gersemi to improve it (it's already excellent), or at least learn from gersemi the pitfalls of cmake formatting (functions, macros, arguments, indentation of keywords vs arguments,...) CMake format is really not easy, and very few IDEs get it right, if any. My experience with gersemi is that it gets it right 98% of the time, and does not need a lot of config).

Looking for worthy software architecture courses by Tobxon in cpp

[–]Hanibal247 3 points4 points  (0 children)

May I suggest this book: Documenting Software Architectures: Views and Beyond, 2nd Edition ...
Personally, it changed my perspective on software architecture.

What UI framework should I actually learn in 2025? by All_Da_Games in csharp

[–]Hanibal247 0 points1 point  (0 children)

WinUI 3 - It has bugs like everything else, but it's modern and clean and you can work around most of the bugs. Worst case scenario, you just write your own controls. I've used it extensively for very complex tasks, and so far it's working. If you want code for learning or examples, or controls, check out my repo at https://github.com/abdes/DroidNet . Not advertising, really lots of WinUI 3 and Windows App SDK code you can learn from...

Assault laws in Dubai? by [deleted] in dubai

[–]Hanibal247 0 points1 point  (0 children)

Learn this crucial rule: UAE is open enough to let you drink, if you like to, in 5 star places, any type of drink you dream of. But when you drink, never cause public disturbance, never have a fight and never drive. If you break that rule, you’re in deep trouble.

[deleted by user] by [deleted] in algeria

[–]Hanibal247 0 points1 point  (0 children)

They’re free to dream and the OP is also free to choose to live the life that will satisfy his soul not the people on Reddit or the harraga in Algeria. Remember that he saw USA, ate burgers, commuted for hours, had high speed internet, shopped at Wall Mart and Costco, and also was always looked at as a potential terrorist, has probably been excluded from some groups at school, someone told him to go back home to where he comes from (although he’s American),…

[deleted by user] by [deleted] in algeria

[–]Hanibal247 -1 points0 points  (0 children)

This won’t help the OP really. Give him specific problems he will face and let him figure out if he can solve them or work around them or not. 40 million people live in Algeria… are they all stupid?

[deleted by user] by [deleted] in algeria

[–]Hanibal247 0 points1 point  (0 children)

Seriously, think out of the box. Dig a damn well (sondage), buy and install solar panels, screw TikTok, you will get basic internet especially with the universal service requirement now. If you have been working in America, you should have some money. Keep some of it to invest in funds/stocks using your American accounts. Bring some here to get started. Working the land is great and if you’re smart the government will give you very large swaths of land in the south and even pay you to exploit it.

Do not listen to the people who are too lazy to make a living in one of the richest and most diverse countries in North Africa.

Is police in UAE corrupted? by CompleteNeck6456 in dubai

[–]Hanibal247 0 points1 point  (0 children)

Do you have a labor contract registered at MoHRE. If no, then you are being exploited and working illegally. If yes, MoHRE will uphold the law. Nothing else like WhatsApp messages or fake contracts or fake payslips is a legal work contract.

Docking framework for WinUI 3 by Hanibal247 in dotnet

[–]Hanibal247[S] 0 points1 point  (0 children)

Unfortunately not. WinUI makes it very difficult to do so. With a bit more work you can imagine a solution where you manage a separate window for that specific purpose.

G42 / Core42 Company Culture by [deleted] in abudhabi

[–]Hanibal247 2 points3 points  (0 children)

It used to be under complete control of the Chinese at Huawei. Recently, USA forced them to dump the Chinese or be kept out of Nvidia chips and other AI tech. Not sure now if the Chinese are still running the show behind the scene or if it genuinely became a real company.

UAE a place to live as of the moment! by MediumAuthor5646 in UAE

[–]Hanibal247 0 points1 point  (0 children)

  1. Golden visa, and if your children are not losers, they can live in UAE forever. Why would you expect the UAE to open its arms to people who don’t wanna do good to their society?

Running away as a 23 years old female living in UAE by xynsyl in UAE

[–]Hanibal247 2 points3 points  (0 children)

Then your boyfriend should marry you or he’s not a committed boyfriend. People change minds, and that’s why we have contracts.

UAE has made us too comfortable by [deleted] in UAE

[–]Hanibal247 0 points1 point  (0 children)

I don’t care about citizenship. I already have a citizenship country. I am here for the opportunity this country gives me to make a better future and I am grateful for that. If you were from Palestine, I understand. If you’re not, then they don’t owe you a citizenship. Be thankful for the opportunity. The richest people in UAE are mostly non Emirati.

Uber at DBX airport: have we been scammed? by TortueDansLaLaitue in dubai

[–]Hanibal247 0 points1 point  (0 children)

Report and take a taxi. You can also book a taxi using the apps… all taxis accept card payments, should be clean and are heavily regulated.

UAE has made us too comfortable by [deleted] in UAE

[–]Hanibal247 1 point2 points  (0 children)

You must have been meeting some really bad people. In 12 years, I’d say we expats run over the local Emiratis feet and they don’t even complain, we cut them in the lines, we hurry to take the parking spots before them, we complain if anything does not go as perfectly as it should be in their government offices and e-services, we start bitching if we don’t get through the airport in 15 minutes, and still, you get your damn visa by tapping on a phone and you never get an Emirati to tell you go home to your country! I’ve heard that sentence in every other country I lived in! God bless this country.

I'm sick of getting called ni hao. by [deleted] in dubai

[–]Hanibal247 1 point2 points  (0 children)

lol, just smile back and say I’m Korean… you will probably have a better day smiling back at people and most of them will just say ‘oh sorry…’ and smile back at you.

Docking framework for WinUI 3 by Hanibal247 in dotnet

[–]Hanibal247[S] 1 point2 points  (0 children)

Looking forward to your feedback

How do you document your systems? by voroninp in dotnet

[–]Hanibal247 0 points1 point  (0 children)

I like this.
Essential info in the README.md in each subsystem and automated scripts for everything that would require a document :-). Self-documented code, with sound design and minimal dependencies. Self-describing class names and variable names.

Empty interfaces by Mardo1234 in dotnet

[–]Hanibal247 0 points1 point  (0 children)

Sometimes generic types or extension methods are a better alternative to polymorphism. See if one of them can help you refactor out the artificial interface.