What Modules Use the Static HUD?
HUD – Main Setup
Tiles
Hud Assets
HUD Elements
HUD stands for Heads Up Display. It’s the area of the game screen where important information is displayed, like for example score, lives, power ups, health, magic meter, ammo and so on. This can differ from game to game, and some games doesn’t even have a HUD.
In NESmaker we can have two different HUDs. The first one is called a static HUD and is what we will talk about in this section. Many games, like for example Castlevania and The Legend of Zelda use a static HUD. The other one is called The Sprite HUD, which is covered in another section. The difference between these two is that the static HUD is displayed with tiles from the HUD tileset in a static area (where you placed the HUD), while the sprite HUD is made up of sprite tiles from the GameObjectTiles.bmp file. These sprite tiles “float” on top of the background. In previous versions of NESmaker you could use the static HUD in scrolling games, but in NESmaker 4.5.9 all scrolling modules use the Sprite HUD.
To access the HUD and textbox setup you must click HUD & Boxes in the Context Menu on the left in NESmaker.
What Modules Use the Static HUD?
The following NESmaker modules use the static HUD:
- Adventure
- Arcade Platformer
- Maze
HUD – Main Setup
HUD is the first tab in the HUD & Boxes section of NESmaker. Your main goal here is to set up areas on the screen for HUD, Playable Area and Textbox area. In simple terms that just means where we want the different things to appear on the screen. By default NESmaker has set up both a HUD area and a Playable area. Usually this works fine for most games. If your game is going to use textboxes however, then you must select an area where you want your textbox to appear on the screen. Here it is very important that you check the checkbox for show 32×32 grid. The reason for that is that NESmaker is set up (when dealing with textboxes) to color only 32 x 32 pixel grids. This is done to use less storage space on the cartridge. If you set up a textbox outside a 32×32 grid, then you will get strange and unexpected colors in the textboxes when playing the game.
To set or change areas for the different “boxes”, just hold down the left mouse button and drag an area across the screen. Let go of the mouse button when you are satisfied with the size and placement of the “box”. Then you click the Set button for whatever area you are setting up. For example if you are setting up a textbox you click the Set button below where it says Textbox area.
You can ignore the area on the top. This is mostly a leftover from the previous version of NESmaker. In order to use this area in NESmaker 4.5.9 you have to do some setup in code, and it is not recommended for first time users. Monster Spawn Area and Other Area can also be ignored.
Tiles
This section shows all the tiles from the HUD tileset. The graphics you see here, is whatever you have saved in the Hud.bmp file for your project. If this is blank (black), then you must either draw your own tileset with a font and symbols, or you can use the one provided with NESmaker. In order to do that you must go to the Pixel Editor. Click the Open (Load BMP File) button. The provided Hud.bmp file you need to use is stored in the main GraphicAssets folder (not the graphics folder for your game).
Select and open this file. Then use the Save As button to replace your blank (black) Hud.bmp file. It’s important that you use the Save As button, and not the normal Save button, because that will just save any changes made to the provided Hud.bmp file.
You can do some edits here in the Tiles section to change what tiles should be used for what text characters, but unless you are very familiar with how NESmaker works it’s best to leave this setup as default.
Hud Assets
Here you can set up static assets for the HUD. So for example if you want an image of a sword to be displayed in the HUD (like in the example above), then click Add to create a new asset. Give it a descriptive name and set the size. The HUD uses 8×8 pixel tiles, so Width 1 and Height 1 is a perfect size for a single tile from the HUD tileset. You can make bigger assets, but remember to not make it larger than the size of the HUD itself.
HUD Elements
This is where you construct the HUD itself. Here you need to place whatever elements you want in your HUD at specified positions. You can have four different types of elements in your HUD:
- Var Tiles: This is a way to display a value from a variable using tiles from the HUD tileset. This is perfect for displaying a health bar. You need to specify four things: the variable name, the maximum value of this element (8 is max), what graphic to use for a full tile and what graphic to use for an empty tile.
- Hud Asset: This will display an asset you made in the Assets tab. Select the appropriate asset from the list.
- Text: This will simply display text in the HUD. you write whatever text you want in the text field labeled String.
- Number: This will display a number based on a special variable. If you for example need to display a score with 8 digits, then you need a Zero Page RAM variable with 8 bytes.