Search found 1138 matches

by davisdude
Fri Sep 22, 2017 1:39 pm
Forum: General
Topic: issue with circle pong collision detection
Replies: 1
Views: 81

Re: issue with circle pong collision detection

In your function LineAngle, replace math.atan with math.atan2 and replace the division sign with a comma. Specifically, note the differences between the parameters for math.atan and math.atan2 in the Lua 5.1 documentation . Also note that math.atan2 was deprecated in 5.3 (emphasis mine): The followi...
by davisdude
Wed Sep 13, 2017 11:12 pm
Forum: Games and Creations
Topic: [Game] The Lord of candy
Replies: 5
Views: 397

Re: [Game] The Lord of candy

I like it! Simple mechanic, but still fun. My one suggestion would be a way to "cancel" a throw, by right clicking, for instance. Also, the zero gravity power-up actually makes it WAY harder later in the game. All the balls just float into the thing, causing you to lose unless you focus on keeping b...
by davisdude
Tue Sep 12, 2017 1:51 am
Forum: General
Topic: checking if a value is not on table ?
Replies: 15
Views: 545

Re: checking if a value is not on table ?

Maybe I'm missing something here, but it seems like the simplest (and most efficient) solution would be to just check if that element is nil before or after the loop local tab = { a = 1, b = 2, c = 3 } local key = 'testKey' local notInTable = tab[key] == nil if notInTable then print( 'The key "' .. ...
by davisdude
Tue Sep 05, 2017 12:59 pm
Forum: General
Topic: release date for 0.11 ?
Replies: 4
Views: 340

Re: release date for 0.11 ?

In the past, major releases seem to end up being on holidays, so I'm hopeful for a little Christmas present! :)
by davisdude
Tue Aug 22, 2017 7:02 pm
Forum: Support and Development
Topic: [solved]Is there a way to sleep/wait without freezing window?
Replies: 6
Views: 367

Re: [solved]Is there a way to sleep/wait without freezing window?

Variables are local to their scope, which is loosely "their indentation level" assuming you indent your code normally. You can still make the variables local by declaring them outside of love.load, in one of two ways: local currentSlowFrames, numberOfSlowFrames function love.load() currentSlowFrames...
by davisdude
Tue Aug 22, 2017 4:38 pm
Forum: Support and Development
Topic: [solved]Is there a way to sleep/wait without freezing window?
Replies: 6
Views: 367

Re: Is there a way to sleep/wait without freezing window?

Are you sure you're incrementing the variable correctly and have not mistyped the assignment? That's the only thing I can think of without looking at your code.
by davisdude
Tue Aug 22, 2017 2:00 pm
Forum: Support and Development
Topic: [solved]Is there a way to sleep/wait without freezing window?
Replies: 6
Views: 367

Re: Is there a way to sleep/wait without freezing window?

To do this you would need to only update every x frames, where x is the amount by which you want to slow down. For instance, if you want your game to move at 1/2 speed, you would do something like this: -- main.lua local numberOfSlowFrames = 2 local currentSlowFrames = 1 function love.update( dt ) i...
by davisdude
Sat Aug 19, 2017 11:31 pm
Forum: Games and Creations
Topic: Asteroids game with selectable ships
Replies: 14
Views: 1186

Re: Asteroids example, first playable .love file !

Looks good, especially considering your (relatively) minimal experience with the engine! My bit of feedback is somewhat nitpicky, but in general people dislike it if your game starts out full screen.
by davisdude
Fri Aug 18, 2017 5:14 pm
Forum: General
Topic: Empty blue screen
Replies: 2
Views: 192

Re: Empty blue screen

Probably, but we can't know for sure without a .love ;)
by davisdude
Sat Aug 12, 2017 11:27 pm
Forum: Support and Development
Topic: Need Help for Collision
Replies: 7
Views: 541

Re: Need Help for Collision

This works for me

Code: Select all

function CheckCol(x1,y1,w1,h1,x2,y2,w2,h2) --bounding box
	return x1 <= x2+w2 and
	x2 <= x1+w1 and
	y1 <= y2+h2 and
	y2 <= y1+h1

end