Draw Single Pixel?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
DaedalusYoung
Party member
Posts: 413
Joined: Sun Jul 14, 2013 8:04 pm

Re: Draw Single Pixel?

Post 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)
nutcase84
Prole
Posts: 11
Joined: Sun Nov 24, 2013 7:48 pm

Re: Draw Single Pixel?

Post by nutcase84 »

It's still not close enough. I still can't get even 1 frame per second out of this thing. :(
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Draw Single Pixel?

Post by Robin »

If you upload your .love to the forums, we can take a look at it and come with more specific suggestions.
Help us help you: attach a .love.
User avatar
master both
Party member
Posts: 262
Joined: Tue Nov 08, 2011 12:39 am
Location: Chile

Re: Draw Single Pixel?

Post 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.
nutcase84
Prole
Posts: 11
Joined: Sun Nov 24, 2013 7:48 pm

Re: Draw Single Pixel?

Post by nutcase84 »

I uploaded a love. Look at one of my older posts.
bekey
Party member
Posts: 255
Joined: Tue Sep 03, 2013 6:27 pm

[]

Post by bekey »

-snip-
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 3 guests