Game Development Reference
In-Depth Information
Tip Because there is no native sound implementation, sound events are cascaded back to Java, which will load
and play them on the fly. This Java sound implementation slows things down a bit. Unfortunately, because Android
doesn't use the standard Linux audio device and mixer, native sound is not possible at the time of this writing.
Furthermore, Google doesn't support native development, which makes things tough.
Figure 6-2. The Wolf3D game architecture
Other types of messages sent by the DSO layer include these:
Graphics initialization : This message is sent when the video buffer is first created.
Message contents include the width and height of the buffer.
Miscellaneous text messages : These string messages are sent by the DSO to Java to
display information to the user.
The game display is represented by an XML layout, which contains two visual components:
An image view : This element displays the video buffer sent back by the DSO after
an iteration of the game loop.
A controller layout : This layout displays an SNES-style controller (see Figure 6-2),
which listens for touch events such as navigation, gun firing, and others. These
events are cascaded as scan codes back to the DSO, which process them and
updates the game flow accordingly.
Search WWH ::




Custom Search