Live data from Hacker News

Show HN: Crown – A flexible game engine written from scratch in C++

github.com

61–70 of 179 posts

Re: Show HN: Crown – A flexible game engine written from scratch in C++

#61
post #49
post #35

Earlier quoted context omitted.

> Go is a bad choice for game with its unavoidable GC. Better let the Unreal guys know about it then.

There's a big difference in engine support for GC of a certain object type with lots of support for tuning ( https://wiki.unrealengine.com/Garbage_Collection_%26_Dynamic... and https://docs.unrealengine.com/latest/INT/Programming/UnrealA... ) and language-level untuneable GC of everything.

Not all language-level GCs are untuneable .

Also if one doesn't allocate like crazy on the heap, there is no reason the GC needs to work.

Re: Show HN: Crown – A flexible game engine written from scratch in C++

#62
post #59
post #35

Earlier quoted context omitted.

> Go is a bad choice for game with its unavoidable GC. Better let the Unreal guys know about it then.

The important difference is that not everything in Unreal is GC'd, only UObjects. Internally the rendering, animation, networking and other high-performance subsystems don't use GC because they can't afford the overhead. Being able to opt in to GC where it's useful is great, being forced to use it everywhere can be a hassle.

> Being able to opt in to GC where it's useful is great, being forced to use it everywhere can be a hassle.

True, but just because a programming has language level GC, it doesn't mean it must be used everywhere.

If one doesn't allocate like crazy on the heap, there is no reason the GC needs to work.

Also using value types is always an option.

One also doesn't call malloc() in such high-performance subsystems.

Re: Show HN: Crown – A flexible game engine written from scratch in C++

#63

If you come to finance, most of the developers love premature templatization, it makes them feel like they know something. Not sure it that can be attributed to their insecurity about C++ coding skills, but it gets really ridiculous at times.

I have a friend who runs a hedge fund, not really insecure at all but uses templates vigorously. More stuff in compile time rather than runtime. In critical sections inheritance can be prohibitively expensive because of the use of lookup tables.

Re: Show HN: Crown – A flexible game engine written from scratch in C++

#65
post #34

Wow it seems to contain a full level editor written in vala, a language I hadn't heard of. It seems to be a high level language similar to C# but with a native compiler and some different semantics (RC instead of a tracing GC for example). Is vala widely used?

> RC instead of GC RC is a GC algorithm

I just had to change my comment now, thanks.

Re: Show HN: Crown – A flexible game engine written from scratch in C++

#66

Great learning project, but for production just use Unity unless you absolutely, positively (triple-check) cannot. You will be massively more productive.

Umm, no. Unity has lots of problems that make it not ideal for games that have fast action or are developed by a larger team.

Like, the fact that it uses an old version of Mono on not-Windows, which uses a mark and sweep garbage collector. You end up with frequent stop-the-world garbage collection pauses that freeze the screen for seconds at a time. Play any Unity game on the PS4 and you'll see it frequently.

I've also heard that Unity's project asset management doesn't really work for teams that have more than 10 people working together, but that's something I don't have direct knowledge of.

Re: Show HN: Crown – A flexible game engine written from scratch in C++

#69
post #8

It's a lost cause: there's no such thing as "sane" or "orthodox" C++. Instead, use something actually sane like Go. Or Rust, if you really must (first bad pun is free, then it's 50 cents each).

sane like Go Yet Go uses the oh-so-error-prone return value error checking that has been so successful in C :/

Disclaimer: Not a go apologist, I admire it, but don't use it.

With Go you get a compiler error if you don't do something with that error. You have to explicitly decide to ignore it with `_`. As far as I remember that's quite different from C where you can get an error code, ignore it, and never realize you've missed it.

Re: Show HN: Crown – A flexible game engine written from scratch in C++

#70

While I find the "sane C++" approach pragmatic and practical all things considered, I'm firmly in the "time to use a better language if possible" camp. The problem with approaches requiring extra discipline is: it's an extra mental burden to bear while programming. Also, you'll always be limited by the fact that you're working in a less pure ecosystem and will likely end up using libraries written in "not very sane C…

Because catering a C++ compiler towards people who can't (and won't) actually learn C++ is stupid.
Post reply on HN