Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • Claude, build me a game engine. Make no mistakes.
  • 95% of the code will be the engine code. The game the other 5%.
  • In my experience it's closer to the other way around.

    For example, one of my recent games has 20k lines of engine code and 40k lines of game code.

    by zooi
  • I guess the really hard part about game engineers isn't writing them, it's making them portable to more than platform, which is the really boring, tedious, expensive part. this is why I'll never write a game engine.
  • My first pro job in gaming was in porting. In my experience, while it does require knowledge in OS and rendering APIs, the platform/RHI-specific code is quite small compared to most other subsystems of a moderately-sized game.

    Unless there is absolutely no abstraction, e.g.: with OpenGL being called from random parts of the game, porting is a matter of mostly gluing two interfaces together.

  • I cannot recommend more to try the Ray Tracer challenge and if possible without AI.

    It helps you build a full ray tracer / 3D engine only guided with tests, really powerful to learn test driven development.

    What s cool is that just being driven with tests still allows you to do it in any language you want.

    Plus you ll learn a quintillion of stuff about mathematics. This is really the kind of project that makes you go to a real senior SWE

  • Please check this interview with Lewis Nicolle who created his own game engine with D language for his new game Art of Reflection [1],[2].

    [1] Why D Programming Language?

    https://www.youtube.com/watch?v=teWQbYvPBTg

    [2] Art of Reflection:

    https://store.steampowered.com/app/2290770/The_Art_of_Reflec...

  • I want to differentiate between "game engine" and "framework" here, even knowing the distinction is subjective.

    To me a game engine includes UI elements that package the entire process of game development into a coherent application. Sprite editors, code editors, asset management, physics, all in a neat package. Bonus points I guess for coming up with a quirky bespoke internal scripting language that only gets used with that engine. You can wind up with a utility library that makes writing games easier but to me that still isn't a "game engine" per se.

    And I think that's the really difficult part. Everyone probably just uses DearImGUI anyway but that's still an entire layer of abstraction and difficulty on top of writing the game utility code itself, and it encompasses things most developers won't find fun or interesting or even may not know how to do. How do you support multiple platforms? How do you deal with data files? How do you import and export a project? Handle input? Sound? You got a triangle on screen? Great! Now you have to implement the rest of the universe - textures, lighting, UV mapping, shaders, models, skeletons, rigging, animations. Now do physics. Every single aspect of engine design is an entire discipline unto itself.

    Of course it also matters how specifically tailored and non-general you want to make an engine. Engines exist just for making RPGs or visual novels. But even then, to me, it isn't an "engine" unless it's packaged into a GUI with coherent design principles.

  • Making game engine is the fun part, making actual game with it is the boring part.
    by dvh
  • Reading the article show it talk about something else that build a "game engine" from scratch, what it says instead is *build a "engine"* to make the kind of games you will do over and over" that is more practical and attainable.

    From developers this is how in-house frameworks work, that are mostly reusing other frameworks and libraries and create a sort of pseudo DSL.

  • (Considering the linked section) that is more or less how Petra Engine[0] came to be - making a gamejam game[1] for MSDOS over a few weeks. Though while i did make it for that specific game, i always had in mind that i may want to use it for other games in the future too so i tried to make it more "generic" and keep the engine and game bits separate while avoiding too many game-specific stuff (didn't fully manage it though - in the end i've been removing PAP-specific things and a bunch of hardcoded stuff over the years whenever i feel like using it).

    That said, despite making a bunch of demos[2][3][4][5] since 2021 when i made the game, i never made any game using it after that as i always lose interest - perhaps i do need to be making an engine from scratch to keep myself interested :-P.

    [0] http://runtimeterror.com/tech/petra/ (note the version is very old and i've made a lot of improvements since then - this includes the Codeberg repository which i'll move somewhere else at some point)

    [1] https://bad-sector.itch.io/post-apocalyptic-petra

    [2] http://runtimeterror.com/pages/iv/images/44d7537fb719e00fdcd...

    [3] http://runtimeterror.com/pages/iv/images/d22ff83dd5e5109e02e...

    [4] http://runtimeterror.com/pages/iv/images/1da6a4bce430a8d8507...

    [5] https://www.youtube.com/watch?v=zx9KmkTLcB0

  • > perhaps i do need to be making an engine from scratch to keep myself interested

    you're not the only one. jonathan blow has made tons of money selling games and also needs to write a whole programming language for 100h to keep him interested enough to yield 1h of content.

    i can't really say much about the people who say don't program game engines (or whatever thing they don't like) in terms of opportunity costs (a generous name for this category of complaining), other than they would be bad at both making art and making money.

  • I believe the instinct to develop a game engine or framework comes down from loving programming and being passionate about mastering a tool. We humans love mastering something and we love masters, when we build something from scratch we own it, we are master of it and we lead the decision. That's so comforting and pleasurable, and the reward we see at the end of the path motivates us. But on the process it's too hard.

    Nowadays I have the urge to combine a physics engine, rendering engine, ecs engine to develop my own game which I guess I'll quit in the middle.

    As developers I believe we should limit ourselves from doomcoding.

  • The instinct to make a game engine is it's well known how to do it and you just follow examples all over the the place and each few days you check off a box and feel like you're making progress. It's much easier than making a game itself. There is no known list of do X, do Y, do Z that leads to a game. In that sense, games are harder than game engines because a game is unknown, a game engine is well known.

    IF you want to make a game engine, building one is progress

    If you want to make a game, building a game engine is the illusion of progress. When you're done making the engine you'll be no further along on your game than if you'd used an existing engine. Usually you'll be behind because those other engines have so many features and tools that you have yet to implement. Sure, you don't need every feature, but you may be surprised at all of the little things you end up having to write.

  • It helps to just write games and then over time an engine will emerge from the common code you carry across projects.

    Starting from a checklist of features for a game engine almost always ends in wasted effort

    by indy
  • What's doomcoding? (It's not mentioned in the article and it doesn't appear to be a related term when I google it.) It sounds negative ("doom" + "we should limit ourselves" from it) but everything you said in the context before that sounds good.
  • I think we have to try these things at least once. My own attempt to write a javascript framework ended with me realising that I needed to put more effort into planning and research, which was a valuable lesson for me.
  • I dunno if I agree it's doomcoding.

    I have worked briefly in the game industry long ago (not in engine teams though) and ended up writing a few engines for myself after leaving, a couple quite complete.

    It’s just a hobby like another. I have zero interest in writing a full game on top of it, or even publishing it.

    But do you know who NEVER gives me grief about it? People I know who work at Unity or [previous employer] writing AAA engines.

    My last monstrosity is a Rust one with zero dependencies other than the std-lib/OS, Metal/DX12/Vulkan, its own physics engine, spatial audio, vm for scripting and other stuff. I will probably do nothing with it other than having updated my skills in a lot of areas.

  • For me, the interest in engine-making is to give myself a toolkit that is suited for the kinds of games I want to make, rather than an engine that is trying to be everything to everyone. Also to avoid the Unreal Engine monoculture.
    by cjk
  • All game engines eventually become an OS. All OS's eventually become game engines.