Workshop › Wolfenstein-style 3D Maze › Step 18 of 18

Build it yourself: run

What we are doing

Now it's your turn, without code to copy: while Shift is held, the player walks twice as fast.

Your turn

Change the code so that holding Shift doubles the walking speed, forwards and backwards.

Skills: Keyboard and mouse input

All steps

  1. The map
  2. The player
  3. Ceiling, floor and a loop
  4. Turn around
  5. Walk
  6. Is it a wall?
  7. Stop at walls, slide along them
  8. A ray: where it starts
  9. A ray: the grid lines
  10. A ray: walk to the wall
  11. The 3D view
  12. No fish-eye
  13. Light and shade
  14. A timer
  15. Escape!
  16. Best time
  17. Touch controls
  18. Build it yourself: run