←back to thread

163 points mariuz | 5 comments | | HN request time: 0.414s | source
Show context
Fokamul ◴[] No.43620333[source]
Too bad big companies don't care about this and more. "Morons(gamers) will just buy new hardware, fu hiring engine core devs".
replies(4): >>43620616 #>>43620688 #>>43623759 #>>43625095 #
1. maccard ◴[] No.43620688[source]
This attitude comes up on here whenever gamedev comes up, and I really dislike it.

Here's a quote form the article

> I’ve already told you that this method saves 328 bytes per actor, which is not too much at first glance. You can apply the same trick for SceneComponents and save another 32 bytes per SceneComponent. Assuming an average of two SceneComponents per actor, you get up to 392 bytes per actor. Still not an impressive number unless you deal with a lot of actors. A hypothetical example level with 25 000 actors (which is a lot, but not unreasonable) will save about 10 MB.

I've a lot of experience with Unreal, and 25k actors is likely to run into a whole host of problems, such that saving 10MB of RAM is likely to be the least of your worries. You'd get more benefit out of removing a single unneeded texture, or compressing a single animation better.

One of the reasons developers use unreal (and yes, developers do use Unreal, it's not just "big companies" forcing their poor creatives to use the engine) is _because_ unreal has more man hours of development in a year than a small team would ever be able to put into their own engine. Like any tool it has tradeoffs, and it does have a (measureable) overhead. But to say that companies don't care is just disingenuous

replies(1): >>43621555 #
2. speed_spread ◴[] No.43621555[source]
Actors are handled by the CPU where shaving 10MB can mean that more things can now fit in the cache leading to dramatic improvement.
replies(1): >>43622238 #
3. maccard ◴[] No.43622238[source]
If you’re going to make that assertion then back it up with numbers. It could just easily have absolutely no impact whatsoever because your game thread is spending all its time on navigation mesh queries which have nothing to do with actors or UObjects.
replies(1): >>43626653 #
4. speed_spread ◴[] No.43626653{3}[source]
The keyword here is "can". I'm just saying it's definitely possible that a 10MB memory reduction in a critical spot results in significant performance gains. I agree 100% that any optimization should be backed up by solid benchmarks.
replies(1): >>43627112 #
5. maccard ◴[] No.43627112{4}[source]
It also “can” also do absolutely nothing, or “can” introduce false sharing in multithreaded code.

Lots of things are possible - but speculating on every possibility as though they’re equally probable doesn’t provide any value. Actors in unreal are a fairly low level item, but most games aren’t going to have 25k actors in a world, and if they do, 10MB of memory usage fragmented across actors is likely the least of their worries.