Game Development Reference
In-Depth Information
.addGameActorNodes() method as far as Actor z-index goes, we can optimize game
visual elements using the same compositing engine we have developed for characters
and obstacles. We might not have to use any background image plates for our game at
all. At the very least, this allows us to add simpler background image plates, such as a
basic sky with clouds, or a sunset. These compress better, due to their simplicity, and
can use PNG8 images with pristine results. Let's add a larger fixed sprite prop next,
one that has nearly 500 pixels of width and nearly 100 pixels of height. The first thing
that we'll need to add, as shown in Figure 14-27 , is another Prop object that we'll name
iPR1, and another Image object that we'll name iP1, using the following code:
Prop iPR0, iPR1 ;
private Image iB0, iB1, iB2, iB3, iB4, iB5, iB6, iB7,
iB8, iP0, iP1 ;
Figure 14-27 . Add an iPR1 Prop declaration (shown with all other PropH, PropV and PropB declarations) and iP1
Image
Copy your iP0 Image instantiation, creating an iP1 Image, referencing prop1.png ,
as shown in Figure 14-28 .
 
 
 
Search WWH ::




Custom Search