Sturdy Engine – Unity #1GAM Helper
After the release of the Red Forest prototype, I realised I was spending FAR too long creating menus and UIs and not enough time on the games, so I decided to create a helper package to ease the process.
I began to strip Red Forest down. I removed the game, I moved all required assets into a new “_SturdyEngine” folder and organised all default materials and files there.
After a few hours I was left with a Splash Screen, a screen fader, a menu, a pause menu, a confirmation dialog, and an AppManager scene that contains the backbone of any multi-level game.
AppManager is the core of any apps that use it, but it does not require that you write your game with it in mind; It is designed that when ready, you import this package, tell it the name of your gameplay scene and then apply one line of code when your game is finished. How does it work?
AppManager.FadeIn(); -Sades the screen in.
AppManager.FadeOut(); -Fades the screen out.
AppManager.OnPause(); – Sets timescale to almost absolute zero, resulting in an immediate pause. The screen fader and everything that needs to circumvent this uses a new Timer library that ignores time scale.
AppManager.OnQuit(); – Exits the game- if the user correctly navigates the confirmation dialogue.
AppManager.ReturnToMainMenu(); – Does what it says on the tin- Fades out, then returns to the menu, then fades back in.
AppManager.StartGame(); – Starts a new game. Loads the scene listed at the top of the source file labeled as “Start scene” – This could be your customisation screen, character select, level select, or just the game.
AppManager.GameOver(); – Fades out, Loads the scene labeled “Game Over”, Fades in. the Game Over scene needs to call AppManager.ReturnToMainMenu(); – Done this way for flexibility.
The rest is automatic! Obviously you need to change the text in the Main Menu scene to match the project you’re working on, but it’s already hooked up to AppManager and just works.
The result? Well, once done, I exported a Unity Package, imported it to Gravity Ed, set the start level and game over scene and boom- Gravity Ed was a fully featured prototype with menu, pause button and quit.
What’s next? Well, I’d like there to be a ControllerManager that wraps Unity Input, but can seamlessly get its inputs from on-screen d-pad/buttons. This will require effort to port games to, but if done right, a few search&replaces should do the trick.