Live data from Hacker News

Create your own Game Engine but don't use it

zeroequalsfalse.press

51–60 of 113 posts

Re: Create your own Game Engine but don't use it

#51
post #37

There's two big hindrances for success right off the bat: 1. Refusing to just use C/C++ 2. Attempting to support most of the platforms Both problems compound each other. All platforms (even Android at this point) have C APIs for everything you need. Creating another layer of abstraction here causes more work and overhead. Trying to get Java running on iOS with 3D APIs is a huge task in and of itself. The same goes fo…

Unity's multi-platform track record is quite solid at this point in time. I wouldn't bet on exotic Java attempts of "write once run everywhere" though.

Java is actually not that bad – Java with LWJGL gets you within a factor of 1.6 to C++ performance, while actually being "write once run everywhere" (for PC, at least). That’s good enough.

Re: Create your own Game Engine but don't use it

#52
post #37

There's two big hindrances for success right off the bat: 1. Refusing to just use C/C++ 2. Attempting to support most of the platforms Both problems compound each other. All platforms (even Android at this point) have C APIs for everything you need. Creating another layer of abstraction here causes more work and overhead. Trying to get Java running on iOS with 3D APIs is a huge task in and of itself. The same goes fo…

Unity's multi-platform track record is quite solid at this point in time. I wouldn't bet on exotic Java attempts of "write once run everywhere" though.

Yes, the track record is often negative if you want to make action games on not-Windows because of GC pauses caused by Mono's inferior garbage collector.

As for Java, Notch managed to do it for Minecraft, except for the mobile port which I think I remember reading was re-written from scratch on iOS because the performance was terrible.

Re: Create your own Game Engine but don't use it

#53

There's two big hindrances for success right off the bat: 1. Refusing to just use C/C++ 2. Attempting to support most of the platforms Both problems compound each other. All platforms (even Android at this point) have C APIs for everything you need. Creating another layer of abstraction here causes more work and overhead. Trying to get Java running on iOS with 3D APIs is a huge task in and of itself. The same goes fo…

I refuse to use C/C++. If that's what I have to use to make games, I just won't make games. Fortunately, there are other languages available with a C FFI.

I don't think forced memory management teaches anyone much of anything besides how to manage memory manually. It doesn't make programs better. I'm very grateful for garbage collection so that I can spend my cycles thinking about the problem I'm actually trying to solve.

edit: I think this came off a bit too dismissive, but I guess what I was after is that what technology you choose depends on what you value. Personally, I value using programming languages that are pleasant to work with, and I don't personally find C/C++ to be pleasant. I enjoy dabbling in game development, but it's not so important to me that I would use tools that I don't like to do it.

Re: Create your own Game Engine but don't use it

#55
I really don't think the issue was with "creating x from scratch", but from the purpose it was built for.

Game engines like Unity are general-purpose engines, they are not made for a specific type of game, and can be used for basically anything. The trade-off is flexibility and performance.

What they tried to do was to basically create a "clone" of Unity, that is, they tried to create a general purpose engine, and that does not make any sense at all for an indie developer.

If you're going to create a game engine + editor, then do it for a specific genre of games (e.g. FPS), and do it only if you're planning to create a series of games that belong to that genre only.

Unless you want to create a business out of selling game engines, then have a specific game in mind before creating a game engine, and tweak it for that purpose only.

Re: Create your own Game Engine but don't use it

#56
post #21

Having a broader understanding of your domain at a different level of abstraction is always extremely valuable. For anyone interested in the detail of _how_ to create a game engine from scratch, I'd recommend checking out Handmade Hero https://handmadehero.org/

Handmade Hero is over 380, hour or two long videos last i saw. How far are you into it? Regardless, it's an amazing effort.

I've watched pretty much every episode, mostly live. It is pretty amazing. It also pretty much single-handedly reinvigorated my love of programming.

But there are definitely entire weeks (or weekends these days) of video that aren't all that useful unless you're trying to build exactly what Casey is trying to build.

https://hero.handmade.network/episodes is a must if you want to cut some corners on what you watch.

Off the top of my head, here's my suggestions:

* Weeks 1-15 are all useful - it's really a great introduction and kool-aid provisioning system

* Week 20 and 21 has some introductory lighting stuff.

* Week 23 and 24 has some good performance profiling stuff.

* Week 25 and 26 has some multithreading job queue stuff.

* Week 28 and 29 has SIMD/SSE sound mixing implementation

* Weeks 36-38 has debug/performance infrastructure

* Day 235 and weeks 48 and 49 are the start of OpenGL initialization.

* Week 74 discusses particle systems

* Weekend 3 discusses compression

* Weekends 6-14 are the core software-renderer-to-OpenGL days

* Weekend 23 is a re-implementation of lighting

The other stuff is exploration of concepts that are either specific to Handmade Hero, or are much deeper implementation detail type stuff - not entirely necessary if you're skimming.

Re: Create your own Game Engine but don't use it

#57
post #4

Interesting contrast to the Carmack school of thought: _do_ build your own game engine and don't even reuse anything you made before, because you'll know better this time.

Where did you get that information from? Id tech is a clear engine family/line, they aren't named 1, 2, 3, 4, 5 and 6 for fun(except for the first one which really doesn't fit the rest).

1. Carmack himself says he wrote D3 renderer inside Q3 in C and then ported it to C++ (Doom 3 was first C++ id game). 2. Carmack himself says between Q1, 2 and 3 the move was "evolutionary" and lots of code stayed the same. 3. On Mac the main of D3 is even called quakeMain. 4. Radiant - GtkRadiant is shared between many games and various radiants (Net, Dark, Gtk, etc.) share a lot of code with each other, DarkRadiant is for example a fork of GtkRadiant meant for D3 and TDM. 5. The MegaTexturing code must definitely be shared between 4, 5 and 6 because it'd be crazy to reinvent this from scratch each time to do the same thing.

The only big/throw everything away jumps are from previous odd games (Commander Keen which was 2D, Wolf3D which was a super simple ray caster) to id tech 1 (Doom 1 and 2, pure software, fake 3D) to id tech 2 (Q1 and 2 and beyond, GL but often with software fallback, real 3D). And that kind of jump is like giving web devs shit for not writing Java browser applets and thus "not reusing what they made before". From 2 and beyond it's evolutionary with the data formats, editors, code, etc. and never a total rewrite from scratch. Case in point: the use of OpenGL (or wrapping other APIs in a GL like one when there is no GL), Carmack used to (90s) prefer it over DirectX but much later in life (2010s) switched his preference but the code stayed with OpenGL out of inertia. Even Rage and new Doom use OpenGL (id tech 5 and 6 respectively). Why would this happen instead of switching to DX if they threw everything away with each new engine and never reused code?

Granted: lots of stuff and the ENTIRE scripting system (and Carmack's opinion of scripting) change almost each iteration but "change most of stuff but it's very evolutionary and lots of code is same" is far from your claimed "don't even reuse anything".

As for his opinion on writing your own engine it's not super clear, few years back he admitted that Epic dominated that field, but he was happy to stop licensing his tech to outsiders because it was a burden and started almost by an accident ("It's interesting when you look at our technology licensing -- it was never really a business that I wanted to be in. In the very early days, people would pester us, and we'd just throw out some ridiculous terms, and we were surprised when people started taking us up on it."). He is also reportedly a very calm, reasonable and polite person so even if he thinks reusing engines is shit he won't tell us. One interviewer who interviewed him said he just turned around in his chair, didn't even say 'hi', answered all questions in length in detail with no BS and then just thanked for the interview and turned back away to his screen without a 'bye'. Embodiment of pragmatism and niceness, despite the lack of 'hi' and 'bye'.

Sources: http://fabiensanglard.net/doom3/renderer.php http://fabiensanglard.net/doom3/interviews.php http://icculus.org/gtkradiant/developers.html https://en.wikipedia.org/wiki/Id_Tech_6 http://www.gamasutra.com/view/news/125324/E3_ids_Carmack_Wil...

Re: Create your own Game Engine but don't use it

#58

On the other hand, I find my game engines, particularly (unfortunately) open source ones, are in a terrible state. They often try to support many platforms, then it turns out they usually support one platform well, and the others are various degrees of broken. Then, when you want to get your game working on Android, the engine is too massive and complex for me to have any chance of figuring out how to fix it.

This is why i prefer frameworks like LÖVE 2d. it's so simple that I can keep everything I need in my head. I like just staying in the text editor.

I really wanted to like love 2d, but I found the community very unfriendly, and there were some fairly simple old bugs that have been around a long time.

Also, I was looking for something to teach children, and they seem to like "hilarious" library names like anal. (This is not one of the problems I asked about, I knew better than to ask someone to rename something).

Re: Create your own Game Engine but don't use it

#59
post #4

Interesting contrast to the Carmack school of thought: _do_ build your own game engine and don't even reuse anything you made before, because you'll know better this time.

Also remember that id Software wrote an engine specific to the game they were creating (it's debatable whether you can call them engines at all, really). Things are a lot more streamlined if you take this approach because you rarely, if ever, have to answer the question "would this work for some other title?". Or worse, "would this work for any future title that may not even be in the same genre?"! That, I think, is…

They (id tech 2-4+) definitely are considered full on world class engines, FPS specific but still. They each have a renderer, physics, scripting, asset pipeline, map and data formats, tooling, etc. and were used to make other games. They are too big, unified, oppressive (as in - they control the main loop, their elements are all together, you can't mix and match easily, your game code is on a level of a plugin for the engine code to call, not the other way around) and multi domain to be considered libraries/frameworks.

Re: Create your own Game Engine but don't use it

#60
post #25

Earlier quoted context omitted.

Well, the examples I had in mind are, like, Guilty Gear Xrd or Tekken 7, where there isn't any obvious history or genre reason (to me) to pick it. But maybe it's just old prejudices, as you said.

Possibly leveraging existing C++ experience.

Oh, yeah, that's the obvious answer. Thanks.
Post reply on HN