— Sloth Boss
Come really close to coding a game by planning a mechanic via pseudocode! It's like coding but SO much easier!
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.Heads up: Once you submit, you can’t edit your entry until it’s been scored.