ivanperez-keera / SpaceInvaders

A Haskell game written in Yampa
BSD 3-Clause "New" or "Revised" License
26 stars 16 forks source link

does only redraw on mouse and key events - but not while idling #26

Closed jwaldmann closed 3 years ago

jwaldmann commented 6 years ago

When I run the game, the display only gets updated when something happens (mouse moved or pressed, key pressed). I expect that updates (redraw of moving bullets) should also happen while there is no input event.

(SpaceInvaders-0.4.5 (current master from git), X11-1.8, Yampa-0.10.6.2, HGL-3.2.3.1, ghc-8.2.1, fedora 26)

g-pechorin commented 6 years ago

Was this fixed? I seem to be having the same problems

ivanperez-keera commented 6 years ago

I cannot reproduce this: it runs fine on my machine (Ubuntu, ghc 7.10, but the GHC version should not matter).

You may want to take a look at: https://github.com/ivanperez-keera/SpaceInvaders/blob/develop/src/Animate.hs#L118-L216, and see in which operation you are getting blocked, and if you are getting any events at all. "Following" the execution by inserting putStrLn in different places might help you locate where the program is stuck.

chriz-zeller commented 6 years ago

@jwaldmann and @g-pechorin do you use macOS? I wonder whether there is a connection to this issue: https://github.com/ivanperez-keera/haskanoid/issues/71 (former: https://github.com/ivanperez-keera/haskanoid/issues/68)

g-pechorin commented 6 years ago

Checking it is on my "TODO" list, but, passing my annual review is at the head :)

ivanperez-keera commented 3 years ago

@g-pechorin @jwaldmann I think #33 was a duplicate of this bug and it's now solved. Please check.

ivanperez-keera commented 3 years ago

I'm fairly confident that that was the reason, so I'm going to go ahead and close this issue. If the problem persists, please re-open it.