Hey everyone,
I’m working on a space strategy game that will be run using a rather simple game loop (or, you could say, an extremely primitive game “engine”). This game loop will involve multiple screens. When the program begins, an Introductory Screen will be displayed with the following options: New Game, Continue Game, Load Game, and Exit. The Introductory Screen will be an instance of a class that extends JPanel. For right now, only New Game and Exit will work. Upon pressing the New Game button, I want the Introductory Screen object to disappear (i.e. have its memory resources freed up) and a New Game Screen to appear (i.e. an object of the appropriate class be created). This screen will contain options for the new game (such as number of stars, number of players, etc.). There will also be a Begin Game button that will dispose of the New Game Screen object, and generate the game universe desired by the user. I’m hoping to do all of this from a main game class. So my question is, given what I have described above, what would be the best way to implement it in Java? I’m mainly talking about handling the screen object creation/destruction. If I have been too vague in this post, please let me know and I will try to be more specific
Thanks,
Rob