Page 3 of 3

Re: Draw Single Pixel?

Posted: Thu Nov 28, 2013 1:33 pm
by DaedalusYoung
It depends how you think of the LÖVE functions that makes it OO. Treat them as the tables they really are and it's not looking so OO anymore:

Code: Select all

love['graphics']['print']("Hello lol", 5, 5)
Still works fine and maybe shows more easily the table structure. It's just a bit easier to write it as love.graphics.print, but the meaning is the same.

Don't think of returned objects as objects. For example, love.graphics.newImage returns an image object, but I don't like objects, so I just call it an image type. Remember how in x = 5, x is now of type number? And in var = false, now var is type boolean. Well, just see LÖVE as an extension to Lua, making img = love.graphics.newImage(...) return an image type.

(In fact, I believe it's actually a userdata type, which is one of the 8 types in Lua anyway)

Re: Draw Single Pixel?

Posted: Sat Nov 30, 2013 2:02 am
by nutcase84
It's still not close enough. I still can't get even 1 frame per second out of this thing. :(

Re: Draw Single Pixel?

Posted: Sat Nov 30, 2013 2:29 pm
by Robin
If you upload your .love to the forums, we can take a look at it and come with more specific suggestions.

Re: Draw Single Pixel?

Posted: Sat Nov 30, 2013 3:25 pm
by master both
maybe lowering the resolution or making the pixels bigger can help. Or maybe you can modify love.run to update the srceen only when a change is made.

Re: Draw Single Pixel?

Posted: Sat Nov 30, 2013 3:29 pm
by nutcase84
I uploaded a love. Look at one of my older posts.

[]

Posted: Sat Nov 30, 2013 3:40 pm
by bekey
-snip-