Jump to content

Photo
* * * * * 1 votes

Saving System Resources (ZC, ZQ, RAM)

RAM Saving Less System Resources ZQuest Zelda Classic Tips and Tricks

  • Please log in to reply
3 replies to this topic

#1 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 02 September 2015 - 08:59 AM

This is a small, but important grain of knowledge:

 

Some users of ZQuest may look at the 'Map Count', and decide to set it at a very large value--much higher than what you are using at present--to prepare for a potentially large game. What you may not realise, is that when you open a quest in Zelda Classic, an amount of RAM is pre-allocated and never released for each map that the game claims to use--even if that map is blank!

 

The basic guideline, is that ZC uses around 150 MB of RAM, plus 1MB per map. That means that if you assign 256 maps, you can expect ZC to require 470+MB of RAM, on average, potentially more.

 

The reason for this, is in part due to how FFCs work internally. All 32 FFCs per screen, are loaded when the quest is opened. They are always running, even when not in use. Thus, more maps, equals more screens, and more FFCs to keep in memory.

 

This also applies to ZQuest, and a smaller map count, will use fewer system resources, in the editor, as well as the ZC player.

 

If you have ever wondered why some games use hideous amounts of RAM, this is why. The problem, is that memory is not deallocated, so even after quitting the game, the memory footprint isn't resized. If you load a quest, and your RAM usage shoots up, the only way to ensure that you reduce ZC to its minimum footprint, for the next game, is to close the programme entirely, and then re-open it.

 

If you absolutely need 256 maps, you can use them, but you should only ever allocate as many as you need, at any one time. You can always easily expand the number of maps at any time, should you need more than the amount you set (unless you are using all of them, in which case, you've hit a ZC limitation).

 

Note that this applies to Maps, not DMaps. Multiple DMaps that share Maps should never increase the memory footprint by any significant factor.


Edited by ZoriaRPG, 03 November 2015 - 04:13 AM.

  • Theryan, strike, Jared and 1 other like this

#2 Nimono

Nimono

    Ultra Miyoa Extraordinaire!

  • Members
  • Real Name:Matthew
  • Location:Static Void Kingdom

Posted 04 October 2015 - 12:29 PM

Woah, really? I had no idea that ZC used RAM based on how many maps you assign to your quest. I'll definitely have to keep this in mind! Just one question: You said each map adds about 1MB to the base RAM usage of 150MB; however, your example of 25 maps says that it becomes 470+. If it's just 1MB per map, shouldn't it be 175MB total? 150 + 25 = 175, after all... Or did you mean it's 1MB per screen per map?



#3 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 03 November 2015 - 04:13 AM

Woah, really? I had no idea that ZC used RAM based on how many maps you assign to your quest. I'll definitely have to keep this in mind! Just one question: You said each map adds about 1MB to the base RAM usage of 150MB; however, your example of 25 maps says that it becomes 470+. If it's just 1MB per map, shouldn't it be 175MB total? 150 + 25 = 175, after all... Or did you mean it's 1MB per screen per map?

 

Sorry, that 25, is supposed to be 256.

 

Note also, that a blank map, is still a map. It's the FFCs per screen, that kill RAM management.

 

256 blank maps use the same RAM as 256 not-blank maps, insofar as FFCs are concerned. Blank screens on a map, are irrelevant in this matter. This is a good reason to populate your maps with screens, rather than adding more maps, and to use DMaps to segregate areas, whenever possible.

 

Last, my apologies for the delay in my reply. I hadn't noticed your question until just now.

 

P.S. 1MP per, is approximate. 470MB seems the normal footprint with all 256 assigned as 'in use', blank, or not. It's probably around 1.15MB per map, or something like that.

 

I should also note that ZC memory management doesn't exist in any real terms. If you load a game that eats up 400MPB and then load a game that would normally use 200MB, you won't free that 400MB until you exit ZC, and relaunch it. Then, that 200MB quest will use 200MB, freeing that additional 200MB for other use. Until you close ZC, that 400MB is pretty much locked. 

 

Again, this is all based on map count, not what is on the maps.


Edited by ZoriaRPG, 03 November 2015 - 04:22 AM.


#4 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 03 November 2015 - 04:44 AM

Yeah, it's the ffcs. It just sort of went under the radar since there aren't that many quests that use lots of maps; at least not that I play. Would of been fixed in 2.50.2 if it weren't for ffc carryover and RunFFCScript() that make it more non-trivial.

Also, not my fault! :P



Also tagged with one or more of these keywords: RAM, Saving, Less, System, Resources, ZQuest, Zelda Classic, Tips and Tricks

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users