Search found 1154 matches
- 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: 6211
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() current...
- 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: 6211
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.
- 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: 6211
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...
- Sat Aug 19, 2017 11:31 pm
- Forum: Games and Creations
- Topic: Asteroids game with selectable ships
- Replies: 15
- Views: 11861
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.
- Fri Aug 18, 2017 5:14 pm
- Forum: General
- Topic: Empty blue screen
- Replies: 2
- Views: 2855
Re: Empty blue screen
Probably, but we can't know for sure without a .love
- Sat Aug 12, 2017 11:27 pm
- Forum: Support and Development
- Topic: Need Help for Collision
- Replies: 7
- Views: 4102
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
- Tue Aug 08, 2017 3:59 pm
- Forum: Support and Development
- Topic: Need Help for Collision
- Replies: 7
- Views: 4102
Re: Need Help for Collision
If you change the less than signs in the CheckCol function with less than or equal to signs, it works for me
- Sun Aug 06, 2017 7:24 am
- Forum: General
- Topic: Question from a newbie
- Replies: 6
- Views: 5933
Re: Question from a newbie
Your problem is unrelated to chicken.jpg. Look closely at how you spelled "imange"
- Sat Aug 05, 2017 11:46 pm
- Forum: Support and Development
- Topic: Need Help for Collision
- Replies: 7
- Views: 4102
Re: Need Help for Collision
Hi, I'm not really sure exactly what you mean by "the older wall Ive added will be just a wall with no functions." That being said, I'm assuming what you're going for is to keep the player from going through the wall on the right side. If that is the case, you're very close. The problem is...
- Sat Aug 05, 2017 11:31 pm
- Forum: Support and Development
- Topic: function with multiple default arguments
- Replies: 4
- Views: 4645
Re: function with multiple default arguments
In this case, nil would be preferred over false because nil represents the absence of a variable, while false could be an argument.