Mirage Source

Free ORPG making software.
It is currently Sat Apr 27, 2024 6:21 pm

All times are UTC




Post new topic Reply to topic  [ 52 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Sat Apr 26, 2008 3:47 pm 
Offline
Newbie

Joined: Sat Mar 22, 2008 7:30 pm
Posts: 9
Hi
I'm Polish and my English isn't very good, sorry :oops:

1. I changed sprites size from 32x32 to 32x64 and it isn't ok. It shows sprites in a good size, but upper part of the sprite doesn't fit to the lower.
This problem exist only in few position, not everytime.
Look:
Image
Sprite of Gieroes is ok, upper and lower parts fit to each other, but Styku96's sprite's parts doesnt fit.

Any sugestions to solve it?

2. Are there any functions, commands to change image? For Example to blur it or make some other effect on it.


Thanks for any reply, and again sorry for my English;]


Top
 Profile  
 
PostPosted: Sun Apr 27, 2008 7:49 pm 
Offline
Newbie

Joined: Sat Mar 22, 2008 7:30 pm
Posts: 9
Any ideas?


Top
 Profile  
 
PostPosted: Mon Apr 28, 2008 2:37 pm 
Offline
Knowledgeable
User avatar

Joined: Wed Jul 26, 2006 11:22 pm
Posts: 143
Location: Virginia, USA
1.

Imageshack is blocked on my campus network so I can't see the image, but it could be a problem with positioning in sprites.bmp (or .png/.gif/.whatever-you-use). There could be an error in coding if it's just like... your top half is facing left and bottom is facing forward, or something. I can't say for sure since I can't see it nor your code.

2.

I haven't a clue. :(


Top
 Profile  
 
PostPosted: Mon Apr 28, 2008 2:59 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Make sure the animation code in BltPlayer matches that of BltPlayerTop.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
PostPosted: Mon Apr 28, 2008 3:37 pm 
Offline
Newbie

Joined: Sat Mar 22, 2008 7:30 pm
Posts: 9
I didn't change any code in blting, only changed 32x32 to 32x64.
How can I show you this image?;p

It's Like That:

+++++
+++++

It's a sprite.
Everything + should by under +, but sometimes it's like that:
+++++
+++++

Position of upper part is another than lower.

Any ideas?:D


Top
 Profile  
 
PostPosted: Mon Apr 28, 2008 3:42 pm 
Offline
Persistant Poster
User avatar

Joined: Tue May 30, 2006 2:07 am
Posts: 836
Location: Nashville, Tennessee, USA
Google Talk: rs.ruggles@gmail.com
Here, try this tutorial:
http://web.miragesource.com/forums/viewtopic.php?f=75&t=45&hilit=32x64

_________________
I'm on Facebook! Google Plus My Youtube Channel My Steam Profile

Image


Top
 Profile  
 
PostPosted: Mon Apr 28, 2008 4:33 pm 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
I don't see anything wrong.

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
PostPosted: Mon Apr 28, 2008 4:41 pm 
Offline
Newbie

Joined: Sat Mar 22, 2008 7:30 pm
Posts: 9
Ups, I didn't say sth :D
I use Elysium Diamond and I think, ekhm, Im sure that bltplayertop is there;]


Top
 Profile  
 
PostPosted: Mon Apr 28, 2008 6:15 pm 
Offline
Newbie

Joined: Sat Mar 22, 2008 7:30 pm
Posts: 9
FIX:

It's Like That:

+++++
+++++

It's a sprite.
Everything + should by under +, but sometimes it's like that:
+++++
.+++++

Position of upper part is another than lower.


Top
 Profile  
 
PostPosted: Mon Apr 28, 2008 6:28 pm 
Offline
Newbie

Joined: Sat Mar 22, 2008 7:30 pm
Posts: 9
Ok, I discovered sth.
This bug appears only on two frames-right walking.
It appears when char goes to right. Any ideas now?:D


Top
 Profile  
 
PostPosted: Mon Apr 28, 2008 8:24 pm 
Offline
Knowledgeable
User avatar

Joined: Thu Dec 28, 2006 8:57 pm
Posts: 297
Location: This magical place called 'reality'
Give us a picture of you sprite on the tilesheet, cause I don't see anything wrong with the sprite...

_________________
P2B Feed: Custom AI
Image


Top
 Profile  
 
PostPosted: Mon Apr 28, 2008 8:34 pm 
Offline
Pro
User avatar

Joined: Wed Jun 07, 2006 8:04 pm
Posts: 464
Location: MI
Google Talk: asrrin29@gmail.com
Gierek wrote:
Look:
Image


he did

_________________
Image
Image


Top
 Profile  
 
PostPosted: Mon Apr 28, 2008 8:40 pm 
Offline
Persistant Poster
User avatar

Joined: Tue May 30, 2006 2:07 am
Posts: 836
Location: Nashville, Tennessee, USA
Google Talk: rs.ruggles@gmail.com
He means one straight from the sheet, so we have something to compare to find the problem

_________________
I'm on Facebook! Google Plus My Youtube Channel My Steam Profile

Image


Top
 Profile  
 
PostPosted: Tue Apr 29, 2008 2:27 pm 
Offline
Newbie

Joined: Sat Mar 22, 2008 7:30 pm
Posts: 9
Ok, look
Image
First line is from sprites.bmp, secound is from game. Do you see it now?


Top
 Profile  
 
PostPosted: Tue Apr 29, 2008 2:29 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Gierek wrote:
Ok, look
Image
First line is from sprites.bmp, secound is from game. Do you see it now?


I've already told you how to solve your problem. Your animation code in BltPlayer and BltPlayerTop are mismatched.

Robin wrote:
Make sure the animation code in BltPlayer matches that of BltPlayerTop.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
PostPosted: Wed Apr 30, 2008 3:57 am 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
If you post your bltPlayer and bltPlayerTop code we can probably fix it up for you. I can see it in the second example, still not in the first.

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
PostPosted: Wed Apr 30, 2008 2:18 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Actually, now I look again it might not be the animation code but the offset lines.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
PostPosted: Wed Apr 30, 2008 2:44 pm 
Offline
Knowledgeable
User avatar

Joined: Sat Dec 30, 2006 9:09 am
Posts: 252
ED2 always had a problem with 32x64 sprites, if you mean that the top half of the player is moved a pixel to the left or right.
There was a fix on the old forum somewhere there, but its lost forever.

_________________
Image


Top
 Profile  
 
PostPosted: Wed Apr 30, 2008 7:24 pm 
Offline
Newbie

Joined: Sat Mar 22, 2008 7:30 pm
Posts: 9
Ok..

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

    If GetPlayerWeaponSlot(Index) > 0 Then
        AttackSpeed = 1000 - (GetPlayerSPEED(Index) * 2)
    Else
        AttackSpeed = 1000
    End If

    ' Only used if ever want to switch to blt rather then bltfast
    ' I suggest you don't use, because custom sizes won't work any longer
    With rec_pos
        .Top = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset - (SIZE_Y - PIC_Y)
        .Bottom = .Top + PIC_Y
        .Left = GetPlayerX(Index) * PIC_X + Player(Index).XOffset + ((SIZE_X - PIC_X) / 2)
        .Right = .Left + PIC_X + ((SIZE_X - PIC_X) / 2)
    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 + Int(AttackSpeed / 2) > GetTickCount Then
            Anim = 2
        End If
    End If
   
    ' Check to see if we want to stop making him attack
    If Player(Index).AttackTimer + AttackSpeed < GetTickCount Then
        Player(Index).Attacking = 0
        Player(Index).AttackTimer = 0
    End If
   
    rec.Top = GetPlayerSprite(Index) * SIZE_Y + (SIZE_Y - PIC_Y)
    rec.Bottom = rec.Top + PIC_Y
    rec.Left = (GetPlayerDir(Index) * (3 * (SIZE_X / PIC_X)) + (Anim * (SIZE_X / PIC_X))) * PIC_X
    rec.Right = rec.Left + SIZE_X

    x = GetPlayerX(Index) * PIC_X - (SIZE_X - PIC_X) / 2 + sx + Player(Index).XOffset
    y = GetPlayerY(Index) * PIC_Y - (SIZE_Y - PIC_Y) + sx + Player(Index).YOffset + (SIZE_Y - PIC_Y)
   
    If SIZE_X > PIC_X Then
        If x < 0 Then
            x = Player(Index).XOffset + sx + ((SIZE_X - PIC_X) / 2)
            If GetPlayerDir(Index) = DIR_RIGHT And Player(Index).Moving > 0 Then
                rec.Left = rec.Left - Player(Index).XOffset
            Else
                rec.Left = rec.Left - Player(Index).XOffset + ((SIZE_X - PIC_X) / 2)
            End If
        End If
       
        If x > MAX_MAPX * 32 Then
            x = MAX_MAPX * 32 + sx - ((SIZE_X - PIC_X) / 2) + Player(Index).XOffset
            If GetPlayerDir(Index) = DIR_LEFT And Player(Index).Moving > 0 Then
                rec.Right = rec.Right + Player(Index).XOffset
            Else
                rec.Right = rec.Right + Player(Index).XOffset - ((SIZE_X - PIC_X) / 2)
            End If
        End If
    End If
   
    Call DD_BackBuffer.BltFast(x - (NewPlayerX * PIC_X) - NewXOffset, y - (NewPlayerY * PIC_Y) - NewYOffset, DD_SpriteSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
End Sub


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

    If GetPlayerWeaponSlot(Index) > 0 Then
        AttackSpeed = item(GetPlayerInvItemNum(Index, GetPlayerWeaponSlot(Index))).AttackSpeed
    Else
        AttackSpeed = 1000
    End If

    ' Only used if ever want to switch to blt rather then bltfast
    ' I suggest you don't use, because custom sizes won't work any longer
    With rec_pos
        .Top = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset - (SIZE_Y - PIC_Y)
        .Bottom = .Top + PIC_Y
        .Left = GetPlayerX(Index) * PIC_X + Player(Index).XOffset + ((SIZE_X - PIC_X) / 2)
        .Right = .Left + PIC_X + ((SIZE_X - PIC_X) / 2)
    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 + Int(AttackSpeed / 2) > GetTickCount Then
            Anim = 2
        End If
    End If
   
    ' Check to see if we want to stop making him attack
    If Player(Index).AttackTimer + AttackSpeed < GetTickCount Then
        Player(Index).Attacking = 0
        Player(Index).AttackTimer = 0
    End If
   
    rec.Top = GetPlayerSprite(Index) * SIZE_Y
    rec.Bottom = rec.Top + (SIZE_Y - PIC_Y)
    rec.Left = (GetPlayerDir(Index) * (3 * (SIZE_X / PIC_X)) + (Anim * (SIZE_X / PIC_X))) * PIC_X
    rec.Right = rec.Left + SIZE_X

    x = GetPlayerX(Index) * PIC_X - (SIZE_X - PIC_X) / 2 + sx + Player(Index).XOffset
    y = GetPlayerY(Index) * PIC_Y - (SIZE_Y - PIC_Y) + sx + Player(Index).YOffset
   
   
    If y < 0 Then
        y = 0
        If GetPlayerDir(Index) = DIR_DOWN And Player(Index).Moving > 0 Then
            rec.Top = rec.Top - Player(Index).YOffset
        Else
            rec.Top = rec.Top - Player(Index).YOffset + (SIZE_Y - PIC_Y)
        End If
    End If
   
    If SIZE_X > PIC_X Then
        If x < 0 Then
            x = Player(Index).XOffset + sx + ((SIZE_X - PIC_X) / 2)
            If GetPlayerDir(Index) = DIR_RIGHT And Player(Index).Moving > 0 Then
                rec.Left = rec.Left - Player(Index).XOffset
            Else
                rec.Left = rec.Left - Player(Index).XOffset + ((SIZE_X - PIC_X) / 2)
            End If
        End If
       
        If x > MAX_MAPX * 32 Then
            x = MAX_MAPX * 32 + sx - ((SIZE_X - PIC_X) / 2) + Player(Index).XOffset
            If GetPlayerDir(Index) = DIR_LEFT And Player(Index).Moving > 0 Then
                rec.Right = rec.Right + Player(Index).XOffset
            Else
                rec.Right = rec.Right + Player(Index).XOffset - ((SIZE_X - PIC_X) / 2)
            End If
        End If
    End If
   
    Call DD_BackBuffer.BltFast(x - (NewPlayerX * PIC_X) - NewXOffset, y - (NewPlayerY * PIC_Y) - NewYOffset, DD_SpriteSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
End Sub


Top
 Profile  
 
PostPosted: Wed Apr 30, 2008 10:10 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
What source do you use?

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
PostPosted: Thu May 01, 2008 9:18 am 
Offline
Newbie

Joined: Sat Mar 22, 2008 7:30 pm
Posts: 9
Elysium Diamond 2.0


Top
 Profile  
 
PostPosted: Thu May 01, 2008 11:43 am 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Right, I suggest you tell us that before hand as this is a Mirage forum, so we assume that you're using Mirage Source.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
PostPosted: Thu May 01, 2008 12:21 pm 
Offline
Knowledgeable
User avatar

Joined: Sat Dec 30, 2006 9:09 am
Posts: 252
Gierek wrote:
Ups, I didn't say sth :D
I use Elysium Diamond and I think, ekhm, Im sure that bltplayertop is there;]


Eh.. Robin

_________________
Image


Top
 Profile  
 
PostPosted: Thu May 01, 2008 12:24 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
He posted that after me. :D

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
PostPosted: Thu May 01, 2008 1:06 pm 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
Agreed. Looking at it, the problem seems to be the way their code interferes with the tutorial here. I suggest you ask them :)

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 52 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 46 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group