Results 1 to 6 of 6

Thread: Help with collision handling!!

  1. #1

    Help with collision handling!!

    Hi, i'm having some problems with my collisionhandling..

    I have pixelperfect collisiondetection between the ground and my sprite, but really have no idea how to make my sprite walk upward or downward a hill, i can make it a hill in a specifik angle and walk it upward or downward with some special tile propertys but how to make my sprite walk upward the hill with pixelperfect collisiondetection?

    I hope anyone understand what i'm talking of here :shock:

    X

  2. #2

    Help with collision handling!!

    Sofar my experience with platformgames are limited to horizontal tiles only, but I think it isn't all that different. I take it you're checking for tile properties when you land on a tile? You could make a tileproperty 'angular'. In which case you use different animations for walking upwards, and of course you add an upwards movement when moving left/right.

    I can't offer any code or samples, however there's a guy on the omega forums working on a game with angular tiles as well, perhaps you can ask him for more details: http://www.delphisanctuary.com/forums...

  3. #3

    Help with collision handling!!

    Since my project is made with Omega i've already been there, and yes i can do it with "angular tiles" but i would like to have some "irregular hills" also not just straight one. It was a couple of days since i last worked on it, but i thought of getting some hints from some more experianced game-makers..

    X

  4. #4

    Help with collision handling!!

    Ah ok, well irregular tiles are whole different story. It would require a lot of checks, on the pixel level, which could affect your game speed quite a bit. In any case there's a CollisionDemo_2 in the omega package which may be of some help. It shows a collision check, with a pixel following the surroundings of the collided object. Exchange the pixel with your sprite, the arrow with your hills and you're well underway.

  5. #5

    Help with collision handling!!

    You could approximate you're map's contour with vectors and if anything collides with them push that object in the direction of their normals.

  6. #6

    Help with collision handling!!

    doh, i missed that example. I'll have a look at it later.

    That vector stuff sounds intresting, i'll have to dig some more thou.

    Thanks for the quick answers..

    X

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
  •