pause key function

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
jimflim
Prole
Posts: 4
Joined: Tue Apr 03, 2012 3:01 pm

pause key function

Post by jimflim »

Hi,
I have an issue with the keypressed function and would like to understand how exactly it works.
My problem is simple:
As the program takes a few milliseconds to calculate changes in the level, my player keeps on progressing as I hold a key down - which is an issue since I need to track his motion.
How can I pause or interrupt keyboard reading while updating the level?
I've used no coroutines or such in my prog, so that can't be it...
Thanks for your help,
jimflim
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: pause key function

Post by Davidobot »

jimflim wrote:Hi,
I have an issue with the keypressed function and would like to understand how exactly it works.
My problem is simple:
As the program takes a few milliseconds to calculate changes in the level, my player keeps on progressing as I hold a key down - which is an issue since I need to track his motion.
How can I pause or interrupt keyboard reading while updating the level?
I've used no coroutines or such in my prog, so that can't be it...
Thanks for your help,
jimflim
Can you please upload the .love so we can see what you mean? ;)
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
User avatar
jimflim
Prole
Posts: 4
Joined: Tue Apr 03, 2012 3:01 pm

Re: pause key function

Post by jimflim »

didn't want to cross-post, but here it is:

download/file.php?id=4321

when you close an area and keep a key down, you'll have a trace beginning in the middle - causing a crash -_-
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: pause key function

Post by Davidobot »

jimflim wrote:didn't want to cross-post, but here it is:

download/file.php?id=4321

when you close an area and keep a key down, you'll have a trace beginning in the middle - causing a crash -_-
I was able to reproduce the crash but looking through the code I can't seem to find the cause. :(
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
Post Reply

Who is online

Users browsing this forum: Google [Bot], KayleMaster and 59 guests