Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Ayumi), 1,266 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 4 of 4 1 2 3 4
Re: E1005 - Help [Re: William] #366702
04/06/11 14:42
04/06/11 14:42
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
No. The development engine uses indeed more memory for internal diagnostics, but the difference is in the ~1 MB range.

From what you posted so far, the problem was never solved. Do not ignore such a problem during development. You should always have an idea which memory your game resources require. When it's suddenly 1 GB more than you expect, you better care about that before doing anything else.

Check the memory indicators in the status panel - they tell you when something uses an unusual amount of memory. This should help you to find the problem. F.i. when it's the nexus, the reason is an object in the level; otherwise it could be a media file or something you allocate in the script.

Re: E1005 - Help [Re: jcl] #366786
04/07/11 09:51
04/07/11 09:51
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline OP
Expert
William  Offline OP
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
Yeah your right, I'm sorry I never pursued it properly until it became a bigger problem. frown

But I would like to find it now. I also remember that it happened in A7 too, it's just I didn't really come to notice it as back then I thought my game just consumed to much memory. But then I published the game and realized that was not the case. And of course as time went on the game grew, and this problem became more of an issue but I could still test. Now that I am moving to windows7 it is a huge issue as I cant develop properly.

Test #1:

Here is a process I tried on my 32bit Windows XP machine with 3GB of installed ram. The numbers with stars by them is what the taskbar shows.

First when I hit the black run arrow in SED during compilation the memory goes to 1.1GB* and then hits 1.5GB*
when game starts(and loads main menu):

nx-21854
m - 462835
geo - 0
shd - 192
ent - 3969
v - 699392

uu1 - 0
uu2 - 0

count of
ent 10
vis 9
par 0
lit 0
snd 0
fnc 11
bdy 0
con 0

I load up the first level and memory goes to 1.6GB*

I Load a second level, and it goes up to 1.5GB* and then quickly it go down to 799MB* after the level is loaded.

nx - 149676
m 462675
geo - 0
shd - 0
ent - 103410
v - 532480

ent 293
vis 156
tri 36k
par 8
lit 0
snd 0
fnc 227
bdy 0
con 0

I then go back to main menu and memory stays at about 900MB*.

I then load the first level again and the memory goes up to 985MB*.

I then load 4 more levels before hitting out of memory error or a directx error. The taskbar shows about 1GB* at this time.

Test#2:

Windows XP 32bit.

I do the same procedure as above, except this time, I load up different levels. The memory in taskbar shows 1.4GB-1.6GB throughout 5 different level loads before crash. All stats are the same as above.

Test #3:

This one I tried on my 64bit Windows 7 machine with 12GB of ram.

The stats all read the same except the v in the memory column equals -88000. Which is odd because the graphics card has 1GB.

I load up the first level and the game crashes because of directx memory errors(cannot create bmap, ect.).

For some odd reason, windows7 based machines with way more ram crash instantly once the game hits about 1.6GB in the taskbar. Whereas on windows Xp you can sit around 1.6GB for about 5-6 level loads before it finally crashes.

Test#4

I compile the game down and run it with same code and assets. Main menu memory shows at 400MB* in taskbar. Once I load a level it goes up to 700MB* and I can load 30 levels in a row fine...

Maybe some file reacts differently in the development versus the published version and chews memory. It's worth noting that in all the development tests, before any major level loads(menu level is empty for most part), the memory has already hit 1.5GB*. Whereas it is 400MB in published version.

This makes me assume it's either engine related or something in the script that only triggers in the dev version.

Silas has huge scripts, with 100'000's of lines of code. Many variables, ect. But I am willing to look hard if you have an idea on some leads. I have different plugins like fmod, ect. too.

I really appreciate your help with this JCL.


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: E1005 - Help [Re: William] #366806
04/07/11 13:26
04/07/11 13:26
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline OP
Expert
William  Offline OP
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
Okay I've spent the last couple hours bringing my project down peice by peice.

What I noticed is there are no irregular memory scripts or items. Basically I deleted all my scripts from the bottom up.

If it were a file on my end, the memory would have gone down drastically at one point. But it did not, and instead, just steadily went down as I kept removing everything right until the end.

So I decided to make you a test level with about 20,000 lines of random vars and a few strings.

With nothing in a level the taskbar memory reads 30MB with the development version.

With all these variables it reads 100MB with the development version.

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

Now. When I publish this exact same script down to a .exe it only reads 35MB when running! Which is about a 60% difference in size between development and published. This is the exact same ratio my entire game is showing as well!

This script only contains vars, nothing else.

I've emailed it to you.

Re: E1005 - Help [Re: William] #366823
04/07/11 14:37
04/07/11 14:37
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Thanks for the test project. I've looked into it. There is no noticeable memory difference between the published and unpublished versions. But when you compile it, it does indeed use almost 40 MB more. The reason for this appears clear when looking in the code.

You have about 29000 variables defined in your script. The compiler stores all variable names in an XML list and in a hash file, which occupy about 20 MB for a script of this size. Additionally, the compiler assumes from your script size that the resulting code will be extremely large, and reserves another 16 MB for it. In fact your code is quite short, but the script size sums up to a huge memory requirement for compiling that code.

When you don't change the script often, use the automatic compiling option for saving that 40 MB. But this does not explain your problem with 600 MB extra memory, at least if you're not really using incredibly large scripts.

Re: E1005 - Help [Re: jcl] #366933
04/08/11 03:57
04/08/11 03:57
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline OP
Expert
William  Offline OP
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
I've sent you another email. With a test showing functions take 7.5 times more memory in the dev version, and strings take 4.5 times the memory in dev version.

Page 4 of 4 1 2 3 4

Moderated by  old_bill, Tobias 

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