Worm | Adding some snap.
The core mechanics of the game are now complete, but we can extend the development to embed what we have learned and create a better game. These extensions are presented in three levels of increasing difficulty we call, 'snap', 'crackle' and 'pop'. You are now on your own, but challenge yourself to see how far you can get using the stages in the tutorials for reference and other online sources.
- Add additional key bindings so that you can press 1 on the keyboard to start a 1 player game and 2 to start a two player game as an alternative to pressing the 1up and 2up buttons on the title screen.
You learned about key bindings in the Pong tutorial, stage 4. You need to add the code for these to the 'title.gui_script' file. - When food is eaten in addition to spawning a new apple, there is a 1 in 6 chance of randomly dropping tile 78 onto the field. When a player collects it they increase their speed by 1. Make sure the power-up can only spawn on a grass tile.
You learned about spawning items, collision detection with tiles and changing the worm in stage 5.
You learned about random numbers in the Pong tutorial, stage 5c.
Remember you will need to make changes to both worm scripts otherwise only one player can benefit from the power-up!
- When food is eaten in addition to spawning a new apple, there is a 1 in 6 chance of randomly dropping tile 77 onto the field. When a player collects it they decrease their speed by 2 to a minimum of 0. Make sure the power-up can only spawn on a grass tile.
Now progress to the next set of challenges. Stage 10 >