Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Pathfinding Widget for Maze-Games [Sugarcube]

I wrote a pathfinding widget for maze-games, that use arrays of arrays to display 2-dimensional maps. It is not intended for diagonal movement. I might use it for a roguelike, for enemy movement, but just in case anybody else needs something like it, here's the code. Included in the .tws is an example of how you can use it, you can also browse the demo page. When you hit "refresh" you will see the "ik" string move through the maze.

Note that the pathfinding, as it is, is suited for array-maps where the difference between passable and non-passable locations is coded in positive (passable) and negative (not passable) numbers. Also the map needs an outer boundary of non-passable locations.

feedback and suggestions are very welcome! :)

best wishes
engine

Comments

  • It gives me an error when I load it at both Twine 2.0 and 1.4.2 :(

    EDIT: Oh, I didn't realize it required Sugarcube. I'm pretty new at doing Twine.
  • If you want to do more complex stuff, I really recommend you to try sugarcube! :)
Sign In or Register to comment.