Screen Editor Help

To help make it easier for you to make an interesting game, I put together a little tool that allows you to build the screens graphically. It uses your screen class as well as the classes that your screen class uses in order to do this so your classes have to be fairly complete for it to work. I also don't recommend that you put significant time into building a large maze until you have completely debugged those classes and you are fairly certain that they won't be changing because changing them can invalidate the saved file. See the description of assignment #2 for more on this.

It should also be noted that as of my writing of this, the editor is certainly not at the point of a commercial product. It is a bit rough, but when you do get to the point of making large mazes, it will be much more efficient than hand coding them.


The screen editor is layed out in four main regions. At the far left are two vertical strips of icons. These show you the blocks and entities that your screen class says it uses. You can click on any of these to select it so that when you "draw" that is what you will be drawing with.

The middle two regions show you screens. At first these are constructed using the default constructor of your class. Make sure that it fills in all the blocks with some default value because null values will make certain events in the editor unhappy. There are three main ways to interact with these areas. Left clicking on them draws. A simple left click places the entity or block that is selected. Clicking and dragging with the leftt button will draw a box. If a block type is selected then every block on the screen that is at least partially under than box will be filled with that block type. Nothing happens currently if an entity type is selected. Right clicks don't draw, they "select". When you right click the editor looks first for an entity at the location of the click. If one is found then it is selected. I can then be moved to a new location by pressing down on the right mouse button again and dragging. If there is not an entity present, then a small box will highlight the block that your mouse is over. Below the editor area some text shows if this block links to any other blocks or not.

The third way of intereacting with the screen displays is via the "Edit Left" and "Edit Right" menus. These have the following options in them: New Link, Remove Link, Screen Properties, Block Properties, Entity Properties, Remove Entity. Selecting New Link will place a link from the selected block on the chosen side over to the selected block on the other side. So if you choose New Link under the Edit Left menu it will try to make a link from the left to the right. A message will be displayed if the block type doesn't support links. If you want a bi-directional link just select the New Link option from both menus without moving the block selectors. The second option is Remove Link which simply removes the selected link from the selected block on the given side, regardless of where it had linked to.

The three selections after that bring up windows where you can adjust the properties of the screen, selected block, or selected entity. This uses the getEditProperties() method of those classes. If you haven't written on then they do nothing. This is how you will be able to get screens, blocks, and entities to have settings other than those provided by default. The last option from each menu will remove the selected entity, assuming that one has been selected. If none has been selected then a message tells you this.

The far right section of the editor window displays a "graph" of the screens that you have created. Each screen is represented by a circle. The circle that you are closest to is highlighted yellow. The one showing on the left editor region is green and the one on the right is blue. Clicking and dragging will move the circle that you are closest to. A simple left click without dragging sets that circle to be on the left side and a right click without dragging sets it to be on the right. To create a new screen use them "New Screen" option under the file menu. The new screen will start in the top corner and you can drag it to a more appropriate location. This display also shows when there are links between screens. It is not a perfect representation, but it will be fairly close. This is mainly to help you keep track of which circles represent which screens.