Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Eclipse Origins v2 Beta


Robin
 Share

Recommended Posts

For RPG Maker XP Style Sprites

In BltPLayer Replace everything from **' Set the left** to **Blt Sprite** with:
```
' Set the left
    Select Case GetPlayerDir(Index)
        Case DIR_UP
            spriteleft = 3
        Case DIR_RIGHT
            spriteleft = 2
        Case DIR_DOWN
            spriteleft = 0
        Case DIR_LEFT
            spriteleft = 1
    End Select

    With rec
        .Top = (spriteleft) * (DDSD_Character(Sprite).lHeight / 4)
        .Bottom = .Top + (DDSD_Character(Sprite).lHeight / 4)
        .Left = (Anim + 1) * (DDSD_Character(Sprite).lWidth / 4)
        .Right = .Left + (DDSD_Character(Sprite).lWidth / 4)
    End With

    ' Calculate the X
    X = GetPlayerX(Index) * PIC_X + Player(Index).XOffset - ((DDSD_Character(Sprite).lWidth / 4 - 32) / 2)

    ' Is the player's height more than 32..?
    If (DDSD_Character(Sprite).lHeight) > 32 Then
        ' Create a 32 pixel offset for larger sprites
        Y = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset - ((DDSD_Character(Sprite).lHeight / 4) - 32)
    Else
        ' Proceed as normal
        Y = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset
    End If

    ' render the actual sprite
    Call BltSprite(Sprite, X, Y, rec)
```
Now do the same in BltNpc With this:
```
' Set the left
    Select Case MapNpc(MapNpcNum).Dir
        Case DIR_UP
            spriteleft = 3
        Case DIR_RIGHT
            spriteleft = 2
        Case DIR_DOWN
            spriteleft = 0
        Case DIR_LEFT
            spriteleft = 1
    End Select

    With rec
        .Top = (spriteleft) * (DDSD_Character(Sprite).lHeight / 4)
        .Bottom = .Top + (DDSD_Character(Sprite).lHeight / 4)
        .Left = (Anim + 1) * (DDSD_Character(Sprite).lWidth / 4)
        .Right = .Left + (DDSD_Character(Sprite).lWidth / 4)
    End With

    ' Calculate the X
    X = MapNpc(MapNpcNum).X * PIC_X + MapNpc(MapNpcNum).XOffset - ((DDSD_Character(Sprite).lWidth / 4 - 32) / 2)

    ' Is the player's height more than 32..?
    If (DDSD_Character(Sprite).lHeight) > 32 Then
        ' Create a 32 pixel offset for larger sprites
        Y = MapNpc(MapNpcNum).Y * PIC_Y + MapNpc(MapNpcNum).YOffset - ((DDSD_Character(Sprite).lHeight / 4) - 32)
    Else
        ' Proceed as normal
        Y = MapNpc(MapNpcNum).Y * PIC_Y + MapNpc(MapNpcNum).YOffset
    End If

    Call BltSprite(Sprite, X, Y, rec)
```
Link to comment
Share on other sites

  • Replies 3.3k
  • Created
  • Last Reply

Top Posters In This Topic

Also, if you're using large tilesets that still fit in the max size after a while you won't be putting down the tiles you selected anymore, but tiles from somewhere on top of the tileset, rather then the ones you picked near the bottom.

EDIT : It does this when your tileset is larger then 8912 pixels. Most likely to do with the 255 limit on everything?
Link to comment
Share on other sites

@YamYam:

> It does this when your tileset is larger then 8912 pixels. Most likely to do with the 255 limit on everything?

Woah… you shouldnt be having tilesets that large.
I thought mine were still to big and my biggest is currently 1600x1600 pixels.
You want to keep sets broken down and as small as possible to.
Even though this engine is dope fast... you still should consider end users.
Keep the tilesets super small so the minimum is loaded each map.
Link to comment
Share on other sites

They were even bigger at first, used them in a different engine I built from scratch just fine. XD Ah well, if I have to split them up even further it'll be a pain, have 8 tilesets already right now, and they're still huge. ;D
Link to comment
Share on other sites

@YamYam:

> Also, if you're using large tilesets that still fit in the max size after a while you won't be putting down the tiles you selected anymore, but tiles from somewhere on top of the tileset, rather then the ones you picked near the bottom.
>
> EDIT : It does this when your tileset is larger then 8912 pixels. Most likely to do with the 255 limit on everything?

ohh ok, I thought I screwed something up when I was doing source edits when I noticed this happening lol
Link to comment
Share on other sites

Oh, right.. Origins isn't stuck with a max of 10 tilesets :P Anyways! I got this tutorial system running now.. It's surprising me how easy it is to add new stuff to this engine without having to look around 60 million lines of code that are complete bullcrap. :cheesy:
Link to comment
Share on other sites

@YamYam:

> Oh, right.. Origins isn't stuck with a max of 10 tilesets :P Anyways! I got this tutorial system running now.. It's surprising me how easy it is to add new stuff to this engine without having to look around 60 million lines of code that are complete bullcrap. :cheesy:

From what I see, you did an excellant job with the tutorial, simple, yet very helpful.

I agree to what you said, it took me a little while to learn but it was really easy to start adding and editing stuff in it, so far I have gotten a working pet system (with pets doing spells) for peekay and a good start of a Pokemon Engine with it.
Link to comment
Share on other sites

Any one else have trouble removing directional blocking? XD
I made a couple one way paths and then walked them… then couldnt remove them...
Then i reopened the map editor twice and then I could remove them...
Then I couldnt again. lol(fresh copy)
Link to comment
Share on other sites

@[PIE:

> ICT link=topic=57637.msg651119#msg651119 date=1276903654]
> A quest system with a scripting system? that dynamic enough?

Sacrificing speed like that is not an option.

For EC we'll be using hardcoded 'scripting'. modScripts.

Where unique events such as quests, 'scripted' items etc. can all be created.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...