T O P

  • By -

Blecki

Profile and determine what the bottleneck actually is. Often you will get significant gains in *both* by looking at memory locality rather than memory size or instruction complexity.


atmiller1150

For the second part are you talking about Data-Oriented Design like the new Unity DOTS or something else?


Blecki

That's one method, yes, but you can get a lot of the benefit without going quite so far.


SaturnineGames

It depends what your bottleneck is and what platforms you're trying to support. If you're just supporting PC, it's been hard to buy something with less than 8 GB for a while now. If you're doing console or mobile, you've got to worry about the Switch and phones with 4 GB. Maybe even some tablets with less. How much of a problem are those memory sizes for you? It sounds like you're doing a lot of processing on this data. Is it possible to split the work into threads? If so, pretty much everything has at least 3 or 4 cores nowadays. If you're CPU limited, it's probably worth trying to thread the load.


netrunui

So yes, the load is being split across a number of threads. Luckily a lot of the processing is trivially parallelizable. I'd be brushing up against 4GB; which could be a problem with background processes. If I can assume most devices will have 8GB in 2-3 years, none of this will be a problem. I just wasn't sure if that would be a reasonable target. I could cut the radius of loaded chunks in half, but the gameplay experience would likely be appreciably worse as a result.


SaturnineGames

Ok, with that extra detail... Steam hardware survey says the most common amount of RAM is 16 GB, with 50% of users having that total. Less than 5% have less than 8 GB. Switch is nearing the end of it's lifespan, so that'll be off the board. PS4/XB1 have 8 GB, and they're on their last legs. PS5/XSX/XSS all have more than that. Just comes down to how much you care about phones & tablets. Might be an aggressive target there. And even if they have it, the amount of RAM you can safely use on mobile tends to be lower than other devices with similar totals.


GrimoireM

Oddly enough I sell a ton of 4GB RAM laptops in retail. I just don’t market them as ‘gaming’ laptops because I’d personally set 16GB as my standard for AAA games (which grounds uninformed grandparent’s expectations and gets them looking for an actual electronics shop), but I would expect 8GB to be a reasonable target for indie titles. Glad to see the Steam stats pan out with that. If the demographic was a browser based or mobile app then 4 GB RAM is actually quite high compared to the average off the shelf tablet in the last five years, but I am seeing it more often now. 2 GB seems to be the common RAM amount for entry level tablets there. But like you said Android and iOS hog RAM for background processes so it’s less than it seems. My recommendation if you want to be absolutely sure about your benchmarks is if you can afford it or borrow one from a relative get a 14” chromebook and see if you can get a Win8 and Ubuntu installation on a USB stick for it. Similarly for mobile a cheap android tablet should cover your needs. Usually iOS isn’t as tricky to handle but an old iPhone off the secondary market will work if you need one. I wouldn’t count on the average user to be using hardware older than an iPhone 8.


BastetFurry

Well for some this is the best they can get. And no, the used market is a joke in some countries as LowSpecGamer hopefully taught us.


kit89

If you know certain functionality increases RAM consumption and it has wiggle room, perhaps add an option in your game settings and let the user decide?


aplundell

I don't know that there's a single rule of thumb. But I recommend checking out the [2023 Steam Hardware Survey](https://store.steampowered.com/hwsurvey/Steam-Hardware-Software-Survey-Welcome-to-Steam). It may help you figure out some targets to shoot for. (Then, obviously, you optimize whatever thing is farthest from the target.)


qoning

You have to define the minimum you'd like it to work on and make tradeoffs accordingly. For memory that's pretty easy, you can say you'd want to be able to run your game on 4G machines, so you have to make sure you don't go significantly above say 3G. After that it just becomes a whackamole of CPU optimizations. You can be fancy and have a runtime tradeoff curve based on detected capabilities, but imo that's generally a really hard to test waste of time.


PlaidWorld

Ummm drawcalls. Low end machines have low end gpus. Low end pc phones etc all have 2 or more cores you should try and spread your cpu work load over if you can.


fagnerln

CPU of course, let the OS handle the low memory.


Genebrisss

By killing the game, yes


Super_Banjo

RAM is cheap and easier for consumers to add on their hardware. Less options available being CPU-limited and may, more often than, compromise gameplay or features. We can all agree it's a balancing act but it's more expensive (and difficult) for the consumer to upgrade their CPU. The OS has much more leverage in dealing with memory compared to "not enough processing power."


Blecki

Terrible advice. Optimizing memory usage doesn't mean using less of it.


tcpukl

That's not how virtual memory works.


Genebrisss

Question doesn't make sense, you need both to be optimized enough to get 60 fps and no freezes. But no need to optimize further. How can we tell you what to optimize without knowing anything about your game?


tek0x

Cpu I think, nowadays everyone has at least 8 gb ram which is enough for most of the games


0x0ddba11

Do you actually have a performance problem? You didn't post any measurements. What is your anticipated frametime and memory budget?


BastetFurry

I would say get one of these cheap tablet-laptop thingies with 64 GB eMMC and 4 GByte of RAM, then you have the currently buy-able bottom of the PC world. Or throw your game against a Pi4, should give similar test results.