Skip to main content

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

Problems with Level Transition Code

Author: Caleb Hendrickson

I hit a roadblock when it came to level transitioning and part of the problem was mental of trying to map out the way I wanted it to work. The lack of good level transition code would prevent multiple levels, and the frame rate would take a hit without a good base for the level code. I had some transition code for the demo level from the main menu but no system for the player to go from level to level on their own by activating a button.

The implementation I went for was an actor that had a sphere radius attached to it so when the player would enter it a prompt is put on their screen that shows the button that needs pressed to transition to the next level. I had to give the user widget instances to the code game instance and the class type as well so I can prompt the user when in the radius without having everything know about each other.  Having the Actor set up this way allows my other team members to use it and simply give it the level name, and it will work as is speeding up the level building process. The levels we are going for are similar to slay the spire where you pick the path and so having the player be able to select the levels by walking to them and pressing a button gives our own twist to the level selection. 


Code Snippets:






Video Example of Transition Actor:


Support this post

Did you like this post? Tell us

Leave a comment

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