Hacker News new | ask | show | jobs
by wilberton 624 days ago
Absolutely agree! It's totally doable, but it does require some desire/ability to dig under the hood little. I think a lot of people conflate the game engine with a game editor, and don't realise how simple an engine can be if it only contains the features needed for one game. I've shipped several games with my home made engine, and it was the best technical decision I ever made! No more relying on someone else to fix bugs!
1 comments

The editor is part of it but I think the complete lack of where to even begin structuring one's game code in absence of some kind of formalized scene graph is a huge part of it as well. Scene graph editors make seeing “what exists in the game world right now” very visually apparent and easy to understand: “well, there's this root Node, and within that there's these different Nodes, and some of them have child Nodes which represent…” and so on and so forth. I recently replied to someone on X [0] who was starting from the Raylib 2D platformer example and asked, earnestly, “so I have this constant array of five rectangles representing platforms… how do I go from this to ‘defining my game's world’”?

It's just data. In its most basic form, a game world can be represented as just arrays of instances of structs, and then you loop over those arrays and call a function on each element to simulate the “entity” that struct instance represents, and then again to render it onto the screen. Sure, you eventually might want to do something more complex than that if the need arises, but most people would be surprised at just how far you can go doing only the simplest possible thing.

[0] https://x.com/rezich/status/1841889141505851680