Skip to main content

Using Threads and Tones

  • Chapter
J2ME Games with MIDP2
  • 71 Accesses

Abstract

In this chapter, you’ll improve the Tumbleweed game from the previous chapter by adding some new threads. One of the new threads will make the algorithm that releases the tumbleweeds more efficient, and the other new thread will play background music. You won’t need to change some of the classes for this version, and therefore the code for certain classes won’t be repeated in this chapter. Please see Chapter 3 if you’d like to review the source code for GameThread. java, Cowboy. java, and Grass. java (which the current example also uses). The following listings include the code for the modified classes.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 29.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 39.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Carol Hamer

About this chapter

Cite this chapter

Hamer, C. (2004). Using Threads and Tones. In: J2ME Games with MIDP2. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-0697-2_4

Download citation

  • DOI: https://doi.org/10.1007/978-1-4302-0697-2_4

  • Publisher Name: Apress, Berkeley, CA

  • Print ISBN: 978-1-59059-382-0

  • Online ISBN: 978-1-4302-0697-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics