| View previous topic :: View next topic |
| Author |
Message |
Leo28C
Joined: 18 Jan 2007 Posts: 19
|
Posted: Sat Mar 17, 2007 2:22 pm Post subject: Proper care of images? |
|
|
Hello everyone! :-)
Hey; is there anything I must do to images after my program's closed or even after reusing them?
I ask because; at random times in my game I get an error with Image.createEmpty() that says it failed to create image... And sometimes when I open the game from the Lowser it says it can't load the image, but when I try again it works fine... :-/
Maybe it's a bug in Lua Player? Or maybe I must nil them out or something? Thanks! ;-) |
|
| Back to top |
|
 |
the underminer
Joined: 03 Oct 2005 Posts: 124 Location: Netherlands
|
Posted: Sun Mar 18, 2007 11:46 pm Post subject: |
|
|
It's always a good idea to set your images to nil when you are done using them. Depending on the luaplayer you are using there is is 9(luaplayer 0.20) to 20mb (luaplayer mod and sub 0.18 versions) of free memory left. When you are creating images, keep in mind that values greater than 480X272 are likely to give an error. For loading images; luaplayer supports sizes up to 512x512 (png). jpegs can be larger. _________________ Behold! The Underminer got hold of a PSP |
|
| Back to top |
|
 |
|