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 

can two pngs occupy the same space?

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



Joined: 29 Apr 2006
Posts: 9
Location: Gainesville, FL

PostPosted: Thu Jul 27, 2006 3:39 am    Post subject: can two pngs occupy the same space? Reply with quote

I'm a really big newb but have come up with a concept for an rpg battle system involving animations via png images of two characters (one on each side of the screen). Both will take up the entire resolution of the psp, but will be mostly transparent (where the characters aren't positioned).

I'm curious as to what ramifications one .png image overlapping another would cause or how to justify which would overlap which. This is basically how I would do it.

load up left image


load up right image


flip screen


NOW, if I somehow manage to do this, I'm going to try to animate both sides (one at a time, depending on who's turn it is), but when I animate something like an attack, I'm going to try to make it take up the whole screen, overlapping the png image being attacked, allowing for battle effects like electricity and blood.

In my mind, it seems like it would be possible, but I'm just not experienced enough to know how to manage two images, one on top of the other. Help?
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
jsharrad



Joined: 20 Oct 2005
Posts: 102

PostPosted: Thu Jul 27, 2006 3:54 am    Post subject: Reply with quote

You can have one overlapping the other easily, just blit the one you want overlapped first, the front most sprite last, then flip the screen.
Back to top
View user's profile Send private message
Hale



Joined: 29 Apr 2006
Posts: 9
Location: Gainesville, FL

PostPosted: Thu Jul 27, 2006 4:06 am    Post subject: Reply with quote

That's pretty simple... I guess when a new turn is initiated I could blit the active character to make sure it's on top. Cool. Thanks :O)

EDIT: AH HA I got them both to show up. Awesome!
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Raphael



Joined: 17 Jan 2006
Posts: 646
Location: Germany

PostPosted: Thu Jul 27, 2006 6:16 am    Post subject: Reply with quote

I'd recommend though, not to use fullscreen images to hold only the animation which happens in one half of the screen, since drawing that large (even when mostly transparent) images, is pretty slow. Try to at least make a 'bounding box' sized image sequence.
_________________
<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki

Alexander Berl
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP 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