Page 1 of 1
					
				Updating Paper Doll Avatar Sys. - New-ish Question
				Posted: Wed Aug 31, 2011 1:12 pm
				by RogueTomboy
				Okay so I found a tutorial that is 100% of everything I am wanting.
The issue?
I am OOP retarded and for the life of me can't fully understand any of it.  Is there anyone out there who is very OOP orientated who can seriously explain this to me or does someone have a system out there that does the same thing but not OOP?  
Seriously struggling 
 
There are two parts - I understand the first but when it comes to using the OOP style in part 2 - I just die.
http://www.bolducpress.com/tutorials/ho ... -with-php/ 
			
					
				Re: Updating Paper Doll Avatar System
				Posted: Wed Aug 31, 2011 1:37 pm
				by Jackolantern
				Have you looked at the OOP tutorials in the Tutorial section? Xaleph and some others have written some good things on there. If that doesn't answer all your questions, let us know with specific questions, and we can help. I, as well as several others here, know OOP very well 

 
			
					
				Re: Updating Paper Doll Avatar System - UPDATED
				Posted: Thu Sep 01, 2011 12:43 pm
				by RogueTomboy
				I gave it a stab and oddly enough I didn't do to terrible.  I actually was able to get a hold of the author of the code and even found a few mistakes for him 

  So now I have a code that will take a base image and clothing images that I tell it to pick up to build me an avatar.
What I have no clue on is how to use this awesomeness further.  Meaning?
What I'd like to do is have it so when a player creates a character on their account, their gender and race choices will automatically pick the correct avatar base.  They go into the customization screen and can pick the usual things (hair style, hair color, markings, etc).  Then as they adventure - collecting armor and weapons - their avatar will reflect what is in their 'equip player' screen.  As in, if they have a huge FF7 sword of doom equipped (due to stats obviously 

 ) then their avatar in their HUD will reflect that.
I'd also like something that when they log in and go into their character list to pick which character they'd like to play it will show an image of their character (which I assume is just reusing the same image from their HUD).
Thoughts?
 
			
					
				Re: Updating Paper Doll Avatar System - UPDATED
				Posted: Thu Sep 01, 2011 10:43 pm
				by Jackolantern
				I could be wrong, but that sounds like a 
huge undertaking due to all of the nit-picking adjustments each piece, tattoo, hair style, etc. Most AAA PBBGs don't even have something like this. Sadly, I don't really even know where to start helping you with it. However, if you want to just dive in as best you can, we can always help with the specifics 

 
			
					
				Re: Updating Paper Doll Avatar System - UPDATED
				Posted: Fri Sep 02, 2011 11:45 am
				by RogueTomboy
				Well I know Aywas does it - though theirs is not with battling equipment but just RP-ish type stuff - and you can have multiple characters on that.
Thanks for the help though...I'll give it a good shot but if anyone else has any ideas or suggestions I'd really appreciate it.
Will keep this updated so folks know and to help others if they're interested in the same thing.
			 
			
					
				Re: Updating Paper Doll Avatar System - UPDATED
				Posted: Fri Sep 02, 2011 11:36 pm
				by Verahta
				I was looking for Halls tutorials on YouTube and ended up on a ad for this game: zombiepandemic.com
Spent a few minutes trying it, and the beginning character creation seems to have what I imagine you want for your paper doll avatar system. I think they used ASP and Jquery to do it.
			 
			
					
				Re: Updating Paper Doll Avatar System - UPDATED
				Posted: Tue Sep 06, 2011 1:44 pm
				by hallsofvallhalla
				This isnt that hard that it needs oop, Just make a table and name it paperdoll or something. 
Then add the fields id, type, pic, default
then add your things like
1, hair, 1, 1   - would be a blonde hair piece named 1.png and would be default
2, hair, 2, 0 - would be a dark brown hair piece named 2.png and would not be default
3, tatoo, 3, 0 - would be a tatoo 3.png, 
ect... ect...
then when selecting hair select * from paperdoll where type='hair'
then create some divs or a table to show them all with a link that when you click it goes to the next page that adds the pic name to the characters hair field, then next page shows tatoos  select * from paperdoll where type='tatoo'
then when displaying the character 
<img src='" . $playerinfo3[hair] . ".png' />
no oop needed.
			 
			
					
				Re: Updating Paper Doll Avatar System - UPDATED
				Posted: Tue Sep 06, 2011 2:20 pm
				by Jackolantern
				Ohh, you know what? If you were not squimish about some HTML5 Canvas use, you could pretty nicely put it together in that, and then you could even create finished bitmaps and store them on the server (see my post in tutorials for how to save Canvas bitmaps to the server). 
Halls' would definitely be easier, but there would not be a finished bitmap that could be saved if you put together the avatar with CSS-positioned images in the DOM (at least if he means what I think he means).
			 
			
					
				Re: Updating Paper Doll Avatar System - UPDATED
				Posted: Tue Sep 06, 2011 3:54 pm
				by hallsofvallhalla
				i meant creating the entire doll via css using DB info to make it dynamic. This way when you change armor it changes
sooo you would have 
........Head.......
Larm..chest..Rarm
........chest........
........pants........
........pants.......
........pants......
or in code
<div id = 'head">$playerinfo3[head].png</div>
<div id = larm">$playerinfo3[larm].png</div><div id = "chest">$playerinfo3[chest].png</div><div id = 'rarm">$playerinfo3[rarm].png</div
<div id = 'pants">$playerinfo3[pants].png</div>
so it builds the character everytime and you can switch out things. You could of course then add overlay divs for weapons, hats, ect..
			 
			
					
				Re: Updating Paper Doll Avatar System - UPDATED
				Posted: Tue Sep 06, 2011 8:53 pm
				by Jackolantern
				If you basically did the same thing on HTML5 Canvas, you could rasterize the whole thing, and make a savable bitmap that could be saved on the server and used over and over until the player changes their gear. It would also allow players to save their paper doll image for use in forums or on social media sites. 
Of course, there are still a lot of people using browsers that don't support canvas, so that could be a problem.