A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: how to make adventure game like walking

  1. #1
    Join Date
    Aug 2010

    how to make adventure game like walking

    hello i am going for an adventure type game, like scumm engine. I am researching how to make the walking, now can anybody tell me, if its a good way to use a bitmap hittest for the area one might click where he wants to walk, then on a graph node find the closest node to the clicked spot, and with depth first or breadth first search the route to it. Then i would attach metadata to all links between nodes with info how to animate while going from one to another, like there would be simple walking nodes, perspective nodes, ladder climbing nodes, maybe swimming nodes etc. Is it a good idea?

  2. #2
    Funkalicious TOdorus's Avatar
    Join Date
    Nov 2006
    Nijmegen, Netherlands
    I've never implemented all of this, but the old skool SCUMM engine and it's games always generate nostalgia in me and I've pondered on the system on occasions.

    I think there a few things to consider. If you're going for a node graph, the closest node finding part already brings some problems. For instance, how does it know if the player clicked in an area it can't walk on? Another thing to look out for is to not just pick the closest node, as there can be a unpassable area, like a wall, between the closest node and the endpoint.

    I've come to the conclusion that a navmesh would be much more suited for an adventure game. In addition you can place some items on the polygons which hold interactions: like teleport to another area/screen, add the item to inventory, or run an animation. This way you can use one base object to handle all interactions.

  3. #3
    Senior Member webgeek's Avatar
    Join Date
    Sep 2000
    Assuming you are using a nice hand-drawn background, just overlay a grid on it and mark parts of the grid walkable or not. You can just as easily handle triggering animations and the like via grid information.

    I've attached two screen shots of our map editor for the EUP product we sell. The first image shows a grid with mostly green and some red squares as well as one blue square. The green squares are walkable, red are not, and the blue is a "teleport" tile that takes you to a new location. You don't need to build a fancy editor like this if you don't want to, you can still get the same effect with something simple. The second shot shows you what it looks without the grid - so what the player sees.

    Then you just use something like A* to handle path finding, nice and simple. Now this example has a high isometric angle to the grid. That angle can be whatever you want and doesn't need to be isometric. Just pick a grid that matches your viewpoint in the game and you'll be golden. Have fun!
    Attached Images Attached Images
    Last edited by webgeek; 12-26-2010 at 12:22 PM.

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