Rough Inventory Menu Design

Based on the designs I’ve been looking at from previous games, here’s my template design for the Hanami Inventory menu:

The window design has been greatly inspired by the simple blue menu windows in Final Fantasy Tactics Advance. I’ve emphasised titles by giving them a strong background rather than using bold text. At the moment, the type face is an image which I have drawn. I’m currently using DejaVu Sans in all my development work and for the text in my HUD, but I might change this later. The typography here has been custom made to fit best into the space, so I feel that it’s the best option.

The Petal progress diagram is very rough and unfinished. This is for a feature that I haven’t implemented yet, where collecting five petals in each level will result in the collection of one full flower. This information is displayed entirely visually, like the Triforce diagram in The Legend of Zelda or the Orb collection diagram in Final Fantasy. I’ve taken a lot of layout ideas from the original Final Fantasy menu system. The only interactive parts of the menu are on the left hand side, while the right hand side contains information about items and the character. However, instead of linking to pages of lists of items, I’ve used a more visual approach similar to the one used in Harvest Moon More Friends of Mineral Town. The player can scroll through each collected item in the three available slots and see information about each on the right hand side, where there is a designated blank space for written information.

The health diagram in the right-hand column is similar to the health bar in the HUD, so that player can see which stats it correlates to. This is currently fully interactive, so when the player eats a sushi item one coin is restored to its slot.

In Game Maker, information on each item in the inventory is stored in a 2D array. This stores information about the name, description and start amount of each item (in that order!)

I have a script called itemAdd which is called every time a piece of sushi is acquired. This tells the engine to draw the correct sprite into the menu when the “S” key is pressed on the menu, ie

if global.inventory[0,2] > 0
//here, [0,2] refers to that specific information in the array

Another draw code tells the engine to draw the strings of text for name and description in its designated place on the screen. This is a general code where the figure indexing each individual item is replaced by “s”, meaning this one code will cover all instances where “s” is a figure.

The left and right keys are programmed to direct a “highlight” sprite above each slot in the inventory in order to select an item. This is simply achieved by programming an X and Y coordinate for each time the button is pressed. When an item is selected using the “X” button, this code controls the processes of restoring 1 point of health and removing the item from the menu.

To make sure the player cannot restore more than 5 points of health, I’ve programmed all figures above 5 to equal 5.

Lastly, I have a code which pauses the game by disabling all other objects and drawing a static background based on the objects on screen when the inventory was opened. This is based on a process I used for a pause menu in my last project, where I create a state called pauseon which is true when the menu is open and false when the menu is closed and the game is running.


You can see the new system work in my latest Devlog Video here!

Devlog Video 2

This video pretty much sums up what I’ve been doing for the past few days, mainly with the background graphics and building interiors, and a few other graphical elements. From creating and playing back this video, I came up with an extensive to-do list based on bugs, flaws and things that don’t fit well or look right! My aim for this week is to fix everything that needs fixing, while away from the computer I’ve started to design the next level which now needs tracing.

Things To Do:

  • Sort out problems with the lighting (solved)
  • Sort out problems with particles (solved)
  • Delete accidental “invisible platforms” (solved)
  • Reduce the amount of lights inside small buildings (solved)
  • Sort out collision with cave walls problem (solved)
  • Animate some existing assets, like flags and the Maneki Neko
  • Make health restoration item
  • Apply more accurate collision masks to objects
  • Improve environmental tiles
  • Make new sprites for rope bridges, statues, outdoor tables & chairs and Ikebana

The biggest task here was the problem with the lighting system, which occurred when re-entering an already visited room. The code which draws the lights is called every time the room is entered, but because my rooms are persistent (changes to the room remain even if the room is left), the code was only being called when the room was entered for the first time. The result was that lights weren’t being drawn in revisited rooms, but would stay on from the previous room ie. the last place the code was called. I realised this by a long process of trial and error…

The rooms had to be persistent (or so I thought!) to stop the player from being able to collect the same flower twice. In a non-persistent room, the flowers would respawn if the player left and re-entered. There are however a couple of ways to prevent collected items from respawning, without having to create a room which is persistent. I found this post from the Game Maker Community forum to be really helpful. One of the solutions suggested on this thread is to use a datastructure, in this case a list of all items in the level with their own unique ID.

This is a script called gameInit, which is called once when the game starts. Gabriel Verdon uses a similar script for The Archer, to set global variables and position control objects etc. You can see that this script determines the keys used which correlate to the user controls, and generates the player object, HUD objects and the effects control object- all of which are persistent and remain throughout the game once called. At the top of the script, I added a generate list command, which will hold the information of flowers collected throughout the level.

This code is from the create event of the Sakura blossom object. The item is placed onto the list when it is deleted recorded by a unique ID, and this code commands a respawned item to be deleted again if it is on the list.

So now my lights stay on in the rooms they’re supposed to be on in! Most of the other fixes on the list were relatively little, some involved reducing collision masks and the rest involved clearing up some of my human errors. What I really want to see now is finished visuals.