Search found 3444 matches

by zorg
Fri Jan 08, 2016 5:09 pm
Forum: Support and Development
Topic: label is created multiple times?
Replies: 6
Views: 3133

Re: label is created multiple times?

really simple imlpementation:

Code: Select all

local label = "I AM NOT A LABEL :3"
local width = love.window.getWidth()
function love.draw()
  love.graphics.printf(label, width, 0, width/2, 'right') -- string, x, y, limit, alignment (and other optional stuff after)
end
by zorg
Fri Jan 08, 2016 3:34 pm
Forum: Support and Development
Topic: label is created multiple times?
Replies: 6
Views: 3133

Re: label is created multiple times?

Welcome, indeed! Also, you shouldn't really define love.draw inside love.update, since it'll redefine it every frame; do it this way instead: local trigger = false function love.update(dt) if love.mouse.isDown(1) then trigger = true else trigger = false end end function love.draw() if trigger then l...
by zorg
Fri Jan 08, 2016 10:33 am
Forum: Support and Development
Topic: Pack of noob questions
Replies: 2
Views: 1844

Re: Pack of noob questions

Hi, 4. I'm walked away from bounding box collision. I want the vertex-based collision and i'm looking for good algorithms. Where i can find polygonal collision check(with expulsion, desirable)? You can use HardonCollider for polygonal collision detection. 3. I have many polygonal objects in screen a...
by zorg
Thu Jan 07, 2016 9:19 pm
Forum: Support and Development
Topic: updated to 9.2 console window not showing
Replies: 19
Views: 9861

Re: updated to 9.2 console window not showing

He's telling you that löve became smarter by not opening its own console window, instead using an already existing one instead. That did indeed make someone's workflow easier by not having the console take up another window. If the IDE of your choice would work correctly, that would mean you could d...
by zorg
Thu Jan 07, 2016 3:43 pm
Forum: Support and Development
Topic: Drawing an 'undrawing' images
Replies: 9
Views: 3750

Re: Drawing an 'undrawing' images

haii again!, Thanks for the code, just wondering with this code ,will it delete the picture after use (as in another one is called) If you mean will it only show one image at once, then yes. If you mean will it unload all the other images, then no, but since you're gonna animate using them, why loa...
by zorg
Thu Jan 07, 2016 2:36 pm
Forum: Support and Development
Topic: Drawing an 'undrawing' images
Replies: 9
Views: 3750

Re: Drawing an 'undrawing' images

You can put the images into a table, and only draw one image at once. local health love.load() health = {} -- even this could be written with less duplication as a cycle (a for loop) health[0] = love.graphics.newImage("assets/heartline0.png") health[1] = love.graphics.newImage("assets...
by zorg
Thu Jan 07, 2016 5:50 am
Forum: Support and Development
Topic: Accelerometer
Replies: 6
Views: 3348

Re: Accelerometer

You're quite welcome.
Also, just for completeness' sake, if you wanted to use the last joystick entry, then it could be made simpler:

Code: Select all

-- in love.load:
-- ...
joysticks = love.joystick.getJoysticks()
joystick = joysticks[#joysticks] -- no need for the for loop
-- ...
by zorg
Wed Jan 06, 2016 9:39 pm
Forum: Support and Development
Topic: Accelerometer
Replies: 6
Views: 3348

Re: Accelerometer

Using a similar example to the one on the Joystick object wiki page: local joystick, position, speed function love.load() joystick = love.joystick.getJoysticks()[1] position = {x = 0, y = 0} speed = 10 end function love.update(dt) if joystick then local axis1, axis2 = joystick:getAxes() position.x, ...
by zorg
Wed Jan 06, 2016 2:13 pm
Forum: Games and Creations
Topic: Hotplate app for your phone
Replies: 17
Views: 10703

Re: Hotplate app for your phone

I should post this in the next löve version feature request thread instead (or there as well), but, assuming some handheld devices having temperature sensors, if we could get the data from those, this app could implement temperature-based heating as well. Use cases: Keeping my tea lukewarm Advanced ...