A simple Game! – Part 4

In this part , we update our ship’s initialization to return to a static point after motion as well as add our planet which appears at a random position when the game starts.

First, return our spaceship to it’s starting position:

Next, Add the planet sprite:

And now we set up the initialization to choose a random starting position:

(ENSURE THAT WE ADD THE CODE BLOCK TO THE PLANET’S SPRITE!!!)

In the next part, we’ll update the score on a collision , and reset the score to 0 when a miss occurs.

Next: A Simple Game! – Part 5

© 2019  Vedesh Kungebeharry. All rights reserved.  

One thought on “A simple Game! – Part 4

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s