Game Development Reference
In-Depth Information
Preparing Canyon Bunny for raining carrots
What, raining carrots? Absolutely! We are going to add two new game objects to
Canyon Bunny. One will act as the end point or goal of a level, while the other is a
regular carrot that we will use later in our physics simulation. To be able to place the
goal game object in our level, we will also have to make some minor changes to the
level image and level loader.
So, a screenshot to give you a better impression of what we are aiming for, while we
are working on it step by step, is as follows:
In the preceding screenshot, you can see the running physics simulation of raining
carrots, which is kicked off as soon as the player character passes the goal (golden
carrot statue). Lots of carrots will fall down from the sky, nicely bounce off the
ground, and eventually pile up on each other.
Adding the new assets
Firstly, copy the two new images carrot.png and goal.png to CanyonBunny-
desktop/assets-raw/images/ . Also, do not forget to rebuild your texture atlas.
After this, let's add them to our global assets class for easier access.
 
Search WWH ::




Custom Search