site banner

Tinker Tuesday for November 19, 2024

This thread is for anyone working on personal projects to share their progress, and hold themselves somewhat accountable to a group of peers.

Post your project, your progress from last week, and what you hope to accomplish this week.

If you want to be pinged with a reminder asking about your project, let me know, and I'll harass you each week until you cancel the service

1
Jump in the discussion.

No email address required.

How have you been doing @Southkraut?

Lots of time wasted on engine switching and reconsideration. Better focus more on disassociation from engine even at cost to performance. Said this before, but optimization always draws me towards tighter integration - need to not do that. A cleaner separation with minimal engine specificity (is that a word?). Don't let the siren song of premature optimization lure me from the good path.

Is there a way to do C++ without header files? I realize it's incredibly petty, but having two files per class just keeps turning me off of Unreal.

Other than that, I keep comparing engines.

Unity:

  • C# as a scripting language.
  • Single-precision coordinate system only.
  • Messy development, priorities of the Unity company are unclear, future is uncertain.
  • Documentation is pretty decent.
  • Has a live scene editor.
  • Many features are semi-maintained only and better not used.

Unreal:

  • C++ as scripting language. Big meh. I just don't find it fun to work with.
  • Overengineered editor and blueprint system keeps getting in the way.
  • Huge file size and memory footprint.
  • Amazing features; would anyone contend that this is the most powerful engine?
  • Double-precision coordinates out of the box.
  • Documentation is OK, but surprisingly thin on many features. Seems to live mostly in youtube videos.

Godot:

  • Does support C# scripting AND double-precision coordinates...but good luck getting that to compile, nevermind getting support for it when it bugs out.
  • Engine
  • Documentation is OK.
  • Community is very actively woke.
  • Has a bunch of bugs.
  • Amazingly small file size and resource consumption.
  • No live editor.

Redot:

  • Like Godot, minus the politics but I'm not sure how long it'll live.

Stride:

  • Engine written in C#, open source, and scripting is in C#. C# versions are up to date. It's a dream come true.
  • No live editor.
  • No double-precision coordinates.
  • Very buggy.
  • The documentation is completely worthless.
  • The community is agreeable but doesn't have the manpower and/or time to bring the engine up to scratch.
  • Even if I don't use the engine itself I can cannibalize many utility classes of theirs and even learn a thing or two about efficient C#!

No idea where I'm going with this. Right now I'm trying to fiddle some dev time into my new routines. Not yet sure how to. Maybe I'll just get used to the job and end up being less weary by the end of the workday so I can get something done in the evenings, or maybe I'll follow a friend's recommendation and just get up even earlier to do some coding in the mornings. Or maybe I'll find a way to take a few short breaks (legitimate breaks, not slacking off.) during work to...I don't know, dictate code to my phone?

Is there a way to do C++ without header files? I realize it's incredibly petty, but having two files per class just keeps turning me off of Unreal.

If you're creating an application or something like a dynamic library using someone else's API, technically you can put every single thing into one giant .C file with no header files and it'll work. If you're creating a library for others to use, either it needs to be "header-only" (i.e. it all gets recompiled by every user, which really only makes sense for pure-template code where the user does every instantiation) or it needs to have separation between declarations in headers (for the users' compiler) and definitions in source files (for the users' linker). Technically you can mark all your definitions as inline and put them in headers and just have one file per class even if you're not doing fancy template tricks, but people don't do this, just to avoid longer recompile times.

It's common to have more than one class declaration per header file, but for big projects it's just easier to keep everything organized if you have one class per header.

It's not uncommon to do "unity builds" (no relation to the game engine), where a bunch of source files get batched together so that (because of include guards) the header files only have to get parsed once per batch rather than once per file. This is just to reduce compile times and allow for more Inter-Procedural Optimization in a single compiler pass, AFAIK.

Complaining about two files per class isn't petty so much as weird, though. Partly I say this because I love having two files per class (the declarations are "what does this do", which is easier to read when removed from "what messy tricks does this use to do it" definitions), but mostly I say this because there's so much more in C++ to complain about. I'd have imagined a C# fan would have been most annoyed by having to manually manage heap allocations, with no garbage collection.

would anyone contend that this is the most powerful engine?

I thought that was the general consensus. People also think it's the hardest engine to use (which is why I played with Godot with my kids, despite C++ experience myself), but AFAIK it's had the most features for forever and people manage to wring out the most performance from it too.

I thought that was the general consensus.

It is. I posted late at night and was tired and got dumb and messed up my Englisch to the point of stating the opposite of what I intended. Contend, contest, contradict...Nach Müd kommt Blöd.