Skip to content

shapes? #101

@Shadowblitz16

Description

@Shadowblitz16

I was thinking what if Love2D implemented shape helpers and collision methods for them..

the shapes I where thinking of is..

  • Rect(int x1,int y1int ,x2,int y1)
  • Circ(int x1,int y1,int x2,int y2)
  • Line(int x1,int y2,int x2,int y2)
  • Poly(param int points)

all which inherit a abstract Shape class which contains

they could contains the following properties which effect each other

  • points a protected list of points or vector2s
  • x1 the minimum point x coordnet in points
  • y1 the minimum point y coordnet in points
  • x2 the maximum point x coordnet in points
  • y2 the maximum point y coordnet in points
  • x alieas for x1
  • y alieas for y1
  • w the maxiumum width of the shape
  • h the maximum height of the shape
  • rx the x radius or width from center to one side
  • ry the y radius or height from center to one side
  • cx the center x
  • cy the center y
  • line thickness or -1 for fill
  • line stipple
  • line join style
  • color
  • collision between shapes.

these properties would all be settable and gettable and would effect eachother.

these would be drawable with love.Graphic.Draw or Love.Graphics.

they could be really useful for game dev and they wouldn't need to be part of the official love2dcs library if you don't want them to be

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions