Problem with love.mousepressed/released and bordered window

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
Bayrock
Prole
Posts: 9
Joined: Wed Jul 16, 2014 1:46 pm

Problem with love.mousepressed/released and bordered window

Post by Bayrock »

*snipped*
Last edited by Bayrock on Fri Jan 30, 2015 3:52 am, edited 2 times in total.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

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

Post 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.
User avatar
Bayrock
Prole
Posts: 9
Joined: Wed Jul 16, 2014 1:46 pm

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

Post 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!
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

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

Post by Ranguna259 »

Your little program is really cool, keep it up :P
Attachments
game.png
game.png (8.11 KiB) Viewed 3162 times
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
User avatar
Bayrock
Prole
Posts: 9
Joined: Wed Jul 16, 2014 1:46 pm

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

Post 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.
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

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

Post by Ranguna259 »

No need for PMs, I'll patiently wait for a thread of your game :megagrin:
Best of luck.
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 10 guests