rude wrote:...but Mike has the final word (tm) in this case...
Alright, I'll take the blame for this.. I wanted simpler functions to begin with rude, remember that? Simpler but not as useful, etc so I went with the idea that was eventually hated. Anyway onto what I think:
First of: Hello ivan. I don't know who you are but everyone is welcome here. I do believe that the first suggestion, using helper objects just seems too confusing:
Code: Select all
rect = love.graphics:new_rectangle ( -50, -50, 50, 50 )\
love.graphics:outline_shape ( rect )
love.graphics.brush:set_color ( 0, 255, 0 )
love.graphics.pen:set_width ( 5 )
love.graphics.pen:set_color ( 255, 255, 0 )
x = 100, y = 100, rotation = 45, scale = 1.0
love.graphics:draw_shape ( rect, x, y, rotation, scale )
In my head this is an unnecessary amount of clutter just for a rectangle. What I wanted was a simpler way to do it where you create a shape (which has a position, rotation, size, etc):
Code: Select all
rect = love.objects:newRectangle(100,100,20,20) -- x, y, width, height
rect:rotate(45) -- degrees
Which would/could be used in collision detection as well as being drawn by the draw function:
Code: Select all
love.graphics:draw(rect, love.fill)
This may oversaturate our SWIG with draw functions (rude explained what he had seen in one legendary night of clarity... the fields of if statements extending endlessly into the horizon) and we're not really sure how we are going to handle collision detection yet so we're going to have to wait for fancy things.
Code: Select all
love.graphics:move_to ( -50, -50 )
love.graphics:line_to ( -50, 50 )
love.graphics:line_to ( 50, 50 )
love.graphics:line_to ( 50, -50 )
love.graphics:line_to ( -50, -50 )
love.graphics:fill ( 255, 255, 0 )
This confuses and infuriates me!
Alright, it takes about 10 seconds of thinking to deduct yourself to what is going on, but as much as a logical system I want LÖVE to be an aesthetically logical system, where you don't need to think. I am not going to say more about our target demographic... *cough*
HOWEVER, the truth came forth in the words of my love mate:
Code: Select all
love.graphics:triangle(love.fill, x1, y1, x2, y2, x3, y3)
love.graphics:circle(love.fill, x, y, r)
love.graphics:circle(love.outline, x, y, r)
etc
This seems very pretty and understandable (as well as useful), despite you having to do the rotational mathematics yourself. I do believe that they could use a "draw" in front of each shape to be completely logical about what's going on, but I think that this could be our choice. Remove the x,y positions and have love.fill/love.outline as parameters.
Mike has spoken
(If you disagree, feel free to say so.. I don't actually have the final word despite what mr."let's avoid people talking to me about this" says)