This is a simple grid engine example made for Twine. It has a compass-like moving system. It isn't made for particularly large maps, but it is possible to incorporate one.
Variables:
current_x, current_y = determines position
map_width, map_height = determines the limits of the map
direction = determines the direction