Question concatenating images

belozero

Member
Joined
Mar 4, 2010
Messages
12
Programming Experience
Beginner
well i'm a 1st year VB student, taking programming in highschool and i recently started a new project. i'm making an RPG game, and in this game i'm using pictureboxes for my character sprites and i was wondering, is there a way to change the image in the picturebox? and no, i dont mean PictureBox1.image = ******, i mean something like photoshop. taking 2 "layers" and merging them. for example: when my character changes equiptment, i want it to show on his sprite as well, so any time he changes his weapon or armor from his inventory, it actually changes the image in the picturebox. i imagine it being very complex, especially becase i've added transparency to my sprites, and i plan to make them animated for walking and swinging your sword. could anyone shed some light on this? any advice would be welcomed. thank you in advance!
 
What you would probably need to do is to have each layer be an Image with transparency. You can then use GDI+ to simply draw one Image onto another. The thing is though, that doing so is destructive, i.e. you can't then go back, so you would have to keep copies if you wanted to "remove" a layer.
 
Could you possibly give me a link to a good tutorial? we haven't studies GDI+ in my class yet, i don't know if we will. and i intended to keep all the pictures of items separate and "re-draw" my character from scratch each time he changes items. [start with the body base, add 1st layer items, next layer, etc. each time he changes]
 
Thank you so much! it works beautifully :D it took a little practice, and a few hours of making random crap programs, but i think i understand it now. thank you!
 
Back
Top