Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Problems With Menu UI

Author: Caleb Hendrickson

I was struggling with getting a good system for my Menu UI going to transition from the main menu to the settings menu and back. There is also a Settings and Pause menu as well that would need tracked between the transitions since you can access settings in the pause or main menu. The level transition and UI is very important for any game and to have a good framework for later to build off of since this one will be a roguelike so how it is set up is crucial. The UI and level transitions took a bit of time to get through as we did not have a gameplay loop fully set up yet so the system, I was attempting to envision was hard to picture.

I ended figuring a way out and that was to have a Enum in the game instance that tracks the current and last UI state so if I go Main Menu -> Settings -> Main Menu or Pause Menu -> Settings -> Pause Menu the instance would know. By doing it the way I did I also lay the groundwork for later for when we have full game UI and level swaps and a world map of sorts similar to Slay the Spire. By making a good system in place like the one I am going for it allows for a higher frame rate and reactivity for the loading of the levels and overall gameplay. The menus in this case are created and destroyed and each pop up of the UI instead of creating them once and just hiding and making them visible when needing them. The approach I went for allows nothing in the background to consume resources since the UI will not be used or visible until you would pause the game and need access to them and in that case some frame drops won't matter on a UI screen since the game will be paused. The UI shown in the video below is just for a placeholder I drew the title with Aseprite in which I do not have much experience but is a good example of what I am going for with the design and layout.

Example code snippet:




UI Example Video:

Support this post

Did you like this post? Tell us

Leave a comment

Log in with your itch.io account to leave a comment.