Assignment #6 Description

At this point your game should be fairly close to playable. You should have in most of the logic for controlling things. For this assignment we will turn to making it look nicer and having a GUI that gives the player more information and you more flexibility. You will do this by having your Player return a functional status panel and having one of your entities or blocks return a functional edit properties panel.

Design

The design for this assignment will include UML class diagrams for the classes that you will write. It should also include text descriptions of your implementation of the GUIs that you create. It will also include all of the classes that you wrote for the earlier assignments.

Remember that the design should put in comments for every class and method that tell two things. It needs to specify how the classes fit into the game play as well as give some implication as to what the methods are going to do to make that a reality. For a GUI this needs to include some information about what the components will be and how they are going to be laid out in your panels. You can also talk about the functionality of those components and how they will be updated as things change in the game.

Again I recommend that this be submitted by putting the files generated in Together in a new directory that will be visible on the web and send me a link.

Code

Basically this assignment is about having you write GUIs. The most important part of it is for you to write code that creates a game status panel for your player to return. This panel should display relevant information about the game in some reasonably appealing format. It will be drawn below the normal play area. In addition to writing code that builds the component, you also need to write code that will update the panel depending on what happens in the game. So if you display a score, it needs to be changed when the player does something that increases the score. The same is true for any other pieces of information that you display that are altered during the course of the game.

In addition to the game status panel, you should add an edit properties panel to either an entity, screen, or block. This panel will give you the ability to alter properties of that object in the ScreenEditor. Sometimes you want to have objects that are similar in most respects but different in some minor way that affects appearance or behavior, e.g., in the game I showed you at the beginning of the semester, there were keys of different colors. It makes sense to represent these objects as instances of the same class with a property (color in the case of the keys) that can be different for different instances.

To help you debug, you should put a main method in those classes that brings up a JFrame that has just the panel you are working on added into it. Once you have make sure that this looks right then you can run it in the game or the screen editor to make sure that it looks right in that situation.

If you haven't been using the API at the Sun website, this is when you will need to start doing that. The GUI libraries are quite extensive. We haven't had enough time in class to cover even a small fraction of what is in them, and even if we did, you wouldn't be able to store it all in your head. Use that resource and the tutorials to which it points to help in figuring out what you can do and how to do it.