Just reopening this as my game advances so does the "Out of heap space" fun...
When I started this debacle I had a few things I knew I wanted to make sure my game had. Loads of unique responses when a player typed into the parser. And to have a more dynamic gaming world, actors, NPC's etc moving around.
To reduce the size of my scripts I've been following the guidelines here:
http://sciwiki.sierrahelp.com/index.php?title=Memory_ManagementI use the text resource for all print statements. I've added scripts to the main.sc DisposeLoad section, but this is still not enough.
Do I need to include the template scripts like FEATURE, CONTROLS,GAME, OBJ, REV etc? Or do these all get removed automatically from heap when ego moves into the next room?
Currently I have listed:
(method (startRoom roomNum);this disposes these scripts after use to free up heapspace.
(DisposeLoad
NULL
FILEIO_SCRIPT
JUMP_SCRIPT
EXTRA_SCRIPT
WINDOW_SCRIPT
TIMER_SCRIPT
FOLLOW_SCRIPT
REV_SCRIPT
DCICON_SCRIPT
DOOR_SCRIPT
AUTODOOR_SCRIPT
WANDER_SCRIPT
AVOID_SCRIPT
DPATH_SCRIPT
SHOW_STATE
SIGHT_SCRIPT ;this was dded 18/9
DYING_SCRIPT ;this was added 18/9
DISCLAIMER_SCRIPT ;this was added 19/09
TITLESCREEN_SCRIPT ;this was added 19/09
INITROOMS_SCRIPT
)
If I use a RoomScript or an Actor/Prop script in my room does this need to be manually disposed of? Or will it get automatically disposed when ego moves to the next room? If not, what's the best way to have these dispose? What syntax do I need to use?
Is the heap space better in the SCI01 (Quest for Glory II) engine? If so, can I use this with my SCI0 template, my resource file and current game? Will I need to convert everything over? Does SCI Companion support this?
Regarding the Heap Space. To better understand it. How can I see a good visual map of the heap space in use. Or draw one like in the tutorials examples of the memory. Excuse my maths skills but I'm not to switched on with hexadecimal. I see the heap space references with the alt-m debug command are in hex. Do more than one reference here mean the heap space is fragmented? I've included screenshots of the objects on the heap space also. Is this normal to have so many objects in heapspace in a room? Also using O seems to overlap the text. I see my inventory items all there also. Does this take up loads of memory on the heap? Should I be using less inventory items? Or can these be optimised as to not use loads of heap space?
Thanks.