— Sloth Boss
Your job? Write detailed pseudocode that fulfills and supports a mechanic for a 2D platformer similar to Super Mario Bros.
The mechanic is “wall hanging”. With this mechanic, the player should be able to press and hold a button while midair and temporarily hang onto a wall, if it exists in the background behind them.Submit your final work as text or a PDF file.
isHanging flag set)isHanging, wallDetected, hangTimer.if, else, while, etc.# check for wall, # pause gravity while hanging, etc.Edit the following template for your pseudocode:
// Beginning of player_character script
Define the player character class {
// define variables
On Begin Play Function { // runs when the game starts
}
Every Tick Function { // runs every new frame
}
}
isAirborne, isHanging, hangTimer; reset them cleanly.