Live data from Hacker News

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

github.com

11–20 of 179 posts

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

#11
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…

Yeah, I'd like to know why you'd still use C++ at all if you find Orthodox C++ appealing. It would seem easier to just write C. Unless I'm missing something (I probably am; don't write enough of either one to have an informed opinion, which is why I'd love to hear more about this).

Well, you still get classes and templates.

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

#12

I partially agree with "Orthodox C++". Templates should be used only when needed and for turn the code simpler(not like the abomination used in most of Boost libraries). But also, i don,t see any sane reason to reinvent the wheel and reimplement basic stuff like thread/mutex classes when the C++ version works well. Or using "NULL" instead "nullptr", or using that pre-processor macro garbage instead templates/constexp…

When I started the project C++11 was not supported well on most compilers. I'm fine with new features when they don't limit my freedom.

I'm fine with nullptr, it is going to replace NULL very soon.

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

#13

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…

Do features or concepts kicked around in the "hobbyist" engines ever influence or inform the mainstream engines?

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

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

If you're gonna bother with orthodox C++, or Go (suited to 3d games? nobody seems to have tried or lived to tell the tale), or Rust (no libraries anyway, so you may as well use something which wraps C easily and is higher level), why not try Nim?

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

#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

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

#16
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…

Yeah, I'd like to know why you'd still use C++ at all if you find Orthodox C++ appealing. It would seem easier to just write C. Unless I'm missing something (I probably am; don't write enough of either one to have an informed opinion, which is why I'd love to hear more about this).

RAII is incredibly attractive, especially if you disable exceptions.

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

#17

Earlier quoted context omitted.

Yeah, I'd like to know why you'd still use C++ at all if you find Orthodox C++ appealing. It would seem easier to just write C. Unless I'm missing something (I probably am; don't write enough of either one to have an informed opinion, which is why I'd love to hear more about this).

RAII is incredibly attractive, especially if you disable exceptions.

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

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

#18
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.

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

#19
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?

I mean it's kind of a smartass answer, but—don't fail during constructors. Move all possible code that can fail into an initialize method; check explicitly for allocation failure and/or put things on the stack instead of heap when possible; consider failing hard with a stack trace or core dump over catching and processing exceptions before (likely) failing anyway.

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

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

Here you go: https://github.com/id-Software/Quake-III-Arena
Post reply on HN