Lua Player v0.20 Image.load issues

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
Gh0sT
Posts: 5
Joined: Tue Jun 06, 2006 2:38 am

Lua Player v0.20 Image.load issues

Post by Gh0sT »

Hi,

I've been using your excellent software for quite a while now and would first like to congratulate you on your great work. Without you guys the PSP homebrew scene wouldn't be as terrific as it is now! [/suckup]

Now for my question. I've coded quite a lot of small projects using v0.16 of the Lua Player soft, but as I saw all those cool new features being added I decided to upgrade to the current latest version, which is v0.20.

After trying to load up one of my homemade games I first encountered an error when I tried to require a .lua file. I fixed this by dofile-ing it.

But then the real problem came up. For some reason a regular Image = Image.load("filename.png") displays (random?) Image.load: Error loading image errors.

Do I need to load all my graphics with the new Image.loadFromMemory function or is the soft having trouble with the resolution of my .png's?

Thanks in advance and keep up the great job,
Gh0sT
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Re: Lua Player v0.20 Image.load issues

Post by Shine »

Gh0sT wrote:But then the real problem came up. For some reason a regular Image = Image.load("filename.png") displays (random?) Image.load: Error loading image errors.

Do I need to load all my graphics with the new Image.loadFromMemory function or is the soft having trouble with the resolution of my .png's?
You can use the normal load function, like the demo application Snake does without problems. If you can reproduce it with an image, I can try to fix it.

But maybe there is not enough memory, because with Lua Player 0.16 you have about 20 mb for image, programs etc. and with Lua Player 0.20 about 9 mb (try System.getFreeMemory()) . Maybe the reason is that the module loading concept needs to be improved. Meanwhile you can try to minimize your memory usage, e.g. loading only images, when you need it.
romero126
Posts: 200
Joined: Sat Dec 24, 2005 2:42 pm

Post by romero126 »

You can also free up memory by deleting the LRX files since they seem to load up into memory at the time LUAPlayer loads up, this can decrease the active memory usage. However some of your demo games may not work. Choose wisely!
Post Reply