Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
6 registered members (EternallyCurious, AndrewAMD, ricky_k, 7th_zorro, 2 invisible), 478 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 3 1 2 3
Re: How to keep track of Memory usage [Re: Dooley] #466887
07/06/17 01:20
07/06/17 01:20
Joined: Apr 2002
Posts: 1,246
ny
jumpman Offline OP
Serious User
jumpman  Offline OP
Serious User

Joined: Apr 2002
Posts: 1,246
ny
Did you try spam loading the blank level then the new level and keeping track of sys_memory? That's how I noticed that some levels were stacking memory.

Re: How to keep track of Memory usage [Re: jumpman] #466888
07/06/17 03:20
07/06/17 03:20
Joined: Jul 2014
Posts: 72
D
DriftWood Offline
Junior Member
DriftWood  Offline
Junior Member
D

Joined: Jul 2014
Posts: 72
A few hints from the manual -
WMB - Map Entities
Quote:
Textures and shadow maps of the level and of map entities are preallocated in video memory at loading time, in order to maintain smooth gameplay. Textures of all other entity types are normally only allocated when the entity becomes visible.

Shadow -
Quote:
For preventing self shadowing of an entity, set its CAST flag together with the SHADOW flag.

Some setting to look at..
++ http://www.conitec.net/beta/ad3d_texsmaps.htm
++ http://www.conitec.net/beta/amap_subents.htm
++ http://www.conitec.net/beta/preload_mode.htm
++ http://www.conitec.net/beta/aent_preload.htm
++ http://www.conitec.net/beta/aent_purge.htm
++ http://www.conitec.net/beta/aentity-dynamic.htm
++ http://www.conitec.net/beta/ashadow_lod.htm
++ other LOD factors.

Sounds like a bug, either level_load or in preload.
No worries... using ent_pugre with a little bit of logic and the CLIPPED flag could be a basic optimization. http://www.conitec.net/beta/ae_clipped.htm

Code:
Ent action method
{
while(1)
{
if ((my.eflags&CLIPPED) && !my.not_run) 
{ ent_purge(my); my.not_run=1; } // lite-C
 if (!(my.eflags&CLIPPED) && my.not_run)
 {my.not_run=0; }   
  wait(1);
}
}
......
level_list method
function hide_all_ents()
{
// repeat for all entities
  for(you = ent_next(NULL); you; you = ent_next(you)) 
  {
    if (ent_type(you)==1 || ent_type(you) == 2 || ent_type(you) == 3)
{
if ((you.eflags&CLIPPED) && !you.not_run) 
{ ent_purge(you); you.not_run=1; } // lite-C
 if (!(you.eflags&CLIPPED) && you.not_run)
 {you.not_run=0; }    
}
  }
}



The code and reply are just a guess. Also could be linked to a custom shader setting on map_ents.

Re: How to keep track of Memory usage [Re: DriftWood] #466908
07/07/17 07:28
07/07/17 07:28
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline
User
Dooley  Offline
User

Joined: May 2005
Posts: 868
Chicago, IL
I did not "spam load" my level. I'm not 100% sure what that means.

I don't know if you saw my comment about bmap_purge(), but it seems to be a good function that still works (in A7 anyway). It looks like it may have been replaced by ptr_remove, so that might work as well. But you will have to use these on the actual BMAP* image you want removed from memory. So, for instance, if your terrain has a BMAP* pointer for the texture you are using, you can bmap_purge it when you need to remove or change the terrain.

Also, if memory is an issue for you, consider switching to .dds textures if you are not already using them. In one afternoon I eliminated 264 mb of texture memory from my game. I plan to continue switching my textures over to .dds, but this has been a huge gain in my memory issue...

Re: How to keep track of Memory usage [Re: Dooley] #466968
07/10/17 23:54
07/10/17 23:54
Joined: Apr 2002
Posts: 1,246
ny
jumpman Offline OP
Serious User
jumpman  Offline OP
Serious User

Joined: Apr 2002
Posts: 1,246
ny
Hey dooley, by spam, I meant just quickly reloading the level constantly and watching if any memory stacks. I have switched over to DDS textures, and it definitely helps with keeping memory low. I wanted to eventually do this, but I guess its better to start now.

In a test level, Im getting a texture memory overflow crash. This is done by creating A LOT of map entities, which increases the nexus. I know I shouldnt create that many entities in a real game, but with a nexus of 500, I wanted to see if I could reach the entity limit, as well as keep track of memory usage. I would like to know why the game would crash this way:



Last edited by jumpman; 07/11/17 00:00.
Re: How to keep track of Memory usage [Re: jumpman] #467190
07/19/17 23:11
07/19/17 23:11
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline
User
Dooley  Offline
User

Joined: May 2005
Posts: 868
Chicago, IL
I am avoiding map entities because they seem to stack the memory whenever you load them. I can't answer why.

Page 3 of 3 1 2 3

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1