Log inGet started
World

Pixel Ledges: 2D Platformer Kit with Sprites, Tilemaps, Wall Jumps and Dash

README.md

twoDKit.PixelSkin

Draws a part from another kit as pixel art that matches your level, so a Trapline saw or a platformsKit moving platform placed next to a Level2D doesn't stand out as a smooth 3D object in a pixel-art scene. Add it to the same entity as the part; nothing else to set.

-- a Trapline saw drawn as a pixel buzzsaw on a steel track
local saw = entity.spawn("Saw", { position = { 21.5, 3.5, 0 } })
saw.component.add("Trapline.Hazard", { look = "saw", sizeX = 5, sizeY = 1.2 })
saw.component.add("twoDKit.PixelSkin")

-- a platformsKit moving platform drawn as the tile set's one-way planks
local lift = entity.spawn("Ferry", { position = { 27.5, 3, 0 } })
lift.component.add("platformsKit.Platform", { kind = "pingpong", look = "pixel", sizeX = 3, sizeY = 0.5, sizeZ = 1,
    path = { { 5, 0, 0 } }, speed = 2, wait = 0.6, trigger = "always" })
lift.component.add("twoDKit.PixelSkin")

What it draws

On an entity withIt draws
Trapline.Hazard, look = "saw"A spinning pixel saw blade (four frames, spinSpeed per second) placed on the hazard's own moving blade every frame, on a steel track with bolted, hazard-striped end posts sized to the hazard's sizeX. Art: art/fx/saw, made by artgen/fx (sawSheet).
platformsKit.PlatformThe current tile set's one-way plank pieces (left end, middle, right end), riding the part platformsKit moves (the parent of its collider). It follows the theme: switch the level's theme or tile set and the planks re-skin.

The other kit's 3D look is hidden on this peer, re-checked twice a second so a rebuilt look is hidden too. Nothing about how the part plays changes: where the blade is and what it hurts, how the platform moves and carries riders are still Trapline's and platformsKit's, on their shared clocks, so every player sees the same thing. It also works in edit mode, so the editor shows the pixel look.

Fields

FieldDefaultWhat
tilesetautoTile set a platform's planks come from: auto uses the level the platform is in (via twoDKit.levels), or name one (grassland, cave, castle, lab, snow, desert, or your own).
spinSpeed16Saw blade animation frames per second.

Notes

  • A saw is best placed half a tile above the floor with sizeY = 1.2 (a small blade a full jump clears); the track's posts then reach the floor.
  • Level text M / V movers in a Level2D are skinned by the level itself; PixelSkin is for platforms and hazards you place by hand.
  • Other Trapline hazard looks keep their own look (PixelSkin leaves an entity without a saw or platform alone).