- studiosrookery
- Apr 9
Apartment 20 is a puzzle platformer, so the movement requires careful programming for intuitive play. The player is able to move their player character, Ace, with the arrow keys or the more standard WASD keys for forward, backward, left, and right movement or use. Automatic Jumping helps to make movement more fluid and the grappling hook is used to make platforming more interesting.
Auto jumping is done through what is known as a ray cast, which is something that helps detect collisions between objects. The character has ray casts in their chest and on their head. If the ray cast on the characters chest is colliding but the one on their head is not, then the player will automatically jump over the object.

The grappling hook was one of my most challenging tasks to this date as it dealt with aiming, player rotation, angles, prediction lines, and more. On the surface it may not sound like too much of an issue for things like player rotation however when it the player was no longer aiming the players rotation would not update and the player would try to move “like normal” with the “new rotation” due to aiming. When it came to the grappling hook itself, there were some issues that needed to be solved. Instead of a standard straight line for a standard grappling hook we decided to have it emulate a fishing rod and made the fishing rod connected to Captain Herman, the second character players will interact with in Apartment 20.

The grappling hook initially could connect with anything and pull the character anywhere, but this was later changed to only certain key spots. Simply changing what layer the grapple hook could latch onto was the solution to this problem. Unfortunately, it took a bit of time to figure that out.
Madison M, Apartment 20 Gameplay Programmer