forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Why did I wait so long to drop by?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
DrWho198



Joined: 27 Dec 2006
Posts: 3

PostPosted: Wed Dec 27, 2006 10:16 am    Post subject: Why did I wait so long to drop by? Reply with quote

I'm a bit ashamed to say that I started coding in Lua without completely reading the docs on lua.org...
Having this said I'll continue with a question to you all.
I have done some experementing in lua and started programming some simple games. While doing this I came across some problems with blitting images. I noticed that blitting an image that was blitted itself would make you lose alpha transpernency.

After laying lua besides me for a while I started looking at it again and noticed that there has been made changes to lua-player. I didn't check this out yet, but this new version might fix the blitting problem...

But while nosing around I noticed someting else... in the code of Lowser I found the function blitAlphaImage... how come I didn't see that function in any function list before? Is there a more complete list than the one on http://wiki.ps2dev.org/psp:lua_player:functions ?

I guess I should have come to this forum earlyer. But I guess its better late then never.

As an example of my work I'll drop you guys an example of what I'm working on right now... its nothing much yet so don't expect a full game. its not even playable in its current state! I havn't tried it on my PSP yet since its broken for now.


Source: http://users.pandora.be/webbox/files/Arcade.zip

For those of you who recognise the chick, its the chick from "Newzealand Story".
I based its sprites on it.
All other graphics are my own.
In its current state it just louds the level and lets you walk around in it. No wall collision is implemented yet and running off the screen is still allowed. I'm sure it still has bugs but I just started coding it in my spare time.
Back to top
View user's profile Send private message
youresam



Joined: 06 Nov 2005
Posts: 87

PostPosted: Thu Dec 28, 2006 12:00 pm    Post subject: Reply with quote

I dont know what your talking about with blitAlphaImage (maybe it was part of the old luaplayer)

I do recomend looking here http://lua-users.org/wiki/TutorialDirectory as it takes you through pretty much every lua function and concept.

And I dont know why you would *ever* blit an image to itself
Back to top
View user's profile Send private message AIM Address
DrWho198



Joined: 27 Dec 2006
Posts: 3

PostPosted: Fri Dec 29, 2006 12:04 am    Post subject: Reply with quote

youresam wrote:
And I dont know why you would *ever* blit an image to itself


I guess you didn't get what I was saying.

Let me clearafy it a bit...

Lets say you have an image, I'll call that Image-A.
Image-A has transparent areas.
Now I blit part of the Image to a second Image, called Image-B.
After this, I wish to blit Image-B to screen.

So:
Image-A --Blit--> Image-B --Blit--> Screen

When doing this, the alpha transparancy is lost. It will now only blit 1 and 0 transparancy, not 50% transparanty.
I really should fix my PSP soon, so I can test the new Lua-player and see if this has been fixed.

Besides that, I guess someone could also blit an image on itself. When you wish to blit part of an image, to another place on the same image. But thats not what I was trying to do.
Back to top
View user's profile Send private message
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Fri Dec 29, 2006 12:30 am    Post subject: Reply with quote

DrWho198 wrote:
When doing this, the alpha transparancy is lost. It will now only blit 1 and 0 transparancy, not 50% transparanty.
I really should fix my PSP soon, so I can test the new Lua-player and see if this has been fixed.


This is not fixed, but I'm writing an OpenGL implementation of Lua Player, see http://forums.ps2dev.org/viewtopic.php?t=7303 . OpenGL is very good for 2D, too, and you can use many different blending modes.
Back to top
View user's profile Send private message
DrWho198



Joined: 27 Dec 2006
Posts: 3

PostPosted: Thu Jan 04, 2007 3:53 am    Post subject: Reply with quote

thnx for the info,
I'll take a look at it when I get the chance.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group