forked from deepnight/ldtk
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Many times in games we need to utilize some kind of line or curve shape. Sometimes to make enemy paths, sometimes to make walls and such, or to make cutscenes. Being able to just draw line segments or curve segments and have them as parsable entities would be very nice. Imagine making the pinball game with just line segments instead of having to use tiles. Would have made level design significantly easier.
Tasks:
- new layer type: LineLayer
- new entity type: LineSegment
- new entity type: CurveSegment
- straightforward draw step for each line segment
- more complicated draw step for curved segments, each point is a control point instead of the ACTUAL point, maybe?
- add properties to the entire line segment
- add properties to each point in the line
- add new points to the middle of a line
- delete points out of an existing line
- select individual points and drag to move them
- select the line to move all the points in the line
- pick the color of the line, or maybe each line segment individually would be nice (think of level creation where you have the SOLID line segments, then you want the wall to continue, but have a bouncier section of line, or maybe a one-way floor. Being able to individually set the color of each line segment would make it visually easier to tell where the different properties are for the line)
- export each line entity as
{uid:string, worldPosX:float, worldPosY:float, levelPosX:float, levelPosY:float, points: [...{uid:string, localPosX:float, localPosY:float, ...custom_properties}], ...custom_properties} - being able to rotate the entire line would be nice
Questions/Concerns:
- is a curve segment made up of points like a regular LineSegment, and then ALSO a list of control points? Or are the control points just assumed to be a part of the list of line points?
- can you just DRAW lines in the LDTK platform? Or is that a whole thing that we will have to figure out on top of all this?
- do Line and Curve Segments need their own layer? Or can they share a layer with entities? It seems like it would be nice to not have to create an entirely new type of layer so we can just reuse the old one, but I can also see how it might be hard to have a combination of regular Entities with Line Entities mixed together in the same layer.
- when you have an EntityRef on a normal object, how can you reference the line? Do you drag the EntityRef to one of the points on the line and you get a ref to THAT point on the line? Or how can you get a ref to the parent line segment?
- maybe we should support a tree-like structure too? TreeSegment. That way you could create branching line segments? But I'm not really sure what the use-case is exactly. It seems like it COULD help with being able to
Metadata
Metadata
Assignees
Labels
No labels