Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Big oops.......

  1. #1

    Big oops.......

    I just realised something.....

    I'm using an RPG type player sprite (45 degree angle thing) but the objects are drawn and treated as if it was a Top-Down game lmao.....

    I like the character I have now, but doing the objects this way is now starting to see odd....

    Ok so I could do it fully RPG looking sort of style.... then again, how on earth am I going to have him both walking infront of, and behind objects :|, and how would I stop him from doing both at the same time.......

    My head hurts LOL.

  2. #2

    Big oops.......

    You're talking about writing an isometric 3D engine?

    How many times is that wheel going to get re-invented on this site? :lol:

  3. #3

    Big oops.......

    mmm isometric is different I believe.

    I'm talking average SNES rpg kind of way, not AOE II Isometric tiling .

    As in I use square shapes that stay as squares not turn them into diamon shape and join them.

    Well you know what I mean.

  4. #4

    Big oops.......

    I see what you mean. Just your sprites have 45 degree animations.
    No problem.

    The problem of walking in front of some objects and behind others can be sorted by Z-Order.

    Basically, make sure you draw objects which are behind the sprite first, then the sprite, then the objects which are in front.

  5. #5

    Big oops.......

    Oh no, that's not a problem.

    It's the problem of walking infront of and behind the one and same object depending on whether the player is coming from the which direction.

    Well just think of a rock in that style, you need to walk behind and infront of it.

    In RPG style, it *appears* to have real bottom (well think of the area of the base of the bottom of the object) if the player is a bit higher, then he'll go behind, if lower, he'll go infront.

    But I may actually be able to get away with bomberman style , as he only walks infront of things, not behind them (except for enemies, so still a bit hmm on that one).

  6. #6

    Re: Big oops.......

    Quote Originally Posted by Chesso
    Ok so I could do it fully RPG looking sort of style.... then again, how on earth am I going to have him both walking infront of, and behind objects :|, and how would I stop him from doing both at the same time.......

    My head hurts LOL.
    you mean the perspective or depth? if you mean depth then you just sort the sprites by distance from camera.
    This is my game project - Top Down City:
    http://www.pascalgamedevelopment.com...y-Topic-Reboot

    My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
    http://www.pascalgamedevelopment.com...source+manager

  7. #7

    Big oops.......

    Depends on what you mean by a camera lol this only 2D .

    I'd hate to be playing with collisions and such with 3D ouch.

  8. #8

    Big oops.......

    Hmmm... I hope I understand you right.

    each object should have a collisionshape. I think in most cases a rectangle or circle is enough.

    When you test your player if he collides with an object, test his feet area only to see if his feet are colliding with the object. If the feet are above the collision shape of the tested object, draw the object in front of the player. If the players feet are below, the player is in front of the object.

    So basically, the collisionshape of each object is half the height of the objects bitmap itself when view from an 45¬? angle.

    Hope you understand what I mean. Don't test the whole player, just his lower part, depending on your view. A screenshot would be nice to help you detailed....

    Greetings,
    Dirk
    <a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&amp;utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>

  9. #9

    Big oops.......

    It's too bad,why you always want to modify the 'BoundsRect' ?
    You don't consider test tile,dummy tile...etc.

    But here a sample perfect to solve the problem.
    This way is also easy,simple than modify BoundsRect.
    http://www.afterwarp.net/forum/attac...4&d=1145473991

    It use Asphyre but the sprite engine is the same as DelphiX.

  10. #10

    Big oops.......

    I devised myself an even simpler solution, and after having a little play with AOEIII it just popped into my head....

    [pascal]
    If Not (Y + 5 >= Sprite.Y) Then
    Begin
    // Do our normal collision checking.
    End;

    // Check if any objective(s) have been met.
    If (........
    [/pascal]

    So the top part basically tells it to ignore 5 pixels below the sprites top position, which happens to be head.

    Seems to work perfectly atm.

    If I do end up having some type(s) of enemies in the game, I'm not sure how I will handle walking behind them (and always changing the Z value) but I should be able to figure something out (have a couple of ideas).

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •