| View previous topic :: View next topic |
| Author |
Message |
Teggles
Joined: 16 Jan 2006 Posts: 27
|
Posted: Wed May 03, 2006 5:13 pm Post subject: LuaPlayer Bug |
|
|
LuaPlayer cannot put fonts into a seperate image. Try this example to test. You must have arial.ttf in the current folder.
| Code: |
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. |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Wed May 03, 2006 5:56 pm Post subject: Re: LuaPlayer Bug |
|
|
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 :-) |
|
| Back to top |
|
 |
Teggles
Joined: 16 Jan 2006 Posts: 27
|
Posted: Wed May 03, 2006 7:27 pm Post subject: |
|
|
| 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? |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Wed May 03, 2006 8:18 pm Post subject: |
|
|
| 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 :-) |
|
| Back to top |
|
 |
Danny769
Joined: 01 Feb 2006 Posts: 55
|
Posted: Thu May 04, 2006 12:25 pm Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
Teggles
Joined: 16 Jan 2006 Posts: 27
|
Posted: Thu May 04, 2006 2:14 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
Heroux
Joined: 26 Apr 2006 Posts: 6
|
Posted: Sun May 14, 2006 4:52 am Post subject: |
|
|
*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. |
|
| Back to top |
|
 |
|