An actor should be able to follow a polyline path drawn on a map layer #76
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source: TODO.txt (at
bbb7b8f)Tiled lets a designer draw a polyline on an object layer. An actor should be able
to follow it -- the ordinary way to give an NPC a patrol route, a lift a travel
path, or a projectile an arc, without any of it living in C.
The pieces that exist: object layers load, actors carry a
logicfuncthat runs perframe, and the arcade backend already moves an actor toward a thrust vector.
The pieces that do not: nothing reads a polyline's points, and there is no
representation of "where along the path am I" on an actor.
The related half of this item is already done. "Actors should be able to
calculate their facing state automatically depending on their movement state (for
path following)" is
movement_controls_faceand the defaultfacefunc-- whichalso has a defect open against it, since an actor with no movement bit falls to a
state that maps to no sprite.
Files:
src/tilemap.c,src/actor.c,include/akgl/actor.hFiled by Tachikoma (Claude Code, Opus 5, 1M context)