MichaelSinsbeck / platformer

A ninja platformer written in LÖVE
7 stars 0 forks source link

[LE] Line drawing tool #110

Closed Germanunkol closed 10 years ago

Germanunkol commented 10 years ago

Should be usable for the walls/grounds and for background walls.

Germanunkol commented 10 years ago

Done for walls and eraser. Will need an update one backgrounds are in.

michalove commented 10 years ago

I'd like to hear you opinion: Would you think a bresenham-supercover-algorithm is more appropriate for this situation? After all, walls are mostly connected, rather than floating in the air.

See this thread: https://love2d.org/forums/viewtopic.php?f=4&t=77085&p=161483#p161483

Germanunkol commented 10 years ago

I read through it and had a look at the super-cover algorithm. I see your point with them being connected, but I believe the normal bresenham is sufficient. Simply, because with the bresenham, you can easily create something similar to the supercover (by placing another line next to it or adding the tiles with the normal pen tool) while it's not possible the other way around; with the supercover algorithm, you can never draw the thin lines. Also, using the supercover algorithm won't prevent users from making "thin", "diagonal" walls, since there is still the normal pen tool.

I can change it if you want to, but my vote is for the flexibility the normal bresenham gives.

michalove commented 10 years ago

You convinced me. Leave it as it is.