Game Development Reference
In-Depth Information
Texturing our buildings with sprites
So in the test version we just coded, our game screen was divided into tiles of 128 pixels in
the iPad retina screen. The width and height properties of the Block objects are based on
this measurement. So a building two tiles wide and three tiles tall would have, in effect,
256 pixels in width and 384 pixels in height. A gap too would be measured this way,
though its height is set to 0 .
The logic we use to texture the buildings will take these tiles into account.
So let's take a look at the code to add texture to our buildings.
Search WWH ::




Custom Search