Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Why do PC games take so much memory?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
22 replies to this topic

#1 XaosII   Members   -  Reputation: 122

Posted 26 September 2007 - 10:36 AM

Not sure where to put my question. Maybe "For Beginners" but not sure its exactly a beginners question. Game programming seems more fit, but i dont think the question at hand is entirely the fault of programming. So i figure this, as a general board, might be better. If a different section is more appropriate, please let me know. But my question is why do PC games take up so much more memory than console games do, even when its the same game on both platforms? Consoles are restricted in their maximum amount of memory and developers need to be more resourceful about their assets and code in order to fit it in the 512 MB of memory available (for today's consoles). Still, it strikes me a bit odd at the huge disparity of memory consumption and usage for PC games. Im aware the OS, in general, eats up a fair chunk of memory, but even looking at the task manager and how much memory the game allocates for itself, its not unusual to see 1GB+ memory committed to the game - and thats not even counting what it could possibly be taking up in the page file! The extra memory typically present in a PC means developers can use it to their advantage by loading more assets and reducing future load times, have larger levels, more doodads and junk in maps, etc. But im failing to see how some of those things justify a 2 or 3 times difference in memory usage? What exactly is taking up all that memory compared to the same title on a console? Can PC game developers actually be much more resourceful?

Sponsor:

#2 Ravuya   Moderators   -  Reputation: 127

Posted 26 September 2007 - 10:38 AM

Because it's a lot easier to say "upgrade your computer" than optimize memory use?

PC games are kind of used to it.

#3 XaosII   Members   -  Reputation: 122

Posted 26 September 2007 - 10:49 AM

Im sure theres some of that, but if the developers are already working on a very tight memory manager (for the console version), how difficult can it be to carry over the same concepts to the PC version? They already did a good bit of the hard work.

#4 d000hg   Members   -  Reputation: 782

Posted 26 September 2007 - 10:58 AM

Typically they are not working on a tight memory limit. They work normally until the lead realises the memory is full and then makes people optimise. This is essential on older consoles, but pretty time-consuming. And there's no need to do it on a PC unless you need the space. If you write a game which uses 1GB and PCs have 2GB, trying to reduce your use to 500Mb is pointless. If your game really needs 2Gb then you need to figure this out.

#5 Kest   Members   -  Reputation: 547

Posted 26 September 2007 - 12:36 PM

I think a lot of that is being allocated by DirectX managed memory. More specifically, textures placed into system memory, waiting to be uploaded to the graphics card when needed.

I've never imposed any type of system memory limitations on my own project, happily adding allocations by whatever massive quantity that I want, and it's often using 64MB of video memory. But its memory footprint (shown by task-manager) is only about 31MB. Most likely because I don't use managed resources.

#6 Gaiiden   Senior Staff   -  Reputation: 5233

Posted 26 September 2007 - 02:11 PM

There aren't many games these days that can seriously tax system memory of even a low-end computer by today's standards. A lot of budget PCs are shipping with a gig of memory in them. My girlfriend bought her parents a $348 Compaq with 1GB of RAM. Even if you don't have a gig it's cheap to upgrade these days. Plus, when you're running a game it's not very common for people to have a lot of other applications running at the same time (I log into a separate Gamer account in XP that doesn't load any of the stuff I use in my normal workspace account) so developers pretty much plan for the OS taking up some space and assume they can take all the rest. Which isn't a bad assumption IMO.

I realize this may be a slightly different way to look at the question, but that's how I view it. It's not saying "we use a lot of memory because our game needs it", for me it's more "we use a lot of memory because we can!"

Drew Sikora
Executive Producer
GameDev.net


#7 Promit   Moderators   -  Reputation: 7335

Posted 26 September 2007 - 03:17 PM

Well, look at it this way.

A reasonable working set for graphics data nowadays is anywhere in the realm of 384 MB and up, depending on your hardware target. That's data which is currently live in some sort of surface or buffer. From that, it's reasonable to say that at least 256 MB is backed data -- it exists in video and system memory, for events like device lost. (Notice that this data will probably be paged out.)

That's the first 256 MB of missing memory. The higher end the game, and the higher end your graphics card, the more this will be. On a modern high end system, you could do in the 1 GB range without any real difficulty. Oh, and on Vista, the video memory used might show up as used memory too, so you can double the figure.

Then we've got your basic code and data segments. That's all your system DLLs, all of your compiled code along with its associated resources, string tables, lookup tables, etc. Don't forget the OS resources, either. Add a nice 128 MB or so for all that.

Throw in a meager 128 MB for actual game data, and we're already at half a gigabyte. And these are all on the small side nowadays. Did you know that a number of new games are brushing against their address space limits? This is a pretty big problem on Vista, in fact. That 2 GB limit is getting to be a real problem.

#8 Extrarius   Members   -  Reputation: 1412

Posted 26 September 2007 - 03:39 PM

Quote:
Original post by Promit
[...]That 2 GB limit is getting to be a real problem.
The limit is only for x32, right? I know x64 architectures support much greater address spaces (48 bits at least, iirc), but does windows x64 actually allow full use of it?

#9 Promit   Moderators   -  Reputation: 7335

Posted 26 September 2007 - 04:08 PM

Quote:
Original post by Extrarius
Quote:
Original post by Promit
[...]That 2 GB limit is getting to be a real problem.
The limit is only for x32, right? I know x64 architectures support much greater address spaces (48 bits at least, iirc), but does windows x64 actually allow full use of it?
Yeah, that's an x86-32 limitation. It can be expanded to 3 GB on Windows, but that's not a practical solution and it's actually a rather dangerous one.

The amount of space on x86-64...depends. The answer is that 64 bit Windows limits you to 16 TB of address space, but the limitation can be raised arbitrarily. (The bigger it gets, the bigger your PTEs get. PTEs cost real memory, not virtual memory.)

#10 XaosII   Members   -  Reputation: 122

Posted 26 September 2007 - 04:39 PM

Thanks for all your responses guys, though im a bit disappointed that the truth of the answer is "we do it cuz we can" from the point of developers. I mean, inst that purposely hurting the game's scalability for lower systems?

Im aware of the argument that its cheap to upgrade ram, but with how RAM hungry these games are (relative to the forced restrictions on a console) having only 1GB of memory, but a $200+ video card would still yield fairly poor performance. Probably smooth framerates when still, but stuttering while moving (and loading assets into view). It only makes the task of upgrading more expensive and confusing for a person not so tech savvy.

Are the semi-small gains (for a good chunk of titles) from the additional use of memory for a PC-console title worth it for PC gamers when they take up twice the amount?

Im bringing this up since i like to play some of my games in windowed mode, and have something else up on a second monitor. But with the game taking up so much memory, it tends to make the other application slow too. Yeah i know im not really helping reduce memory usage :P and i certainly cant do something like that on a console....but its still a bit baffling why they dont purposefully create tighter memory controls.

#11 Kest   Members   -  Reputation: 547

Posted 26 September 2007 - 06:06 PM

Quote:
Original post by XaosII
Im bringing this up since i like to play some of my games in windowed mode, and have something else up on a second monitor. But with the game taking up so much memory, it tends to make the other application slow too.

I doubt they're that related. It's more likely that the program is running slowly because the game is juicing up the CPU.

#12 generic_name   Banned   -  Reputation: 100

Posted 26 September 2007 - 07:28 PM

Quote:
Original post by XaosII
Im bringing this up since i like to play some of my games in windowed mode, and have something else up on a second monitor. But with the game taking up so much memory, it tends to make the other application slow too. Yeah i know im not really helping reduce memory usage :P and i certainly cant do something like that on a console....but its still a bit baffling why they dont purposefully create tighter memory controls.


Takes time away from other things in the game. And since developers can reasonably assume they have free access to most of the system memory why bother? Sell more games by having more detailed maps, models, etc then only taking up 64 megs of RAM.


#13 SimonForsman   Crossbones+   -  Reputation: 6167

Posted 26 September 2007 - 07:41 PM

Quote:
Original post by XaosII
Thanks for all your responses guys, though im a bit disappointed that the truth of the answer is "we do it cuz we can" from the point of developers. I mean, inst that purposely hurting the game's scalability for lower systems?

Im aware of the argument that its cheap to upgrade ram, but with how RAM hungry these games are (relative to the forced restrictions on a console) having only 1GB of memory, but a $200+ video card would still yield fairly poor performance. Probably smooth framerates when still, but stuttering while moving (and loading assets into view). It only makes the task of upgrading more expensive and confusing for a person not so tech savvy.

Are the semi-small gains (for a good chunk of titles) from the additional use of memory for a PC-console title worth it for PC gamers when they take up twice the amount?

Im bringing this up since i like to play some of my games in windowed mode, and have something else up on a second monitor. But with the game taking up so much memory, it tends to make the other application slow too. Yeah i know im not really helping reduce memory usage :P and i certainly cant do something like that on a console....but its still a bit baffling why they dont purposefully create tighter memory controls.


It should perhaps be noted that you can reduce (and sometimes even remove)loadtimes quite significantly by keeping as much as possible in the system memory (You can even remove the need to perform certain calculations in realtime by keeping the results in lookup tables), thus there really is no point in using less RAM as that would reduce performance for all systems that have enough memory for no reason. (RAM is insanely cheap compared to other components)

#14 d000hg   Members   -  Reputation: 782

Posted 26 September 2007 - 08:12 PM

Quote:
Original post by XaosII
Thanks for all your responses guys, though im a bit disappointed that the truth of the answer is "we do it cuz we can" from the point of developers. I mean, inst that purposely hurting the game's scalability for lower systems?
It's not "we use a lot of memory because we can" but instead "we don't optimise because we don't need to". The people who buy games are the people who have decent PCs and so optimisation of this type doesn't get many more sales. That makes it a premature optimisation, and we don't do those.

Remember, making games is about making software. Making software is not about crunching down on every spare byte or CPU cycle, but about getting a product which works well for the people you sell it too, as quickly and cheaply as possible. It is business, NOT art.



#15 LockePick   Members   -  Reputation: 707

Posted 26 September 2007 - 08:40 PM

Quote:
What exactly is taking up all that memory compared to the same title on a console? Can PC game developers actually be much more resourceful?

256x256 texture = 65536 pixels
2048x2048 texture = 4194304 pixels
4194304 / 65536 = 64.

If a PC game is only using 2-3 times more memory, that's pretty good.

Console versions of games usually have their textures scaled down from the resolution that the artists actually created them at. On the PC, it's assumed you will have vastly more memory (because if you play modern games that assumption is correct) so it allows developers to put in the assets as they were originally intended. It's not a matter of "PC game developers are lazy" or "PC game developers don't optimize". It's a matter of taking advantage of the hardware available to you. Seeing as 2GB of fast RAM is less than $100, it's something every gamer should have.

Most games aren't designed to be run in a window while you use other applications. In most games, that concept is ridiculous to begin with. You shouldn't have time to do other things in the first place.

Try turning down texture detail in whatever game you're using, if the option is available, and you should see massive drops in memory usage (and possibly big gains in performance, too).

#16 rick_appleton   Members   -  Reputation: 857

Posted 26 September 2007 - 09:14 PM

Just out of interest, does anyone know what the memory footprint of Warcraft 3 is?

#17 slayemin   Members   -  Reputation: 2790

Posted 26 September 2007 - 09:20 PM

This is a pretty common saying regarding memory management:

"It's more expensive to pay a programmer to be efficient with resources then to purchase faster/more resources"...be they RAM or CPU speeds.

Also, as games get more advanced with graphics and 3-D models, they require more RAM to store that information. A low poly model has fewer points to keep track of then a high poly model so its ram footprint is smaller. Now that more ram is common, developers can create nicer looking games.

#18 Ysaneya   Members   -  Reputation: 1244

Posted 26 September 2007 - 09:32 PM

Quote:
Original post by Promit
Well, look at it this way.

A reasonable working set for graphics data nowadays is anywhere in the realm of 384 MB and up, depending on your hardware target. That's data which is currently live in some sort of surface or buffer. From that, it's reasonable to say that at least 256 MB is backed data -- it exists in video and system memory, for events like device lost. (Notice that this data will probably be paged out.)

That's the first 256 MB of missing memory.


It's worse than that.. all data is backed up in system memory, not only data in use in video memory. When you lock a texture, copy a buffer to it and unlock, you can very well delete that buffer just after, so the original data does no longer exist, and the API has no way to know it.

Y.


#19 superpig   Staff Emeritus   -  Reputation: 1825

Posted 26 September 2007 - 10:00 PM

Quote:
Original post by Ysaneya
It's worse than that.. all data is backed up in system memory, not only data in use in video memory.
Under D3D, D3DPOOL_DEFAULT surfaces are not backed up (permanently) in system memory. Yes, while you lock one of those surfaces to write to it you're using system memory, but that's a temporary block that is discarded once you unlock it and it's finished being uploaded to video memory.



#20 Kest   Members   -  Reputation: 547

Posted 26 September 2007 - 10:03 PM

Quote:
Original post by slayemin
A low poly model has fewer points to keep track of then a high poly model so its ram footprint is smaller.

That really isn't much of an impact. Models are extremely cheap on ram. Especially compared to textures.

Often, a model vertex (point) uses about 32 bytes of memory. A 5000+ vertex model would be a pretty high-res model of a humanoid, and would cost about 150-200KB. Pixels are usually about 4 bytes of memory. An average size texture of 512x512 is the memory equivalent of 32,768 vertices. A texture of 1024x1024 would match 131,072 vertices.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS