Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
crafn
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
crafn
11y ago
> A serious C++ engine with a "data oriented" design would have the same arrays of primitive types and dumb structs as its C counterpart, merely dressed as std::vector or std::array Yeah, I agree. Including the "full C++&q
2.
▲
by
crafn
11y ago
Absolutely you should take the text with a grain of salt. The reasons I chose C are very personal. I can entertain the idea that my desire for simplicity is just a fad. I suspect that I wouldn't move to something like Python (I use it
3.
▲
by
crafn
11y ago
Good that I succeeded at avoiding ranting. I find it really hard to keep from throwing absolutes. Almost everything is possible with C++, that's true. Some things require a lot of engineering though. Like full program reflection, fast
4.
▲
by
crafn
11y ago
>Take a look at the games made in Unity. Plenty of AAA or close to AAA games. Cities Skylines, Firewatch, Ori and the Blind Forest, Pollen, Endless Legend. I think we may have differing standards. I've only played one of those, Ori,
5.
▲
by
crafn
11y ago
Two reasons: Creative interests which make traditional game engines a hard fit. I could make compromises to the design, but as I also have technical interest in making game engines, it's a double win.
6.
▲
by
crafn
11y ago
The need for high performance meets with my creative interests. (But I also have technical interest in making the engine). I also value the ability of being able to implement extraordinary features to the engine in a whim, which is hard wit
7.
▲
by
crafn
11y ago
>These are fairly outrageous claims, and it all smells of total burnout, and losing sight of the forest for the trees, to me. Maybe, I don't know. I have been a lot happier with C though, while still writing some C++ code during the
8.
▲
by
crafn
11y ago
I get where that comes from. I surely did have the disconnection some years back, but think I'm on a better track now. Thanks for the link.
9.
▲
by
crafn
11y ago
Author here. I'm positively surprised, constructive discussion on internet! There's been some discussion about using Rust. Rust is an interesting language, and has definitely potential substituting C and C++ in some domains. The m
10.
▲
by
crafn
11y ago
There's a lot of tricks you can do to optimize build times, and I've tried most of them in my previous game engine. Got ~90kloc recompilation time from 15min to something like a few minutes, although that required rewriting a bunc
11.
▲
by
crafn
11y ago
Maybe, I don't know. This is just me trying to minimize the unnecessary pain and suffering while waiting for a better language to arrive. In that context arguing which bad solution is less worse seems somewhat pointless, and also depen
12.
▲
by
crafn
11y ago
I started thinking about it, but quite fast decided to roll my own self-contained system. Not because it was an informed decision, but felt more fun :P
13.
▲
by
crafn
11y ago
Compile times are not a problem in small codebases. Try to compile a 100kloc codebase using templates generously. Even your link times will easily grow over 10 seconds. Maybe even a minute. And 100kloc is still a pretty small codebase in te
14.
▲
by
crafn
11y ago
Yeah, and what's left is not much of C++. See my post about runtime recompiling for arguments to use C compiler instead of a very limited subset of C++. (References make the type system more complex for little benefit. Templates create
15.
▲
by
crafn
11y ago
When you drop the semantic silliness of C++, like having the container to take care of constructing, copying, moving, and destructing, not to mention exception safety, a basic implementation of a "templated" dynamic array implemen
16.
▲
by
crafn
11y ago
That's partly true. However, you do get rid of the complexity you never wanted in the first place. For me this is OOP, RAII, C++ allocators, exceptions, references, vtables (see my post about runtime recompiling), templates (mostly), C
17.
▲
by
crafn
11y ago
It's quite restricted still. For example changing datatypes during recompilation is problematic, at least if you don't destroy the instances before reloading, and re-instantiate afterwards. I don't bother to do that, because
18.
▲
by
crafn
11y ago
Sure, although I don't have a separate server. Explanation here: http://pastebin.com/Nm6Qta4u
19.
▲
by
crafn
11y ago
There are some arguments to stick with C instead of a very C-like subset of C++. Off the top of my head: - Recompiling and reloading parts of your game at run-time is quite easy in C. In C++ you have to make sure (at least) that nobody has
20.
▲
by
crafn
11y ago
From gamedev perspective: Every time I've prototyped something on a GC'd language (java, actionscript, javascript, ..) I soon find myself optimizing memory allocations and not making the game because the GC causes too much overhea