HTML and CSS Reference
In-Depth Information
Objective complete - mini debriefing
We have made a live economy with the generaion and consumpion of resources.
We looped all the buildings in the list. For each building, we calculated the power and
populaion. For each coins generator, we decreased the duraion of new coins generaion.
For each merchant, we try to trade coins for diamonds.
Instead of increasing the diamond count directly, we invoke the UI layer so that a diamond
pops up. It is up to the UI layer to define how a diamond should be collected. In this task,
we simply increase the count. In the next task, we will edit this funcion so that a diamond
sprite pops up on the screen for the player to click on and collect.
Classified intel
It is quite common to have two currencies in this type of game. Coins, which are used in this
game, are used in most cases to buy new buildings, pay for upgrades, or expand the city. The
rare currency in this game, diamond, is used for premium features. For example, we may
charge a diamond to inish the building instantly without the construcion ime. The rare
resources should not be easy to obtain. In addiion, we may even charge the player
real money for the rare resources. That's how a freemium model works in app stores.
Collecting pop-up diamonds
In this task, we make the diamonds pop up from merchant buildings to let the player click on
the diamonds and collect them in order to increase the diamond count.
Prepare for lift off
Before geing started with the steps of this task, we want to ensure that we have the
following diamond sprite graphic files prepared and placed in the images folder:
 
Search WWH ::




Custom Search