Open nblumoe opened 8 years ago
Here is the project I am encountering this issue.
adding timer: https://github.com/nblumoe/viking-village-vandalism/blob/7da07fd81c3aa566a799c03b7a6812069529324b//desktop/src-common/viking_village_vandalism/core.clj#L109
(this gets trigger on-show
https://github.com/nblumoe/viking-village-vandalism/blob/7da07fd81c3aa566a799c03b7a6812069529324b//desktop/src-common/viking_village_vandalism/core.clj#L83)
on-timer
handler: https://github.com/nblumoe/viking-village-vandalism/blob/7da07fd81c3aa566a799c03b7a6812069529324b//desktop/src-common/viking_village_vandalism/core.clj#L163
function call to reset the screens: https://github.com/nblumoe/viking-village-vandalism/blob/7da07fd81c3aa566a799c03b7a6812069529324b//desktop/src-common/viking_village_vandalism/core.clj#L265
Yeah there's a pretty long history of timer-related issues in libGDX. The particular issue you mentioned about its behavior when calling set-screen!
is new to me, though. I'll look into it and see if we can do some kind of workaround, but since libGDX is a Java framework I imagine their design doesn't account for calling methods from a REPL =)
Probably you can suggest any workaround? Just hit this issue too.
I hit this problem as well... after I click on the game window the timer stops firing :( I think its probably simplest just not to use the timer and count down from delta times.
Odd behavior with a timer:
(-main)
)So I guess the timer is on hold when the window is not focused (guess one can hook into that via
on-pause
andon-resume
). I do not necessarily consider this an issue so far. Maybe a bit weird, that the timer stops, buton-render
keeps going...Here is the real issue, continuing after step 6. from above:
(play-clj/on-gl (play-clj/set-screen! viking-village-vandalism-game main-screen ui-screen))
So, this really seems to be broken somehow. I am running this on Fedora 23,
play-clj "1.0.0"
.