monkey game development beginner's guide [electronic resource] create monetized 2d games deployable to almost any platform

402 1.6K 0
monkey game development beginner's guide [electronic resource] create monetized 2d games deployable to almost any platform

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

[...]... Create a package to submit Time for action – creating the app package Summary Index 353 353 353 354 354 354 355 356 357 357 358 358 359 361 [ xvi ] Preface Welcome to Monkey Game Development Beginner's Guide This book will teach you (as a step-by-step guide) how to develop 2D games with Monkey With eight sample games included, the book covers a great range of the toolset and important game development techniques... learn how to utilize the highly versatile Monkey programming language/toolset to create 2D games, deployable almost anywhere Only very basic knowledge of Monkey is required, so if you are a total beginner, it will help if you have studied the samples that come with Monkey [2] Preface Conventions In this book, you will find several headings appearing frequently To give clear instructions of how to complete... the Windows platform, OSX and Linux were basically the only markets, where an individual game developer could publish games to Game consoles were accessible only to huge game development companies with a lot of financial background Even these days, it is almost impossible to publish a game for an individual on some platforms But new markets have arisen and new development tools such as Monkey are available... and exporting your game to the Android platform are covered in this chapter, too Chapter 6, Game #5, Balls Out!, will cover game development for the iOS mobile platform and a typical hardware feature of mobile devices called the accelerometer During the development of a Breakout-inspired game called Balls Out!, you will learn how to use tilt movement to control your game, how to create and use particle... learn how to deploy your games to mobile platforms, such as iOS, Android, and other platforms, such as OSX and Windows When you are done studying this book, the knowledge you have gained about creating 2D games with Monkey will have you transformed from being a beginner-level game developer to experienced creator of your virtual dreams So what are you waiting for? Start reading and create some Monkey- powered... Monkey- powered games! What this book covers Chapter 1, Monkey Huh?, takes you on a fast-paced tour of what Monkey is, which tools are included, what games you can create with it, and which programming features Monkey provides for you, in general Chapter 2, Getting to Know your Monkey a Trip to the Zoo, will show you the first steps in working with the Monk editor and creating your very first Monkey script... now Today it is more and more important to target several platforms with your game Why miss out on the money that can be made and the extra exposure for your game? There are so many markets to cater to, such as Apple AppStore, Android Market, and others, that it would be silly to throw away the opportunity to publish on them and rake in the extra cash So, a cross -platform development tool such as Monkey. .. The magic you will create your own games Your own awesome games You still want to do it, right? Ok, then let's carry on When it comes to writing your Monkey code, you won't need anything else There are other source code editors you could use to code your games with, but this book will utilize Monk for all the coding action How Monk works and which tools it provides you with, for your development, will... that are relevant to game development! Now, with Monkey and various other game creation tools, this process has become much easier and quicker than before A programming language that is based on a BASIC dialect is easy to learn and the features of Monkey will help you bring your dream of becoming a game developer to life Cross -platform development Ahh, the magic term cross -platform development! It is... as the the Apple App store or the Android market Making money from your games is the goal of this chapter For this, it will cover how to use external features such as implementing advertising in your mobile game, too You will also learn what kinds of markets exist for your apps Who this book is for Do you want to quickly create games deployable to all the major desktop and mobile platforms? If so, look . alt="" Monkey Game Development Beginner's Guide Create monezed 2D games deployable to almost any plaorm Michael Hartlef BIRMINGHAM - MUMBAI Monkey Game Development Beginner's Guide Copyright. developing games and has worked on a large range of game development tools/ programming languages, such as thinBasic, Delphi, 3D GameStudio, Blitz3D, BlitzMax, DarkBasic Pro, App Game Kit (AGK),. ulity company where he maintains the billing system (SAP IS-U). Michael is also the founder of an independent game developer startup called Whitesky Games ( http://www.whiteskygames.com).

Ngày đăng: 29/05/2014, 17:34

Từ khóa liên quan

Mục lục

  • Cover

  • Copyright

  • Credits

  • About the Author

  • About the Reviewers

  • www.PacktPub.com

  • Table of Contents

  • Preface

  • 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

      • Please welcome… Monk

      • MSERVER—Monkey's own web server

    • Let's have a little playtime

    • Time for action – playing Pirate TriPeaks

    • Time for action – playing Surviball

      • Playing to have fun, playing to study

    • So let's go for something big? No!

      • The alternative

    • Time for action – read the manual

      • The Trans tool and the supported target platforms

        • HTML5

        • FLASH

        • iOS

        • Android

        • XNA

        • GLFW

      • The Monkey standard modules

        • Lang

        • Lists

        • Map

        • Math

        • Random

        • Set

        • Stack

      • Mojo – The 2D framework/modules

        • App

        • Audio

        • Graphics

        • Input

      • Monkey is extendable

        • Your own modules

        • Native source code

        • Third-party modules

        • Your own targets

      • Your game is easily portable

    • Summary

  • Chapter 2: Getting to Know your Monkey—a Trip to the Zoo

    • Call the Monk and start praying—the Monkey IDE

      • Why learn about Monk?

      • Starting up Monk

      • Monk's user interface

        • The toolbar

      • The code editor area

      • The info box

    • 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!

    • Summary

  • 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

      • Implementing the city class into the game

    • Time for action – changing the gameClasses file

      • Modifying the RocketCommander class

    • Time for action – spawning some cities in the game

      • Rendering the ground and the cities

    • Time for action – rendering the cities

    • Get the launchers ready!

    • Time for action – implementing the rocket launchers

      • Implementing the launcher class into the game

    • Time for action – changing the gameClasses file again

      • Modifying the RocketCommander class

    • Time for action – creating some launchers in the game

      • Updating the rocket launchers

    • Time for action – updating the launchers

      • Enhancing the UpdateMenu method

    • Time for action – modifying the menu update process

      • Rendering our precious rocket launchers

    • Time for action – rendering the launchers

    • Fire! Blast them to pieces!

    • Time for action – implementing some rockets

      • Implementing the rocket class into the game

    • Time for action – modifying the gameClasses file

      • Modifying the launcher class

    • Time for action – modifying the launcher class

      • Updating the rockets

    • Time for action – updating the rockets

      • Rendering our furious rockets

    • Time for action – rendering the rockets

    • And it goes BOOM!... Explosions

    • Time for action – implementing explosions

      • Implementing the explosion class into the game

    • Time for action – modifying the gameClasses file

      • Modifying the rocket class

    • Time for action – modifying the rocket class

      • Updating the explosions

    • Time for action – updating the explosions

      • Rendering beautiful explosions

    • Time for action – rendering the explosions

    • Don't fear the enemy—bombs

    • Time for action – creating the bomb class

      • Implementing the bomb class into the game

    • Time for action – modifying the gameClasses file

      • Updating bombs

    • Time for action – updating the bombs

      • Rendering beautiful bombs

    • Time for action – rendering the bombs

      • Creating new bombs and checking for GameOver conditions, or new level conditions

    • Time for action – modifying the UpdateGame method

    • Displaying the game score

    • Time for action – displaying the game score

    • Summary

  • Chapter 4: Game #3, CometCrusher

    • Using a game framework—the fantomEngine

    • Game resources

      • Images

      • Sounds

      • Bitmap fonts

    • The game objects

      • Layers

      • Background stars

      • Comets

      • The player ship

      • The shield

      • Shots

      • Particles

      • Game info text

    • The basic file structure

    • Time for action – create the main source file and its folders

    • Open the storage please—the data structure of CometCrusher

    • Time for action – creating the data structure

    • First changes to the OnCreate method

    • Time for action – modifying the OnCreate method

    • Detailing the Render process

    • Time for action – detailing the OnRender method

    • This is a setup—creating the game objects

      • Group yourself—layers

    • Time for action – creating some layers

      • Let them shine—the background stars

    • Time for action – implementing some stars

      • The Hero—creating the player ship

    • Time for action – setting up the player ship

      • Did you hear that—loading sounds

    • Time for action – creating a method to load sounds

      • Did you see that score—the game UI

    • Time for action – creating some game info text objects

      • Headlines—adding a title screen

    • Time for action – adding a title screen

      • How good are you—the high score list

    • Time for action – setting up the high score list

      • Rocks rocks rocks—fill the space with some comets

    • Time for action – create a comet

    • Time for action – creating some comets

      • Mission complete... finalizing the OnCreate process

    • Time for action – finalizing the OnCreate method

    • We need help—more methods for the Update process

      • Loading and showing the high score list

    • Time for action – loading a high score list

    • Time for action – showing the high score list

      • Activating the shield of the player ship

    • Time for action – the ActivateShield method

      • Delta time related movement

    • Time for action – determine the time delta

      • Updating the game statistic info text objects

    • Time for action – updating the info text

      • Starting a new game

    • Time for action – creating a StartNewGame method

      • Let the engine glow

    • Time for action – spawning some engine particle FX

      • And it goes boom—creating an explosion

    • Time for action – creating some explosions

      • Give me that gun—spawning a shot

    • Time for action – spawning some shots

      • Save some high scores, will ya!

    • Time for action – saving the high score list

    • Finalizing the OnUpdate method

    • Time for action – finalizing the OnUpdate method

    • Bring in the action—shaping the engine class

      • Crack these objects—object collision handling

    • Time for action – detailing the collision detection

      • It's about time—acting on timer events

    • Time for action – detailing the OnObjectTimer method

      • Everything is under control—object update events

    • Time for action – detailing the OnObjectUpdate method

      • Did I win—checking the losing conditions with OnLayerUpdate

    • Time for action – detailing the OnLayerUpdate method

    • One last thing—creating a FLASH game

    • Summary

  • Chapter 5: Game #4, Chain Reaction

    • Modifying the HTML5 canvas size

    • Time for action – modifying canvas size

    • Some development basics

      • Frameworks/modules

      • Sprite sheets

      • Content scaling

      • Touch input

      • Suspend and Resume events

      • Animation

    • Game resources

    • Game objects

      • Layers

      • Title screen

      • Game background

      • Atom tiles

      • Game info text

    • The basic app structure

    • Time for action – creating the main source file and its folders

    • The data storage

    • Time for action – creating the data structure

    • First changes to the OnCreate event

    • Time for action – first changes to the OnCreate method

    • Detailing the OnRender event

    • Time for action – detailing the OnRender method

    • Setting up the game objects

      • Sound effects

    • Time for action – loading the game sound effects

      • Game layers

    • Time for action – creating layers for the game

    • Game screen

      • Click here – Adding buttons

    • Time for action – creating buttons

      • The info text objects

    • Time for action – creating info text objects

      • The actual game screen

    • Time for action – composing the game screen

      • Title screen

    • Time for action – creating the title screen

    • Finalizing the OnCreate event

    • Time for action – finalizing the OnCreate method

    • Helper functions for the update process

      • Creating the atom elements

        • Collision circle objects

    • Time for action – creating collision circles

      • Atom elements

    • Time for action – creating the atom elements

      • Starting a new game

    • Time for action – creating a StartNewGame method

      • Time-related movement

    • Time for action – implementing the GetDeltaTime method

      • Updating the info text objects

    • Time for action – creating a method to update the text information

    • Detailing the OnUpdate event

    • Time for action – finalizing the OnUpdate method

    • Introducing the OnSuspend event

    • Time for action – modifying the OnSuspend event

    • Introducing the OnResume event

    • Time for action – updating the OnResume method

    • The heart of the game - the engine class

      • What are transitions?

      • Touch me – acting on touch hits

    • Time for action – enhancing the OnObjectTouch method

      • The eagle has landed—a transition is finished

    • Time for action – detailing the OnObjectTransition method

      • It's about time—timer events

    • Time for action – acting on timer events

      • Captain! Collision ahead!—doing collision checks

    • Time for action – detailing the collision detection

    • Creating an Android app

      • Changing icons

      • Do a name change

      • Signing an application for the market

    • Summary

  • Chapter 6: Game #5, Balls Out!

    • Which frameworks and modules are used?

    • Game resources

    • Our lovely game objects

      • Layers

      • The title screen

      • Game background

      • The ball

      • Enemies

      • The ball tiles

    • The basic app structure

    • Time for action – creating the basic file structure

    • Modifying the HTML5 canvas size for testing

    • Time for action – modifying the HTML5 output

    • The data storage

    • Time for action – creating the data structure

    • First changes to the OnCreate event

    • Time for action – first changes to the OnCreate method

    • Detailing the OnRender event

    • Time for action – detailing the OnRender method

    • Setting up the game objects

      • Make some noise—sound effects

    • Time for action – loading the game sound effects

      • Lay your head on me—the game layers

    • Time for action – creating layers for the game

      • Our beloved play field—the background screen

        • Buttons—I need more text buttons!

    • Time for action – creating text buttons

      • The background screen as usual

    • Time for action – composing the game screen

      • Give it a name—the title screen

    • Time for action – creating the title screen

    • Finalizing the OnCreate event

    • Time for action – finalizing the OnCreate method

    • Helper methods for the update process

      • Creating the tiles

    • Time for action – creating the tiles

      • The main actor—creating the ball

    • Time for action – creating the ball

    • The bad guys—our beloved enemies

    • Time for action – creating the enemy class

    • More helper functions

      • Spawning an enemy

    • Time for action – spawning an enemy

      • Starting a new game

    • Time for action – creating a StartNewGame method

    • Bring me up-to-date—detailing the OnUpdate event

    • Time for action – detailing the OnUpdate method

    • Eye candy—particle effects

      • The particle emitter class

    • Time for action – creating the particle emitter class

      • The last helper method

    • Time for action – spawning a particle emitter

    • The heart of the game—the engine class

      • Touch me—acting on touch hits

    • Time for action – enhancing the OnObjectTouch method

      • Controlling the ball—acting on object update events

    • Time for action – acting on object update events

      • What's the situation? Layer update events

    • Time for action – acting on layer update events

      • We reached our parking position—a transition is done

    • Time for action – detailing the OnObjectTransition method

      • Bump bump—checking for collisions

    • Time for action – detailing the collision detection

    • Creating an iOS app

    • Summary

  • Chapter 7: Game #6, At The Docks

    • Frameworks and modules used

    • Game resources

    • The game objects

      • Layers

      • The default layer

      • The title screen

      • Game screen

      • Wall tiles

      • Floor tiles

      • Target tiles

      • Crate tiles

      • The player machine

    • The basic app structure

    • Time for action – creating the basic file structure

    • Modifying the HTML5 canvas size for testing

    • Time for action – modifying the HTML5 output

    • The storage… for our data

    • Time for action – creating the data structure

    • Setting up the game objects

      • Slice over slice—game layers

    • Time for action – creating layers for the game

      • The second-most important part—a title screen

    • Time for action – creating the title screen

    • Detailing the OnCreate event

    • Time for action – finalizing the OnCreate method

    • Some flexible methods for the update process

      • Lads and gents… the main actor

    • Time for action – creating the player

      • The level maps—loading the tiles

    • Time for action – loading the level tiles

      • On your marks—starting a new game

    • Time for action – creating a StartNewGame method

    • Bring me up-to-date - detailing the OnUpdate event

    • Time for action – detailing the OnUpdate method

    • And action!—the engine class

      • Move it… object updates

    • Time for action – updating each object

      • Push push – checking for collisions

    • Time for action – detailing collision detection

      • I can't see it anymore – the transition is finished!

    • Time for action – detailing the OnLayerTransition method

    • Creating a XNA app

    • Summary

  • Chapter 8: Game #7, Air Dogs 1942

    • Frameworks and modules used

    • No silver, no gold, but… our game resources!

    • The game objects

      • Layers

      • The title screen

      • Game background

      • The player plane

      • The enemy plane

      • Bullets

      • Clouds

      • Info text

      • Smoke particles

      • Explosions

    • The basic app structure

    • Time for action – setting up the basic file structure

    • Storing data

    • Time for action – creating the data structure

    • First changes to the OnCreate event

    • Time for action – first changes to the OnCreate method

    • Setting up the game objects

      • Making some noise… sound effects!

    • Time for action – loading the game sound effects

      • Lay your head on me… the game layers

    • Time for action – creating layers for the game

      • Over high ground—the background screen

    • Time for action – composing the background screen

      • Hope it won't rain—creating the clouds

    • Time for action – creating the clouds

      • What is going on?—creating info text objects

    • Time for action – creating info text objects

      • What are we playing here?—The title/menu screen

    • Time for action – creating the title screen

    • Finalizing the OnCreate event

    • Time for action – finalizing the OnCreate method

    • Methods for the update process

      • The hero—spawning the player plane

    • Time for action – spawning the player plane

      • Spawning an enemy

    • Time for action – spawning an enemy plane

      • Starting a new game

    • Time for action – creating a StartNewGame method

    • Detailing the OnUpdate event

    • Time for action – detailing the OnUpdate method

    • Making it look nicer—some particle effects

      • Emitting smoke

    • Time for action – emitting the smoke

      • Boom! Emitting explosions

    • Time for action – creating the explosion

      • Pow!—spawning a shot

    • Time for action – spawning a shot

    • The brain—Computer AI (Artificial Intelligence)

      • Follow him—creating a brain for the enemy pilot

    • Time for action – following the player

    • The heart of the game—the engine class

      • Time management—acting on object timer events

    • Time for action – enhancing the OnObjectTimer method

      • It is gone—a transition is done

    • Time for action – detailing the OnObjectTransition method

      • Controlling the player plane—acting on object update events

    • Time for action – acting on object update events

      • Hit it!—handling collision response

    • Time for action – detailing the collision response

      • Did I win?—layer update events

    • Time for action – acting of layer update events

    • Creating a GLFW app

    • Summary

  • Chapter 9: Game #8, Treasure Chest

    • Frameworks and modules used

    • Reusing code

    • The parts of the game... resources

    • And here they are… the game objects!

      • Layers

      • Our precious title screen

      • A menu screen

      • The 'high-score' screen

      • A game background

      • The worthy gems

      • The gem selector

      • Particle effects

    • Preparation… the basic app and project structure

    • Time for action – creating the basic file structure

    • Creating 2D arrays

    • Time for action – creating 2D arrays

    • Storing information… the data storage

    • Time for action – creating the data structure

    • First changes to the OnCreate event

    • Time for action – first changes to the OnCreate method

    • About the OnRender event

    • Setting up the game objects

      • Klick, bang, swoosh… the sound effects!

    • Time for action – loading the game sound effects

      • Lay your head on me…. the game layers

    • Time for action – creating layers for the game

      • Our beloved play field—the background screen

    • Time for action – composing the background screen

      • Give it a name… the title screen

    • Time for action – creating the title screen

      • Game over… creating the 'game over' screen

    • Time for action – creating the 'game over' screen

    • The menu, please… creating the menu screen

      • Buttons … I need more text buttons!

    • Time for action – creating text buttons

      • The menu screen

    • Time for action – creating the menu screen

      • What is the score?… creating the high-score screen

    • Time for action – creating the score screen

      • Layer activation

    • Time for action – creating the activate layer method

    • Finalizing the OnCreate event

    • Time for action – finalizing the OnCreate method

    • Dealing with the high-score list

      • Loading and saving the list

    • Time for action – loading and saving the high-score list

      • Showing the high-score screen

    • Time for action – showing the high-score list

    • Managing the tile map

      • Getting tile map slot IDs

    • Time for action – getting tile slot IDs

      • Setting tile map slot IDs

    • Time for action – setting a tile slot ID

    • Check/mark the neighboring tiles

    • Time for action – checking neighboring horizontal tiles

    • Time for action – check neighbouring vertical tiles

      • Clearing tiles

    • Time for action – clearing the tile map

      • Counting matching tiles

    • Time for action – counting matching tiles

      • The precious one… creating a gem

    • Time for action – creating a gem

      • Refilling the tile map

    • Time for action – refilling the tile map

    • Methods for the update process

      • Starting a new game

    • Time for action – creating a StartNewGame method

      • Give me some information… displaying info

    • Time for action – updating the text info

      • Showing the 'game over' screen

    • Time for action – showing the 'game over' screen

      • Showing the menu screen

    • Time for action – showing the menu

    • Bring me up-to-date—detailing the OnUpdate event

    • Time for action – detailing the OnUpdate method

    • Vroom… vroom—the engine class

    • Eye candy—particle effects

    • Time for action – spawning an explosion

      • Tick tock… acting on object timer events

    • Time for action – acting on object timer events

      • Touch me—acting on Touch checks

    • Time for action – enhancing the OnObjectTouch method

      • We've reached our parking position… a transition is done

    • Time for action – detailing the OnObjectTransition method

      • What's the situation?… layer update events

    • Time for action – acting on layer update events

    • Summary

  • Chapter 10: Make Some Money for Bananas

    • Which markets exist for your game?

      • iOS

      • OSX

      • Android

      • XNA

      • HTML5/FLASH

    • Existing methods of making money

      • Selling your game at a fixed price

      • Subscriptions

      • Advertisement

      • In-App purchases

    • Implementing advertising in your app

      • Which ad providers exist?

      • Implementing AdMob

        • iOS

        • Android

    • Implementing MobFox in iOS

      • Signing up at MobFox

      • Creating the ID for an iOS app in MobFox

    • Time for action – creating a new MobFox app ID

      • Implementing MobFox into your XCODE project

    • Time for action – adding the MobFox framework to the XCODE project

      • Displaying MobFox ads in the app

    • Time for action – modifying the code to display ads

      • Activating real ads

    • Implementing MobFox in Android

      • Creating the ID for an Android app in MobFox

    • Time for action – creating a new MobFox app ID

      • Implement MobFox into your Android project

    • Time for action – modifying the project to display ads in Android

      • Adding a backfill through InMobi

        • Signing up at InMobi

        • Create an Android app in InMobi

    • Time for action – creating an app ID in InMobi

      • Setting the backfill option in MobFox

    • Time for action – add a backfill in MobFox

    • Publishing in the Android market

      • Create app icons

      • Change the app label and the package name

      • Setting the version code and name

      • Rename the app package

      • Remove the debug key from the package

      • Create a private key to sign the app with

      • Sign the package with your new private key

      • Zipalign your app package

    • Publishing in Apple's App Store

      • Add the app icons

    • Time for action – adding an icon to the Xcode project

    • Time for action – setting the product name in the target settings

      • Set the distribution code signing profile

    • Time for action – setting the distribution code signing profile

      • Create a package to submit

    • Time for action – creating the app package

    • Summary

  • Index

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan