boxclip icon indicating copy to clipboard operation
boxclip copied to clipboard

Stenciled platform entities

Open Jigoku opened this issue 3 years ago • 0 comments

Implement a way to use a stencil entity with platforms (would be placed as a resizeable rectangle).

  • stencil area occludes portions of the drawn platform to create a hole
  • would add some additional detail/interesting geometry to a level
  • does not affect collisions, as this would be intentionally used on the inside bounds of a platform entity.
local function stencil()
    love.graphics.rectangle("fill", x,y, w, h, r, r)
end

love.graphics.stencil(stencil, "invert", 255)
love.graphics.setStencilTest("less", 255)

draw()

Jigoku avatar Nov 01 '20 02:11 Jigoku