forums

TNT Basic Forums > Bugs!
problems when loading too many images
< Last Thread     Next Thread >
Author
Thread        Post A Reply

05-25-2003 01:18

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

On os 9 (dunno os X), when I load many sprites in memory (well, not SO many, say 100-150 64*64 pictures) I start gettin 1/2 the framerate I get otherwise:

The strange thing i that there really is an edge in the number of images loaded that when passed starts giving the bad framerate, otherwise just a bit under the edge is still completely normal.

I can avoid this by unloading some images iin memory; anyway, I' d like to know if this is a bug or is it normal.

Thanks

Matteo

05-25-2003 14:32

Posted by:
DanLurie

Location:
Earth>USA>New Jersey>Clifton>My Chair

Click Here to Email DanLurie   Find more posts by DanLurie

Have you tried giving TNT more memory?

05-25-2003 16:30

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

yep, tried that;
Somebody could try if this happens also to him?

To do this, you can avoid putting really many images:

simply, at the beginning of the code, load the same image bank many times like this:

for i=0 to 10
load images 128
next


and see if when you load them a lot of times you get too the bad performance described in my previous post

(hope I was understandable :P )

05-25-2003 22:50

Posted by:
Danlab games

Click Here to Email Danlab games   Find more posts by Danlab games

i got this in creepy mines and after some level this cause an out of memory

05-26-2003 10:24

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

Question to Dan

Oh, so that' s why every level took a lot to load in Creepy: you continued to load and and unload image banks? I think I' ll have to do that too... hopefully it will not be so slow.

Dan, do you use OS 9 or X?

05-27-2003 22:20

Posted by:
Mark Tully

Location:
TNT HQ, England

Click Here to Email Mark Tully   Find more posts by Mark Tully

Bug

If you try this, I think you'll see what the problem is:

graphics mode 640,480
int i
for i=0 to 10
load images 128
print i,count images (128)
next
end


Basically, when you load an image bank that has already been loaded it just loads another copy of the bank and appends it to the previous copy. So when you load the bank 10 times you get a bank 10 times as big with 10 copies of the image bank loaded end to end. Oops.

We'll fix it for next version so it clears the image bank before loading, in the mean time I'd advise you all to make sure that you're not loading the same bank more than once without calling unload images in between - otherwise you will run out of memory eventually!

Mark

05-27-2003 23:02

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

hmmm... that was not my point...

05-27-2003 23:29

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

(first post)

05-29-2003 21:11

Posted by:
Mark Tully

Location:
TNT HQ, England

Click Here to Email Mark Tully   Find more posts by Mark Tully

I can't think of any reason why having lots of images in memory would slow your game down, drawing lots of sprites at once will but you're not doing that are you?

Have you tried it with extensions off - maybe you've got some sort of ram doubler or something running that is degrading performance when you begin to use past a certain limit of memory?

Not sure what else it could be... Does this happen to anyone else? (DanLab I think your out of memory errors are a separate issue and could stem from the bug in load images where it won't unload a bank if you tell it to load again?)

Mark

05-29-2003 23:50

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

TNT has problems with memory, but will more be likely to quit with an out of memory error. I think slowdowns could be experienced if your sprites all had transparency masks with many levels of grays?

05-30-2003 00:09

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

nope, ther is an edge: when I load an image too much I pass from 30 to 15 FPS, when I unload it I get back to 30. gonna check it on X and without extensions.

05-31-2003 17:36

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

hmmm. no problem on os X.... I just dunno what to do: keep all the images loaded risking that poor os 9 users get the bad performance problem or unload some while loading others so that you loose time loading and unloading the same stuff all over the game? textit{this} is the problem...

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.