Skip to main content

Let’s Play! Scripting the Game

  • Chapter
  • First Online:
Learn Unity 4 for iOS Game Development
  • 1225 Accesses

Abstract

Our bowling game that has been taking shape over the past few chapters is starting to actually look like a bowling game! It has a bowling ball, bowling pins (or rather, the barrels added in the previous chapter), game controls, and game physics. But it's still more a toy than a game, since it lacks game rules and scoring. That will be remedied in this chapter with a healthy dose of scripting. Most of that will take place in the game controller script, FuguBowlPlayer.js, which will be filled out with the complete logic for a bowling game laid out as states in a finite state machine (FSM). Just the scoring rules are complicated enough, so those will be encapsulated in a script named FuguBowlPlayer.js.

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 EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Philip Chu

About this chapter

Cite this chapter

Chu, P. (2013). Let’s Play! Scripting the Game. In: Learn Unity 4 for iOS Game Development. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-4876-7_8

Download citation

Publish with us

Policies and ethics