Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
paperdoll 32x63 code
#1
Well If I recall correctly you can just look at the increase size tutorial and do the same thing for the paper doll tutorial. or if not heres one that is suppossed to be a 32x64 paper doll tutorial. http://orpgkings.com/forum/viewtopic.ph ... 5cf3b86987 there you go.
Reply
#2
Ok, firstly im going to assume that your using GSDs paperdolling code/tutorial, as that seems to be the only one floating around the internet for mirage..

Now, firstly, you need to understand what the code is doing. If i recall correctly, he changed the whole BltPlayer sub so it would accomodate more surfaces for the item slots. And would blt (draw) them accordingly.

To add this into 32x64 sprites, this all goes back down to how you did 32x64 sprites. if you used Misunderstoods tutorial, then it shouldnt be too hard. If you did it a different way it shouldnt differ much regardless. Now, if you can understand what Mis did in his tutorial, you can see that he basically draw a whole new surface above the current player surface. All he basically changed was:
Code:
.Top = GetPlayerSprite(Index) * PIC_Y + PIC_Y
From the BltPlayer sub and another section of code, which actually moves the surface up 32 pixels.

Now, if you just combine the two tutorials you can easily make 32x64 sprites with paperdoll working perfectly fine. You will need to change the size of your items, as GSD used the items.bmp as the equipment sheet. I suggest making a new sheet for just equipments, so items in your inventory, on the ground, etc are in a 32x32 pixel box, while the equipments on the player are 32x64.

If you need more help, just post in here and i'll help you some more.. Good luck.. :wink:
Reply
#3
http://splamm.com/elysium

Pingu, I think, posted one for Elysium, but it's only a bit of changing for it to work with MSE and what not.
Reply
#4
Ill be nice and give you my paperdoll code, since alot of people helped me with things I didn't know how to do.

Code:
Sub BltPlayer(ByVal Index As Long)
Dim Anim As Byte
Dim x As Long, y As Long

    ' Only used if ever want to switch to blt rather then bltfast
    With rec_pos
        .top = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset
        .Bottom = .top + PIC_Y
        .Left = GetPlayerX(Index) * PIC_X + Player(Index).XOffset
        .Right = .Left + PIC_X
    End With
    
    ' Check for animation
    Anim = 0
    If Player(Index).Attacking = 0 Then
        Select Case GetPlayerDir(Index)
              Case DIR_UP
                  If (Player(Index).YOffset < PIC_Y / 2) Then Anim = 1
              Case DIR_DOWN
                  If (Player(Index).YOffset < PIC_Y / 2 * -1) Then Anim = 1
              Case DIR_LEFT
                  If (Player(Index).XOffset < PIC_Y / 2) Then Anim = 1
              Case DIR_RIGHT
                  If (Player(Index).XOffset < PIC_Y / 2 * -1) Then Anim = 1
        End Select
    Else
        If Player(Index).AttackTimer + 500 > GetTickCount Then
              Anim = 2
        End If
    End If
    
    ' Check to see if we want to stop making him attack
    If Player(Index).AttackTimer + 1000 < GetTickCount Then
        Player(Index).Attacking = 0
        Player(Index).AttackTimer = 0
    End If
    
    rec.Left = (GetPlayerDir(Index) * 3 + Anim) * PIC_X
    rec.Right = rec.Left + PIC_X
    
    x = GetPlayerX(Index) * PIC_X + Player(Index).XOffset
    y = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset - 4
    
    ' Check if its out of bounds because of the offset
    If y < 0 Then
        y = 0
        rec.top = rec.top + (y * -1)
    End If
    
    rec.top = GetPlayerSprite(Index) * PIC_Y + PIC_Y
    rec.Bottom = rec.top + PIC_Y
        
    Call DD_BackBuffer.BltFast(x, y, DD_SpriteSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
    
        If GetPlayerDir(Index) = DIR_UP Then
        If Player(Index).Shield > 0 Then
              rec.top = Item(Player(Index).Shield).Pic * 64 + PIC_Y
              rec.Bottom = rec.top + PIC_Y
              Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
        If Player(Index).Weapon > 0 Then
              rec.top = Item(Player(Index).Weapon).Pic * PIC_Y + PIC_Y
              rec.Bottom = rec.top + PIC_Y
              Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
    End If
    
    If Player(Index).Armor > 0 Then
        rec.top = Item(Player(Index).Armor).Pic * PIC_Y + PIC_Y
        rec.Bottom = rec.top + PIC_Y
        Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
    End If
    If Player(Index).Helmet > 0 Then
        rec.top = Item(Player(Index).Helmet).Pic * PIC_Y + PIC_Y
        rec.Bottom = rec.top + PIC_Y
        Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
    End If
    If GetPlayerDir(Index)  DIR_UP Then
        If Player(Index).Shield > 0 Then
              rec.top = Item(Player(Index).Shield).Pic * PIC_Y + PIC_Y
              rec.Bottom = rec.top + PIC_Y
              Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
        If Player(Index).Weapon > 0 Then
              rec.top = Item(Player(Index).Weapon).Pic * PIC_Y + PIC_Y
              rec.Bottom = rec.top + PIC_Y
              Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
    End If
End Sub

Sub BltPlayerTop(ByVal Index As Long)
Dim Anim As Byte
Dim x As Long, y As Long

    ' Only used if ever want to switch to blt rather then bltfast
    With rec_pos
        .top = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset
        .Bottom = .top + PIC_Y
        .Left = GetPlayerX(Index) * PIC_X + Player(Index).XOffset
        .Right = .Left + PIC_X
    End With
    
    ' Check for animation
    Anim = 0
    If Player(Index).Attacking = 0 Then
        Select Case GetPlayerDir(Index)
              Case DIR_UP
                  If (Player(Index).YOffset < PIC_Y / 2) Then Anim = 1
              Case DIR_DOWN
                  If (Player(Index).YOffset < PIC_Y / 2 * -1) Then Anim = 1
              Case DIR_LEFT
                  If (Player(Index).XOffset < PIC_Y / 2) Then Anim = 1
              Case DIR_RIGHT
                  If (Player(Index).XOffset < PIC_Y / 2 * -1) Then Anim = 1
        End Select
    Else
        If Player(Index).AttackTimer + 500 > GetTickCount Then
              Anim = 2
        End If
    End If
    
    ' Check to see if we want to stop making him attack
    If Player(Index).AttackTimer + 1000 < GetTickCount Then
        Player(Index).Attacking = 0
        Player(Index).AttackTimer = 0
    End If
    
    rec.Left = (GetPlayerDir(Index) * 3 + Anim) * PIC_X
    rec.Right = rec.Left + PIC_X
    
    x = GetPlayerX(Index) * PIC_X + Player(Index).XOffset
    y = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset - 4
    
    ' Check if its out of bounds because of the offset
    y = y - 32
    If y < 0 And y > -32 Then
        With rec
              .top = .top - y
              y = 0
        End With
    End If
    
    rec.top = GetPlayerSprite(Index) * PIC_Y
    rec.Bottom = rec.top + PIC_Y
        
    'Call DD_BackBuffer.Blt(rec_pos, DD_SpriteSurf, rec, DDBLT_WAIT Or DDBLT_KEYSRC)
    Call DD_BackBuffer.BltFast(x, y, DD_SpriteSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
    
        If GetPlayerDir(Index) = DIR_UP Then
        If Player(Index).Shield > 0 Then
              rec.top = Item(Player(Index).Shield).Pic * PIC_Y
              rec.Bottom = rec.top + PIC_Y
              Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
        If Player(Index).Weapon > 0 Then
              rec.top = Item(Player(Index).Weapon).Pic * PIC_Y
              rec.Bottom = rec.top + PIC_Y
              Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
    End If
    
    If Player(Index).Armor > 0 Then
        rec.top = Item(Player(Index).Armor).Pic * PIC_Y
        rec.Bottom = rec.top + PIC_Y
        Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
    End If
    If Player(Index).Helmet > 0 Then
        rec.top = Item(Player(Index).Helmet).Pic * PIC_Y
        rec.Bottom = rec.top + PIC_Y
        Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
    End If
    If GetPlayerDir(Index)  DIR_UP Then
        If Player(Index).Shield > 0 Then
              rec.top = Item(Player(Index).Shield).Pic * PIC_Y
              rec.Bottom = rec.top + PIC_Y
              Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
        If Player(Index).Weapon > 0 Then
              rec.top = Item(Player(Index).Weapon).Pic * PIC_Y
              rec.Bottom = rec.top + PIC_Y
              Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
    End If
End Sub

To Complete Find Call Bltplayer

copy all those codes and paste after
then change call bltplayer to call bltplayertop

then just follow the paperdoll tutorial skipping the
bltplayer parts. and There you GO!
Reply
#5
Sign Wrote:Ill be nice and give you my paperdoll code, since alot of people helped me with things I didn't know how to do.

Code:
Sub BltPlayer(ByVal Index As Long)
Dim Anim As Byte
Dim x As Long, y As Long

    ' Only used if ever want to switch to blt rather then bltfast
    With rec_pos
        .top = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset
        .Bottom = .top + PIC_Y
        .Left = GetPlayerX(Index) * PIC_X + Player(Index).XOffset
        .Right = .Left + PIC_X
    End With
    
    ' Check for animation
    Anim = 0
    If Player(Index).Attacking = 0 Then
        Select Case GetPlayerDir(Index)
              Case DIR_UP
                  If (Player(Index).YOffset < PIC_Y / 2) Then Anim = 1
              Case DIR_DOWN
                  If (Player(Index).YOffset < PIC_Y / 2 * -1) Then Anim = 1
              Case DIR_LEFT
                  If (Player(Index).XOffset < PIC_Y / 2) Then Anim = 1
              Case DIR_RIGHT
                  If (Player(Index).XOffset < PIC_Y / 2 * -1) Then Anim = 1
        End Select
    Else
        If Player(Index).AttackTimer + 500 > GetTickCount Then
              Anim = 2
        End If
    End If
    
    ' Check to see if we want to stop making him attack
    If Player(Index).AttackTimer + 1000 < GetTickCount Then
        Player(Index).Attacking = 0
        Player(Index).AttackTimer = 0
    End If
    
    rec.Left = (GetPlayerDir(Index) * 3 + Anim) * PIC_X
    rec.Right = rec.Left + PIC_X
    
    x = GetPlayerX(Index) * PIC_X + Player(Index).XOffset
    y = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset - 4
    
    ' Check if its out of bounds because of the offset
    If y < 0 Then
        y = 0
        rec.top = rec.top + (y * -1)
    End If
    
    rec.top = GetPlayerSprite(Index) * PIC_Y + PIC_Y
    rec.Bottom = rec.top + PIC_Y
        
    Call DD_BackBuffer.BltFast(x, y, DD_SpriteSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
    
        If GetPlayerDir(Index) = DIR_UP Then
        If Player(Index).Shield > 0 Then
              rec.top = Item(Player(Index).Shield).Pic * 64 + PIC_Y
              rec.Bottom = rec.top + PIC_Y
              Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
        If Player(Index).Weapon > 0 Then
              rec.top = Item(Player(Index).Weapon).Pic * PIC_Y + PIC_Y
              rec.Bottom = rec.top + PIC_Y
              Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
    End If
    
    If Player(Index).Armor > 0 Then
        rec.top = Item(Player(Index).Armor).Pic * PIC_Y + PIC_Y
        rec.Bottom = rec.top + PIC_Y
        Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
    End If
    If Player(Index).Helmet > 0 Then
        rec.top = Item(Player(Index).Helmet).Pic * PIC_Y + PIC_Y
        rec.Bottom = rec.top + PIC_Y
        Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
    End If
    If GetPlayerDir(Index)  DIR_UP Then
        If Player(Index).Shield > 0 Then
              rec.top = Item(Player(Index).Shield).Pic * PIC_Y + PIC_Y
              rec.Bottom = rec.top + PIC_Y
              Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
        If Player(Index).Weapon > 0 Then
              rec.top = Item(Player(Index).Weapon).Pic * PIC_Y + PIC_Y
              rec.Bottom = rec.top + PIC_Y
              Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
    End If
End Sub

Sub BltPlayerTop(ByVal Index As Long)
Dim Anim As Byte
Dim x As Long, y As Long

    ' Only used if ever want to switch to blt rather then bltfast
    With rec_pos
        .top = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset
        .Bottom = .top + PIC_Y
        .Left = GetPlayerX(Index) * PIC_X + Player(Index).XOffset
        .Right = .Left + PIC_X
    End With
    
    ' Check for animation
    Anim = 0
    If Player(Index).Attacking = 0 Then
        Select Case GetPlayerDir(Index)
              Case DIR_UP
                  If (Player(Index).YOffset < PIC_Y / 2) Then Anim = 1
              Case DIR_DOWN
                  If (Player(Index).YOffset < PIC_Y / 2 * -1) Then Anim = 1
              Case DIR_LEFT
                  If (Player(Index).XOffset < PIC_Y / 2) Then Anim = 1
              Case DIR_RIGHT
                  If (Player(Index).XOffset < PIC_Y / 2 * -1) Then Anim = 1
        End Select
    Else
        If Player(Index).AttackTimer + 500 > GetTickCount Then
              Anim = 2
        End If
    End If
    
    ' Check to see if we want to stop making him attack
    If Player(Index).AttackTimer + 1000 < GetTickCount Then
        Player(Index).Attacking = 0
        Player(Index).AttackTimer = 0
    End If
    
    rec.Left = (GetPlayerDir(Index) * 3 + Anim) * PIC_X
    rec.Right = rec.Left + PIC_X
    
    x = GetPlayerX(Index) * PIC_X + Player(Index).XOffset
    y = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset - 4
    
    ' Check if its out of bounds because of the offset
    y = y - 32
    If y < 0 And y > -32 Then
        With rec
              .top = .top - y
              y = 0
        End With
    End If
    
    rec.top = GetPlayerSprite(Index) * PIC_Y
    rec.Bottom = rec.top + PIC_Y
        
    'Call DD_BackBuffer.Blt(rec_pos, DD_SpriteSurf, rec, DDBLT_WAIT Or DDBLT_KEYSRC)
    Call DD_BackBuffer.BltFast(x, y, DD_SpriteSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
    
        If GetPlayerDir(Index) = DIR_UP Then
        If Player(Index).Shield > 0 Then
              rec.top = Item(Player(Index).Shield).Pic * PIC_Y
              rec.Bottom = rec.top + PIC_Y
              Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
        If Player(Index).Weapon > 0 Then
              rec.top = Item(Player(Index).Weapon).Pic * PIC_Y
              rec.Bottom = rec.top + PIC_Y
              Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
    End If
    
    If Player(Index).Armor > 0 Then
        rec.top = Item(Player(Index).Armor).Pic * PIC_Y
        rec.Bottom = rec.top + PIC_Y
        Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
    End If
    If Player(Index).Helmet > 0 Then
        rec.top = Item(Player(Index).Helmet).Pic * PIC_Y
        rec.Bottom = rec.top + PIC_Y
        Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
    End If
    If GetPlayerDir(Index)  DIR_UP Then
        If Player(Index).Shield > 0 Then
              rec.top = Item(Player(Index).Shield).Pic * PIC_Y
              rec.Bottom = rec.top + PIC_Y
              Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
        If Player(Index).Weapon > 0 Then
              rec.top = Item(Player(Index).Weapon).Pic * PIC_Y
              rec.Bottom = rec.top + PIC_Y
              Call DD_BackBuffer.BltFast(x, y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
    End If
End Sub

To Complete Find Call Bltplayer

copy all those codes and paste after
then change call bltplayer to call bltplayertop

then just follow the paperdoll tutorial skipping the
bltplayer parts. and There you GO!
is this the entire code or is there more and if there is more where is it i have been waiting a long time to see what paper doll does and don't want to add it to elysium
Reply
#6
its not worth ripping from elysium cuz elysium is very UNSTABLE and tons of crap isn't functioned for it in mirage :\
Reply
#7
duh of course elysium diamond is unstable i am actually sticking with it because of the need for debuging but i was making an engine for someone to learn to use elysium out of mirage source and i was not going to rip paperdoll from elysium cause i don't understand it enough to know what i need to use of it and then i can't make my own as i don't do direct x yet to be able to do any of this correctly so i need a bit of code here or i am stuck the main reason i am putting paperdoll in mirage is to see how it works to understand it enough to start making my own paperdoll variations (stuff for emulating jutsu from naruto) to implement in naruto based games
Reply
#8
Yes its real good to start out with because you get a feel of the power :p, and then after few months u get eager to want to redue it and start from beginning with new designs, etc... then u switch to Mirage Source ;D
Reply
#9
hey da undead your from elysiumsource.com (wanna know where i hang change .com to .net ) what is good to start off with you lost me around there any way i am just making a good engine to learn from for a friend so he/she can use elysium and help me with my game devoulpment but until he/she loggs on the messanger i can't give him/her the new client i am making but until i upload it after a ton of bug fixes they can't get it any way oh well its just a waiting game for now ( no not the game i am making its an expression i think )
Reply
#10
You do know that nobody cares if your friend is male or female, right?

Anyways, pay no attention to Undead, he's not that good of a programmer.
Reply
#11
Thats cuz im cool ;p
But im learning :\
Reply
#12
yeah but is there a full tutorial for this aready ?!
you guys get a bit annoying at times you know that i ask a single question and get a bunch of answers that have nothing to to do with the question
i thought you all were supposed to be more technicly minded than elysium's community had i asked that question there i would have gotten the answer i was looking for
Reply
#13
i have always had a nasty attitude but where are these tutorials you speak of
Reply
#14
[Image: steponeaz3.png]

[Image: steptwonp9.png]

[Image: stepthreefh4.png]

The same process works for paperdoll. If you can't find it, we don't have it.
Reply
#15
lol very nicely put, can't believe u went through that much trouble to get ur point tho.. Should of just linked em xD.
Reply
#16
Da Undead Wrote:lol very nicely put, can't believe u went through that much trouble to get ur point tho.. Should of just linked em xD.

Nah, it shows how pissed he is on how people won't use the search button.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)