Rihpsalis / GhostGame

0 stars 0 forks source link

Problem with Program shutting down #2

Closed Rihpsalis closed 1 year ago

Rihpsalis commented 1 year ago

This is my main problem. When i start the program every thing goes as normal except my other mentioned problem #1 . But at some point after 10-30 seconds (This is not always the same) the Canvas doesn´t update anymore. The render Methods of

Player.java
Gridmap.java

are still called and work but the Canvas just stops working. This is also only happening with my biggest Gridmap (52x29 Sprites that are each scaled to 200x200 so ~2560x1440)

armin-reichert commented 1 year ago

That might be caused by using a separate thread instead of attaching to the JavaFX application thread (see my question about the GameTimer class). If you want to shutdown JavaFX when closing your main window you can add a window close handler which calls Platform.exit().