LuaPlayer Bug

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

Moderators: Shine, Insert_witty_name

Post Reply
Teggles
Posts: 27
Joined: Mon Jan 16, 2006 9:30 am

LuaPlayer Bug

Post by Teggles »

LuaPlayer cannot put fonts into a seperate image. Try this example to test. You must have arial.ttf in the current folder.

Code: Select all

arial = Font.load("arial.ttf")
arial:setPixelSizes(0, 13)
local party = Image.createEmpty(480, 272)

while (true) do
screen:clear()
party:clear()
party:fontPrint(arial, 0, 0, "Raargh", Color.new(255, 255, 255))
party:print(0, 20, "Plain Text", Color.new(255, 255, 255))
screen:blit(0, 0, party)
screen.flip()
end
The plain text will display but the font will not. This is not a code problem, it will work if party is changed to screen.
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Re: LuaPlayer Bug

Post by Shine »

Try this: party:clear(Color.new(0, 0, 0, 255))

The bug was, that TTF font plotting to images doesn't set the alpha value to opaque, which was the reason that it is invisible when plotting, if not plotted on an image, where tha alpha value is already set to opaque. I've added this to the TODO list at http://wiki.ps2dev.org/psp:lua_player:todos
Maybe now that http://www.luaplayer.org has some Google Ads, I'll get some money to spend more time for Lua Player to fix these bugs for the next release :-)
Teggles
Posts: 27
Joined: Mon Jan 16, 2006 9:30 am

Post by Teggles »

Thank you for that, however using that will mean everything blitted before "party" will be cleared. Changing it to 0 will show no text, and other values will make the menu/text lighter. I can't get it right. How can I fix this?
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

Teggles wrote:I can't get it right. How can I fix this?
You could iterate through each pixel and change the color to transparent, if black, or you could wait until weekend when I have some time to release a new Lua Player version with the bug fixed :-)
Danny769
Posts: 55
Joined: Wed Feb 01, 2006 12:29 pm

Post by Danny769 »

Shine wrote:
Teggles wrote:I can't get it right. How can I fix this?
You could iterate through each pixel and change the color to transparent, if black, or you could wait until weekend when I have some time to release a new Lua Player version with the bug fixed :-)
Can you fix the extra memory usage issue as well please
Teggles
Posts: 27
Joined: Mon Jan 16, 2006 9:30 am

Post by Teggles »

Danny769 wrote:
Shine wrote:
Teggles wrote:I can't get it right. How can I fix this?
You could iterate through each pixel and change the color to transparent, if black, or you could wait until weekend when I have some time to release a new Lua Player version with the bug fixed :-)
Can you fix the extra memory usage issue as well please
That's a non-priority, GameShark. It's near pointless. I'd prefer actual important bugs get fixed like getting the width of fonts - it doesn't work AT ALL. Memory usage isn't a worry at all as our complex battle and isometric engines can run fine - these are probably the most complicated things ever done on LuaPlayer. I don't see why he should bother.

On another note, you did nothing for us. We don't steal any code at all. I completely rewrote the menu. Why? Because you had no idea how to code. It was absolutely awful. The battle engine and isometric engine are designed completely by myself, so I'll be killing anyone who claims they did work for it.
Heroux
Posts: 6
Joined: Wed Apr 26, 2006 11:56 am

Post by Heroux »

*ouch*

Bug Fix Request.

When blitting an image of large proportions (e.g. 512x512) to an area outside of the screen, after a certain point the image disappears completely before it should have left the screen. This seems like it is due to some kind of parameter (e.g. if blit -480x-272 or 960x544 then do not draw it) could this parameter be increased to +/- 512? Due to that fact that images up to 512 are supposed to be supported this would only make sense. I could really use it for scrolling purposes otherwise scrolling an image of large proportions seems pointless and does not work. And the bug Teggles brought up should be fixed as well. Thanks.
Post Reply