API Wars

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
osgeld
Party member
Posts: 303
Joined: Sun Nov 23, 2008 10:13 pm

Re: API Wars

Post by osgeld » Wed Jan 14, 2009 10:56 pm

you could define a constant

in lsl (secondlife scripting) one constant is DEG_TO_RAD (and RAD_TO_DEG)

so when you want to convert its deg * DEG_TO_RAD

course all that constant is really doing is deg * (PI / 180) but its kind of a middle ground tween expecting everyone to know how to convert and a full blown function, and i would assume much easier to implement


-2 cents

User avatar
Kaze
Party member
Posts: 189
Joined: Sat Jul 19, 2008 4:39 pm
Location: Dublin, Ireland

Re: API Wars

Post by Kaze » Wed Jan 14, 2009 11:30 pm

Or just use math.rad and math.deg.

User avatar
osgeld
Party member
Posts: 303
Joined: Sun Nov 23, 2008 10:13 pm

Re: API Wars

Post by osgeld » Thu Jan 15, 2009 12:06 am

holy crap, almost 2 years messing around with lua and i have never noticed those before!

ok i will stop talking now

User avatar
rude
Administrator
Posts: 1051
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: API Wars

Post by rude » Thu Jan 22, 2009 4:22 pm

Ok, next war:

Default local origin in top-left of the image.
VS
Default local origin at the center of the image.

I.e.: given love.graphics.draw(image, 50, 50), should the image be drawn so that the center is at (50, 50) or so that the top-left corner of the image is at (50,50)?

Thaaaanks! :neko:

EDIT: Clarified question.

petsagouris
Prole
Posts: 4
Joined: Wed Jan 21, 2009 3:33 pm

Re: API Wars

Post by petsagouris » Thu Jan 22, 2009 4:41 pm

This is my proposal for this problem. Pretty Lua. :)

Code: Select all

love.graphics.draw(image, %d+, %d+, [placement_origin,] [placement_offset])
Draws the default current behavior if placement_origin variable is not provided.

possible placement_origin values:

Code: Select all

love.TL, love.TM, love.TR
love.ML, love.MM, love.MR
love.BL, love.BM, love.BR
possible placement_offset values:
any specific set of x and y distance from the origin point.

User avatar
rude
Administrator
Posts: 1051
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: API Wars

Post by rude » Thu Jan 22, 2009 4:52 pm

Yes, but what should the default behavior be?

petsagouris
Prole
Posts: 4
Joined: Wed Jan 21, 2009 3:33 pm

Re: API Wars

Post by petsagouris » Thu Jan 22, 2009 5:42 pm

As the OpenGL/GLUT combo functions. Top Left. (for historical reasons as they say)

Did I mention that I totaly respect what you are doing here. Well done!

User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: API Wars

Post by bartbes » Thu Jan 22, 2009 5:56 pm

It really doesn't matter to me (althought top-left does seem more correct), however if you change the default behaviour there has to be some sort of compat-code (maybe something with the version string in the config?) as it will invalidate all previous-written games.

User avatar
osgeld
Party member
Posts: 303
Joined: Sun Nov 23, 2008 10:13 pm

Re: API Wars

Post by osgeld » Thu Jan 22, 2009 6:01 pm

i vote top left

User avatar
rude
Administrator
Posts: 1051
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: API Wars

Post by rude » Thu Jan 22, 2009 6:13 pm

Ok, looks like top-left so far.
bartbes wrote:it will invalidate all previous-written games
Oh, hohohohoh. All games will be invalidated anyway. The next codename should be Chicxulub, because when I'm done with this version, all that's left of the API is an impact crater. The users that never use LÖVE again due to massive API break will be called Dinosaurs. (They eventually go extinct). :rofl: HAHAHAhahahha ... hah. ha.
petsagouris wrote:Did I mention that I totaly respect what you are doing here. Well done!
That's cool. :neko:

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests