Game Development Reference
In-Depth Information
CHAPTER 11
Moving Your Action Figure in
2D: Controlling the X and Y Dis-
play Screen Coordinates
Now that we have created the public CastingDirector class, which I call the “casting en-
gine,” in Chapter 10 , we need to get back into our InvinciBagel.java primary applica-
tion class coding here in Chapter 11 , and create our iBagel primary game play Actor
(character) in the .createGameActors() method. We will also create the castDirector
object using the CastingDirector.java class and its CastingDirector() constructor method,
which we created in Chapter 10 , as well as creating the .createCastingDirection()
method, which will manage our casting direction class-related features.
After we finish adding the code into our InvinciBagel.java class that will create the
iBagel Bagel object, and create a castDirector CastingDirector object, we will reorgan-
ize our code into logical method structures for the major task areas that need to be ad-
dressed in the InvinciBagel class. After we do this, we'll have eight logical method
areas. These methods will then serve as “guides” to the functional areas that we will
need to keep updated (add statements to) as we develop our game over the rest of the
book. For instance, if we add an Actor to the game, we will do this by adding (instantiat-
ing) an Actor object inside of a .createGameActors() method, and then add the Actor ob-
ject to a cast object created using our new CastingDirector() constructor method inside
of a new .createCastingDirection() method.
In addition to the .createGameActors() and .createCastingDirector() methods, our
new methods will include the .loadImageAssets() method, the .createS-
ceneEventHandling() method, the .createStartGameLoop() method, and the .ad-
dGameActorNodes() method. So, we will be creating half a dozen new methods for
Search WWH ::




Custom Search