Where To Go From Here?
This Sprite Kit tutorial covered a lot of different topics including particles, texture atlas', and sound effects. I hope this tutorial inspired you to make the next great game using Sprite Kit.
Some other things to try...
- Why are the asteroids still hitting us while in the game over screen? [spoiler title="Why?"]The asteroids are still being checked against the ship position because the update method is still getting called in the game over screen. To fix this you put a check in the
update
method to see if the _gameOver variable is not set. The downloadable version has this code in place so look at the if (!_gameOver) {
block in the update
method.[/spoiler]
- Suppose you wanted to make the game harder by adding more asteroids?
- Suppose you made the asteroids faster?
- Add a score line that keeps track of the asteroids killed.
Here is the SpaceShooter project with all of the code from the above tutorial.
And that concludes the How To Make A Space Shooter iPhone Game tutorial! If you want to learn more about Sprite Kit, take a look at iOS Games by Tutorials on this site.
Please join in the forum discussion below if you have any questions or comments!