A more object-oriented approach?

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
mike
Administrator
Posts: 364
Joined: Mon Feb 04, 2008 5:24 pm

Re: A more object-oriented approach?

Post 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...
Now posting IN STEREO (where available)
User avatar
Dr. Magnusson
Prole
Posts: 22
Joined: Sun Jul 20, 2008 6:10 pm

Re: A more object-oriented approach?

Post 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.
Green_Hell
Citizen
Posts: 94
Joined: Thu Feb 21, 2008 1:11 am

Re: A more object-oriented approach?

Post 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.
>>I love LÖVE.<<
User avatar
conman420
Prole
Posts: 33
Joined: Sun Aug 31, 2008 8:46 pm

Re: A more object-oriented approach?

Post 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
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: A more object-oriented approach?

Post by rude »

Then here's a tip for you:

Code: Select all

graphics = love.graphics
graphics.draw( ... )
^^
User avatar
Kuromeku
Party member
Posts: 166
Joined: Sun Jul 20, 2008 5:45 pm

Re: A more object-oriented approach?

Post by Kuromeku »

Put this at the top of your game.

for k, v in pairs(love) do _G[k] = v; end;
User avatar
conman420
Prole
Posts: 33
Joined: Sun Aug 31, 2008 8:46 pm

Re: A more object-oriented approach?

Post by conman420 »

rude wrote:Then here's a tip for you:

Code: Select all

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

Who is online

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