Teasing out an MVC

Brackeen’s KeyTest.java gives a taste of having a faux model: a LinkedList to hold messages when keys are pressed or released. The inheriting subclass from GameCore consults the list in draw(), which is called in GameCore’s gameLoop() when KeyTest is instantiated and run() in main.

ScreenManager as the view is updated in the game loop away from the KeyTest subclass.

This is all hunky-dory until a couple chapters later, when we hunker down and combine these concepts to make a 2d game. Brackeen refactors his code to several managing classes, so that’s still my TODO.

I really hope OpenBSD 5.4 running on a old laptop can run the game in fullscreen flawlessly. I am worried about ThreadPool; maybe I will have to tune it. The original .jar dropped frames and the music stopped midway. It also didn’t run full screen, so maybe the window compositing contributed to performance issues.