Jump to content

Tech. Question for Charles Regarding Memory Mgmt. in CM


Recommended Posts

Charles/BTS,

I'm curious as to how CM handles memory management. In particular, my friend seems to think that CM's memory management is poor based on comparison to other 3D games he has played. I.e. he's hearing his hard drive crunch a lot when loading large maps, etc., as info is apparently being cached to the hard disk.

I think the main reason for this is that large maps and high unit counts do indeed require great amounts of memory as previously discussed a number of different times here on the board. His contention is that he believes that other games produced by large game companies vs. good ole little BTS probably have programmers that go in and streamline code, etc., before the game is released in order to improve memory managment, usage, recovery, etc. I tend to think that no such optimiztion is probably being done by the big game companies and that the reason CM "seems" to need a lot of memory is because in fact it does use a lot of memory in order to keep track of all those units, the map terrain features, trees, etc. In other words a large CM map with many units is a totally different beast in terms of memory usage and requirements vs. say a multi-player game of Doom on a "large" Doom map.

I believe he is, at least in part, trying to compare apples to oranges and also living under a false belief that big game companies are spending the time and resources to perform some "magical" code massaging to improve memory management and usage. Assuming that such code tweaks and optimizatoins are even practical which based on my programming knowledge and experience they most likely are not. In other words, if a game needs a certain amount of memory then it needs that amount of memory, period. No amount of code streamlining / magical tweaking is likely to change the fact that it does.

Any comments would be appreciated.

Thanks,

Mike D

aka Mikester

[This message has been edited by Mikester (edited 07-26-2000).]

Link to comment
Share on other sites

Heh.

I think your friend gives the game industry too much credit. Given the way the development of most games proceeds (code-like-hell programming in the final weeks/months) expecting any kind of efficient resource utilization is pretty naive IMO. As computers get more and more powerful and disk and RAM storage become cheaper and more common, programmers can (and do) get away with less and less (storage) optimization. The emphasis is clearly on perceived performance rather than storage efficiency.

"Twitch" games that focus on fancy graphics and fast reactions need to maximize their visual performance. To achive this, programmers will spend a lot of time doing performance optimizations on small (but crucial) code segments. Note that there is usually a trade-off here: you can optimize for speed, or you can optimize for storage space required (disk and memory). It's hard to optimize for both, since most ways to speed up processing tend to require more storage space, and vice-versa. Personally, I think that poor memory-management is the bane of most software development projects (not just games) today.

CM is seated firmly astride the fence, I would say. It has fairly steep graphical requirements (the movies have to play back in real time, and there can be a LOT of objects/terrain to render) but on the other hand it doesn't have to cope with AI calcluations or highly-time-critical user input while the movies are playing.

Anyway, I would EXPECT a fair amount of drive activity when loading a map: the map and appropriate textures have to be loaded into memory SOMEtime. On my system, at any rate, I don't notice much drive activity after the initial load; maybe he's low on physical RAM and the game/OS is swapping to VM? If he's playing from the CD, I suppose it's possible that the game temporarily copies the map and some other data to scratch files on the hard disk for faster access; Charles might be able to provide enlightenment here. But that doesn't say much one way or the other about CM's memory management; rather, it seems to indicate that your friend needs to buy a bigger HD. wink.gif

------------------

Leland J. Tankersley

Link to comment
Share on other sites

Guest Big Time Software

Other 3D games your friend has played probably don't take place outdoors (where scores of different terrain types and features must be displayed) or with many dozens of different soldiers, uniforms, vehicles, small arms, guns, mortars, etc., etc. smile.gif

All this stuff has to be "textured" in 3D, and this is what's being loaded from the hard disk when loading a map.

CM is "smart" in the way it can "scale" to work on anything from a 4MB 3D card up to a modern 32MB card (and beyond). But to accomplish this, you may find that it "crunches" to the hard disk more often on, say, an old non-AGP 4MB card because it's trying to squeeze a LOT of graphics into a very small amount of memory. It takes this time to do its optimizations, so the game itself will run faster once underway.

Charles

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...