Search found 74 matches

by surtic
Thu Oct 09, 2008 4:56 pm
Forum: Support and Development
Topic: Getting the movement like this.
Replies: 11
Views: 11982

Re: Getting the movement like this.

Yes, LÖVE uses degrees, but Lua (math.sin and math.cos) uses radians...

Ah well...
by surtic
Wed Oct 08, 2008 9:12 pm
Forum: Support and Development
Topic: Getting the movement like this.
Replies: 11
Views: 11982

Re: Getting the movement like this.

Something like this?
by surtic
Sat Oct 04, 2008 8:12 pm
Forum: Support and Development
Topic: Total insanity related to love.keyboard.isDown()
Replies: 4
Views: 2778

Re: Total insanity related to love.keyboard.isDown()

Are you sure you copied the code correctly? This line looks suspicious: if(love.keyboard.isDown(love.key_f) then There's a missing right bracket there (and Lua does complain about it). The code should definitely shout after you set blockingID to nil. Could you attach the full code (instead of just a...
by surtic
Tue Sep 30, 2008 10:52 pm
Forum: Support and Development
Topic: How can I get the current screen/window depth ?
Replies: 2
Views: 2514

Re: How can I get the current screen/window depth ?

Try using:

Code: Select all

screen_width = love.graphics.getWidth()
screen_height = love.graphics.getHeight()
by surtic
Sun Sep 28, 2008 10:03 pm
Forum: Support and Development
Topic: An example for love.graphics.getModes() ?
Replies: 5
Views: 6191

Re: An example for love.graphics.getModes() ?

Of course that's ok. I'd be happy to write more examples and tutorials - where can I send them to? (Also, is there a concise list of wanted tutorials, something a bit shorter than the endless thread ?) For Lua tutorials, the first point of reference is the Lua website ( http://www.lua.org ) and the ...
by surtic
Sun Sep 28, 2008 7:24 pm
Forum: Support and Development
Topic: An example for love.graphics.getModes() ?
Replies: 5
Views: 6191

Re: An example for love.graphics.getModes() ?

love.graphics.getModes returns a table which is something like {{width=..., height=...}, {width=..., height=...}, ...}. I've attached a small program to show the modes: function load() modes = love.graphics.getModes() local font = love.graphics.newFont(love.default_font) love.graphics.setFont(font) ...
by surtic
Wed Sep 24, 2008 9:38 pm
Forum: Support and Development
Topic: Initializing a specific object with arbitrary parameters
Replies: 11
Views: 8670

Re: Initializing a specific object with arbitrary parameters

The confusing thing is that a.x is not equivalent to a[x] but to a["x"]. Lua expects a value in the brackets. If you write a[x], it sees x (which is not a value, but apparently a variable name), and it tries to evaluate it. In most cases, x is not defined, so its value is nil. So Lua sees ...
by surtic
Wed Sep 17, 2008 10:37 pm
Forum: Support and Development
Topic: Odd bug in game.
Replies: 2
Views: 2516

Re: Odd bug in game.

Code: Select all

      if WorldX[a].WorldY[a] then
I'm sure you meant

Code: Select all

      if WorldX[a].WorldY[b] then
by surtic
Mon Sep 15, 2008 9:50 pm
Forum: Libraries and Tools
Topic: A text box control
Replies: 6
Views: 8631

Re: A text box control

Looks great!

Personally I find the blinking selection a bit irritating (blinking stuff almost always irritates me).
Also, the movement is a bit slow (compare to a standard applicaton - the cursor moves pretty slowly).

Other than that - very nice and very usable.
by surtic
Tue Sep 02, 2008 10:53 pm
Forum: Support and Development
Topic: Making games standalone from LOVE?
Replies: 8
Views: 6507

Re: Making games standalone from LOVE?

Speaking of 0.5.0, how about that love.graphics.newImage(rgba_buffer, width, height)?

... Just asking :?