Page 1 of 1

Problem with love.mousepressed/released and bordered window

Posted: Wed Jul 16, 2014 2:50 pm
by Bayrock
*snipped*

Re: Problem with love.mousepressed/released and bordered win

Posted: Wed Jul 16, 2014 7:35 pm
by bartbes
Yeah, this is an annoying one. Windows is acting weird, and whenever you drag a window, it pauses the gui thread, which happens to be the main thread of your game. This means that when you're done dragging, the delay between the frames (and therefore 'dt') is huge, probably causing the spike in score you're witnessing. Unfortunately there's no real solution for this, except for limiting the dt value used if it's extremely large.

Re: Problem with love.mousepressed/released and bordered win

Posted: Wed Jul 16, 2014 9:00 pm
by Bayrock
bartbes wrote:Yeah, this is an annoying one. Windows is acting weird, and whenever you drag a window, it pauses the gui thread, which happens to be the main thread of your game. This means that when you're done dragging, the delay between the frames (and therefore 'dt') is huge, probably causing the spike in score you're witnessing. Unfortunately there's no real solution for this, except for limiting the dt value used if it's extremely large.
Hm, well regardless of whether there's no solution at least you've provided me some insight into this so I didn't just feel like I was overlooking something obvious.

Maybe another user will have some sort of cheap fix for this. I may try limiting dt as you've mentioned or removing it from the equation altogether to see if that fixes it, or I'll just be forced to use t.window.borderless = true. Otherwise I suppose I could look into implementing the application into a web page if the window is going to be static anyways.

Thanks for the reply!

Re: Problem with love.mousepressed/released and bordered win

Posted: Wed Jul 16, 2014 9:32 pm
by Ranguna259
Your little program is really cool, keep it up :P

Re: Problem with love.mousepressed/released and bordered win

Posted: Wed Jul 16, 2014 10:00 pm
by Bayrock
Ranguna259 wrote:Your little program is really cool, keep it up :P
Thank you very much for the encouragement! I'm completely new to this so I'm discovering things constantly along the way and it's actually been really fun to see my concept 'come to life.' Scripting has to be one of the more rewarding pass times I've engaged in recently.

I've already been working on tweaking the app more and have some bold plans for it as I learn more so if you'd like I'll send you updates via PM or something. It's nothing I plan to commercialize obviously but it will serve as a stepping stone for me and I can always elaborate on the concept. I didn't really originally plan to post it to the LOVE forums, but if it progresses maybe I'll create some sort of thread for its updates for fun.

I'm going to be looking into the window problem shortly and if I don't find a solution I'll simply remove the border or better yet attempt to make it web based.

Re: Problem with love.mousepressed/released and bordered win

Posted: Wed Jul 16, 2014 11:25 pm
by Ranguna259
No need for PMs, I'll patiently wait for a thread of your game :megagrin:
Best of luck.