Hey, im currently trying to make a server console with love, but my problem is that while im moving the window the "game" freezes and wont receive any client messages until I let the window go.
Is there a way to keep running code even while Im moving the window? Couldnt find any solution on google/wiki
Game frozen while moving window?
Re: Game frozen while moving window?
I'm not sure what your code is doing, but this extremely simple example shows that the game should keep running (both drawing and updating) while the window is in motion:
Care to share your runnable code?
Code: Select all
local t = 0
function love.update(dt)
t = t + dt
print(t)
end
function love.draw()
love.graphics.print(t)
end
LÖVE-Nuklear - a lightweight immediate mode GUI for LÖVE games
Re: Game frozen while moving window?
I believe that's OS-dependent.
Re: Game frozen while moving window?
Absolutely correct. Works on Linux, doesn't work on Windows.
On the plus side, it looks like the updating is happening... just the drawing is delayed.
LÖVE-Nuklear - a lightweight immediate mode GUI for LÖVE games
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Game frozen while moving window?
I think that the whole main thread gets blocked, meaning unless you do all your logic in a different thread, even that will be blocked.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: Game frozen while moving window?
Sadly update isnt working while moving the window either. Just looks like it is since youre adding deltaTime after you let go
Will try doing that, thank you =)
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Game frozen while moving window?
You're welcome, but a few things:
- (Rendering) Graphics only work on the main thread,
- the love.event.pump method also only works on the main thread (called automatically by love.run)
In short, this means:
- Inputs won't get registered while you're dragging the window even if you moved all event processing to another thread, since pump needs to be on the main one.
- Nor will anything be painted onto the window itself for the first reason.
Now, you can still calculate tons of stuff which won't be blocked indeed, but... without input or visual feedback, it might be worse to implement that than have everything pause for the duration of the drag.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Who is online
Users browsing this forum: No registered users and 5 guests