Page 2 of 2

Re: A more object-oriented approach?

Posted: Thu Aug 21, 2008 10:43 pm
by mike
rude wrote:Yeah, looks like I better get used to being Justin Timberlake ...

Or Mike just didn't think it through.
I didn't think it through? I mean, I do love the idea of being a fascist and saying that THIS IS THE WAY IT IS, which has worked very well for me, but if the community really wants this, I don't see why not... is this a lot of work? Tell me the truth now...

Re: A more object-oriented approach?

Posted: Tue Aug 26, 2008 8:14 pm
by Dr. Magnusson
I've always preferred the OOP way over the one LÖVE and many other people working with Lua are using (Multi Theft Auto for one).

Rewriting is probably a lot of work though. I'll be trying to write it in pure Lua, and see how far it goes.

Re: A more object-oriented approach?

Posted: Tue Aug 26, 2008 8:56 pm
by Green_Hell
I'm nod coder, don't understand OOP but,
emonk wrote:

Code: Select all

someFont:draw("text", x, y)
this doesn't make sense to me. Draw as a method of font?
Mr. Strange wrote:I'd actually prefer to use
love.graphics.draw("text string", x, y [,someFont])
And I agree.

Re: A more object-oriented approach?

Posted: Tue Sep 02, 2008 11:04 pm
by conman420
I would prefer it if we didn't have to have love in front of every function ;)

It just seems a bi long winded to have to do love.graphics.draw when graphics.draw would be a lot quicker.

But I'm just being picky :v

Re: A more object-oriented approach?

Posted: Tue Sep 02, 2008 11:33 pm
by rude
Then here's a tip for you:

Code: Select all

graphics = love.graphics
graphics.draw( ... )
^^

Re: A more object-oriented approach?

Posted: Wed Sep 03, 2008 12:01 am
by Kuromeku
Put this at the top of your game.

for k, v in pairs(love) do _G[k] = v; end;

Re: A more object-oriented approach?

Posted: Wed Sep 03, 2008 4:30 pm
by conman420
rude wrote:Then here's a tip for you:

Code: Select all

graphics = love.graphics
graphics.draw( ... )
^^
touché good sir.