Live data from Hacker News

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

github.com

31–40 of 179 posts

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

#31

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?

Its really only used for gtk3 apps. I think it was created with that in mind by the gnome team

Toolchain was initially written in C#. Vala simplified a lot the switch to GTK+3. Today I think an IMGUI-like approach is the way to go for game tools. Rewriting the editors should be rather painless due to their engine-decoupled TCP/IP architecture.

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

#32
post #15
post #2

Interesting! I'd be interested in better understanding the motivation behind Orthodox C++. In particular, you seem to dump most of the C++ standard library: "Don't use anything from STL that allocates memory, unless you don't care about memory management." I now mostly avoid templatization in my own code unless there's a really good reason. But the standard library often lets me avoid explicit memory allocation. Woul…

Would love to hear more about the motivation for this (and other aspects of your C++ usage). I know EA wrote their own implementation of STL[1] to get around the problems that the standard implementation was causing in their game engines. Doing a 'diff' between that and a standard implementation should highlight some of the potential problems they found. [1] https://github.com/electronicarts/EASTL

What is "a standard implementation"?

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

#33
post #17

Earlier quoted context omitted.

RAII is incredibly attractive, especially if you disable exceptions.

If you disable exceptions hoe do you handle failures in constructors?

Instead of using a constructor you can use a constructor method e.g.:

    class Foo {
       public:
          static std::optional create();

       private:
          Foo();
    };

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

#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

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

#35
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).

Go is a bad choice for game with its unavoidable GC. And Rust is simply too complicated for a person wanting sane C++. D or Nim (or even C!) would make more sense.

> Go is a bad choice for game with its unavoidable GC.

Better let the Unreal guys know about it then.

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

#36
post #15

Earlier quoted context omitted.

Would love to hear more about the motivation for this (and other aspects of your C++ usage). I know EA wrote their own implementation of STL[1] to get around the problems that the standard implementation was causing in their game engines. Doing a 'diff' between that and a standard implementation should highlight some of the potential problems they found. [1] https://github.com/electronicarts/EASTL

What is "a standard implementation"?

By far the most used implementations are GNU's libstdc++ LLVM's libc++ and Microsoft's CRT.

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

#38

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?

Vala came out of Gnome/Gtk app development on Linux IIRC. It takes the GObject object layer from Gtk/Glib and promotes it to a first class part of the language: There’s a fairly direct translation from the various parts of the Vala language to C + GObject / Glib / Gtk+.

I don’t think it’s widely used outside of the Gnome desktop world, but there’s quite a few apps written in it out there.

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

#39

New hobbyist engines pop up from time to time and then they fade into memory. Why is this going to be different? Not to be too grumpy but game engines are a weird thing cause they are such complex beasts and usually the people using them have invested a lot of time in learning them. It's fun to make a new engine, but it probably doesn't have the community nor interest to cover the hard 10 to 20% that inevitably come…

Yeah, writing game engines can be a great framework for learning all kinds of useful and interesting concepts (and trying out experimental things!) but an actual, usable engine needs a ton of "boring" stuff regarding tooling and asset pipeline that hobby engines usually miss. When artist creates shiny visuals in it is expected to look somewhat like that in engine and then you find yourself deep in some FBX/whatever SDK/your own loader + shaders wondering how the pipeline is supposed to work and how all the usual formats seem to suck in some way. Add animations, IK etc. and suddenly there is a lot of work to do that production quality engines solve.

That is not to say it is always needed though if the game is really simplistic. But there are a lot of engines capable of rendering instanced bouncing OBJs out there.

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

#40
post #30

Earlier quoted context omitted.

RAII is incredibly attractive, especially if you disable exceptions.

Why would RAII be especially attractive if disabling exceptions?

Probably because exceptions are the biggest source of pain with RAII.
Post reply on HN