Hill detection
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Hill detection

  1. #1
    Junior Member
    Join Date
    Sep 2011
    Posts
    25

    Hill detection

    Hello,

    I'm currently working on a game which will eventually require hill collision detection, as in my environment will not be flat and i want my character to be able to follow the different bumps in the path. Would somebody be able to point me in the right direction for this, I've been searching for tutorials but can't seem to find many on this topic. Ideally I would be able to use 1 movieclip which stores the path the character runs on however I'm really not sure how the collision would work.

    Thanks heaps.

  2. #2
    When in doubt ask Eager Beaver's Avatar
    Join Date
    Feb 2007
    Location
    Planet Earth
    Posts
    874
    I very often find such vague questions in this forum. Unless the actual game play is explained it would be very difficult to suggest a solution. However, I am attaching an .SWF illustrating a bumping car. If you want something similar I can discuss about the program details:

    http://www.gamesmostwanted.com/car-bump.html.

  3. #3
    Funkalicious TOdorus's Avatar
    Join Date
    Nov 2006
    Location
    Nijmegen, Netherlands
    Posts
    697
    If you're looking for curved lines, you may want to look up bezier curves and maybe polygons. I know Nape has functions to split up polygons so they look sloped.

    If you're going for straight lines, again polygons but maybe vectors can suffice for your game.

    If all that may look to daunting for you, possibly you can use bitmap based hitdection. With this you will only be able to detect a collision and not have much info about how to resolve it. It however enables you to use your art as a collision map.

  4. #4
    Junior Member
    Join Date
    Sep 2011
    Posts
    25
    Quote Originally Posted by Eager Beaver View Post
    I very often find such vague questions in this forum. Unless the actual game play is explained it would be very difficult to suggest a solution. However, I am attaching an .SWF illustrating a bumping car. If you want something similar I can discuss about the program details:

    http://www.gamesmostwanted.com/car-bump.html.
    Opp, your right it is a bit vague, I'm wanting it so that, my character, which is a movieclip will collide with my ground which will also be a movieclip, but can be a bitmap (only if it matters). I want my character to follow the contours of the hill which I have drawn. The bumping car is what I want yes, if you've done it how I've explained I want it. Thanks.

  5. #5
    When in doubt ask Eager Beaver's Avatar
    Join Date
    Feb 2007
    Location
    Planet Earth
    Posts
    874
    If you want further information about my game please send E-Mail to:
    support@gamesmostwanted.com

Posting Permissions

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




Click Here to Expand Forum to Full Width


HTML5 Development Center

Poll by Flashkit.com