HTML and CSS Reference
In-Depth Information
this.isAddingBuilding = false;
this.selection.visible = false;
9. To test the building funcion, we will temporarily adjust the default energies
to a higher value. Change the following code in the game.js file:
game.energies = 99999;
Objective complete - mini debriefing
There are two coordinate systems in the game: the original screen coordinate and the grid
coordinate on the board.
By having a 2D array that stores the building reference, we can easily access the building
by rows and columns. We can also easily determine whether a given row and col is empty
or not.
There are several types of buildings available, as menioned:
F Space junk has no special features. It's only use will be to block the enemies from
F The satellite is very important because it generates energy bubbles that the player
needs to collect. Players can create more buildings only by collecing these bubbles.
F The castle shoots bullets to atack the enemies. That's our key atacking unit.
You will find that we have a nice balance of building types. We have the space junk, which is
the defense unit. We also have the economy unit and the atacking unit.
During the game, players need to plan their strategies on seing the order of the buildings
in order to win the game. They also need to decide how many units they need to build for
each type of building to maintain the balance between the economy and atack mechanisms.
There aren't enough resources to build whatever they want because the enemies will reach
very soon.
Classified intel
The mouse's interacion is similar to the techniques we used in the last project. The diference
is that in the last project, we converted the screen coordinates into 2.5D isometric coordinates.
In this project, the target conversion is sill a 2D grid coordinate system.
Search WWH ::

Custom Search