更新时间:2021-08-06 20:05:47
coverpage
Monkey Game Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files eBooks discount offers and more
Preface
What this book covers
Who this book is for
Conventions
Time for action — heading
Reader feedback
Customer support
Chapter 1. Monkey—Huh?
Game development for the rest of us
Cross-platform development
Compiler or translator?
The Monkey toolbox
Time for action — installing Monkey
Let's have a little playtime
Time for action — playing Pirate TriPeaks
Time for action — playing Surviball
So let's go for something big? No!
Time for action — read the manual
Summary
Chapter 2. Getting to Know your Monkey—a Trip to the Zoo
Call the Monk and start praying—the Monkey IDE
Time for action — opening a sample script
Where is my navi?
Time for action — navigating to the Main() function
Save... save... save!
Time for action — saving a script
Projects—bringing in some organization
Time for action — creating a project
The Monkey programming language
Time for action — Monkey's Hello World
Running your first script in a browser
Our first little game... PONGO
Time for action — the basic structure of your game
Pongo's data structure
Time for action — adding some data fields
Time for action — rendering the game field
Time for action — drawing the ball and the paddles
Time for action — player paddle movement
Time for action — moving the enemy paddles
Time for action — moving the ball
Time for action — controlling the ball with the player's paddle
Time for action — letting the enemy paddles fight back
Time for action — acting on the different game modes
Exporting your game as an HTML5 website
One more thing... comment your code!
Chapter 3. Game #2 Rocket Commander
The game objects
The basic file structure
Time for action — building the basic file structure of the game
Hold that data—RocketCommander's data structure
Time for action — creating the general data structure of the game
Detailing the Update process
Time for action — detailing the Update process
Detailing the Render process
Time for action — detailing the Render event
Enhancing the OnCreate event
Time for action — detailing the OnCreate process
Let's build some cities
Time for action — building some cities
Time for action — changing the gameClasses file
Time for action — spawning some cities in the game
Time for action — rendering the cities
Get the launchers ready!
Time for action — implementing the rocket launchers
Time for action — changing the gameClasses file again
Time for action — creating some launchers in the game
Time for action — updating the launchers
Time for action — modifying the menu update process
Time for action — rendering the launchers
Fire! Blast them to pieces!
Time for action — implementing some rockets
Time for action — modifying the gameClasses file
Time for action — modifying the launcher class
Time for action — updating the rockets
Time for action — rendering the rockets
And it goes BOOM!... Explosions
Time for action — implementing explosions
Time for action — modifying the rocket class
Time for action — updating the explosions
Time for action — rendering the explosions
Don't fear the enemy—bombs
Time for action — creating the bomb class
Time for action — updating the bombs
Time for action — rendering the bombs
Time for action — modifying the UpdateGame method
Displaying the game score
Time for action — displaying the game score
Chapter 4. Game #3 CometCrusher
Using a game framework—the fantomEngine