Game Development Community

image size issues (resolved*[ref for engine debugging])

by rennie moffat · in iTorque 2D · 06/01/2011 (8:58 am) · 44 replies

Hi there,
I have been waiting for the right time to express a certain concern I have regarding image size restraints. I Had been working on my iPod 4G until this morning when I dropped it and broke the screen. No problem, I switched to an older 2G. However, when on the 4G, while it ran, I was getting memory warnings I was concerned were related to imageSize preferably 1024x1024. Now, on my 2G, images that are 1024x1024 are deemed too big "ImageMap(xImageMap)SrcBitmap(game/data/images/x.png) Error: 'Filter-Padded Frame Width Too Big; Unsupported by current hardware!' (5)"


What happens is, they simply do not show up.


So I am wondering, what is the remedy?


About the author

My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.

#21
06/01/2011 (1:52 pm)
So I am just trying to figure out what 0 means. is 0 the number of limitations? or a size? But since it is 0, zero, represents infinity.
???


#22
06/01/2011 (1:59 pm)
0 means there is no software limitation. It is a default value the engine reacts to. If you set it to 1 or above, the engine goes into software limitation mode. If you set it to 0, the default value, it does not see a software limitation and goes into hardware mode.
#23
06/01/2011 (2:00 pm)
so 1024 will be seen as 1024 units?

#24
06/01/2011 (2:03 pm)
According to the code. There is a caveat, though. Your software limitation can never exceed the hardware limitation.
#25
06/01/2011 (2:04 pm)
SWEEET.

Thanks Dude.



#26
06/01/2011 (2:05 pm)
ps. so this practice in general can be applied to many aspects of the engine I take it?
#27
06/01/2011 (2:07 pm)
Please notice the caveat I added to my last post.

Quote:ps. so this practice in general can be applied to many aspects of the engine I take it?
Do you mean this debugging process I just walked you through? If so, then yes. Another way to look at this debugging process:

READ. READ CODE. CODE

READ: The console output
READ CODE: Find where that error message is located and trace it
CODE: Change the script variable to accommodate your problem.

#28
06/01/2011 (2:11 pm)
double sweeet.


so the variable I guess can be anything. hmm. wow, thanks for the lesson Michael. Much appreciated.



:::)))(((
#29
06/01/2011 (2:15 pm)
Quote:so the variable I guess can be anything
No, it can be 0 or any texture size up to what the hardware can support. The good news is that you are protected from doing something dumb, like setting a max size of 40985230. If the hardware does not support it, the max hardware value is used.
#30
06/01/2011 (2:15 pm)
So the variable is always a number value?






#31
06/01/2011 (2:16 pm)
It should be.
#32
06/01/2011 (2:18 pm)
not to get into too much but what would a function that begins with bool or const bool mean?
#33
06/01/2011 (2:22 pm)
@Michael

Quote:READ. READ CODE. CODE

better than this is

STEP. STEP CODE. CODE

Where STEP is the debug step (advance one code execution at a time); or press key F10 in Visual Studio

It also implies that you READ what you're seeing

:-)
#34
06/01/2011 (2:28 pm)
It would be best to create a new thread about that. To give you something to start with in your new thread, bool in front of a function states the function will return true or false.
#35
06/01/2011 (2:48 pm)
hmm. cool. I guess const I can look up. regardless. thanks.



#36
06/01/2011 (2:55 pm)
Ps. I just upped the max texture size to 1024 and it ran fine on the G2 with no FPS loss or noticeable load time.


#37
06/01/2011 (3:06 pm)
READ. READ CODE. CODE wins every time.
#38
06/01/2011 (5:34 pm)
I have a few textures that are 1024x1024, and they work fine. I noticed the error says 'Filter-Padded Frame Width Too Big'. If you look at the imagemap datablock in TGB, do you have the check box 'Filter Pad' checked? That should ONLY be checked if your image is NOT a power of two (although, of course, you should never be using non power-of-two images). Try that -- it's just a guess, but maybe that is your problem. Don't forget to make that change to your level datablock, too (if it works).
#39
06/01/2011 (6:01 pm)
Hi Richard, Are you you on a G2? Anyhow, I am and that prevented the image from showing. The adjustments to my preferences changed that. Anyhow, I did check the Filter Pad but to no avail. The 1024 ran on a G4 but not G2. I received a memory warning on a G4, but it (the image showed).



#40
06/01/2011 (6:04 pm)
For development, I have an iPhone 3G, 3GS, 4, and an iPod Touch 2nd gen, and all the high-res images show up as normal on all the devices. By the way, those images are just used as cells, if that matters. If you're getting memory warnings, maybe you have some datablocks marked as "Preload".