Search found 14 matches
- Wed Apr 15, 2020 9:03 am
- Forum: General
- Topic: Problems with a simple loop
- Replies: 12
- Views: 7350
Re: Problems with a simple loop
Events are not multi-tasking, therefore if execution enters an event, no other event will execute until it finishes; that's why the OP's code gets stuck in an infinite loop. What you do instead is do one step and then return and wait for the next frame to do the next step. Remember that Löve will e...
- Tue Apr 14, 2020 7:02 pm
- Forum: General
- Topic: Problems with a simple loop
- Replies: 12
- Views: 7350
Re: Problems with a simple loop
Hi, thank you for your reply. I understand the first bit, but I'm a little unsure about the second. So I changed the while statement to an if statement and moved it into the update function as such: TEXT_SPEED = 1 function render() love.graphics.print("GAMEOVER", middleOfXAxis, y) dy = TEX...
- Tue Apr 14, 2020 2:52 pm
- Forum: General
- Topic: Problems with a simple loop
- Replies: 12
- Views: 7350
Re: Problems with a simple loop
Thank you very much. I understand, but if it's not in a loop it doesn't iterate back over the if-statement, does it?
EDIT: While glancing i realized that surely y should change in the update function?
EDIT: While glancing i realized that surely y should change in the update function?
- Tue Apr 14, 2020 12:20 pm
- Forum: General
- Topic: Problems with a simple loop
- Replies: 12
- Views: 7350
Problems with a simple loop
Hello people! This will be my first time posting on this forum, so if I've missed anything just let me know. I am very new to LÖVE and lua, but I'm getting the grasp of it pretty quickly. I am trying to print a 'GAME OVER' text that comes in from the top of the screen and then stops at the middle of...