售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Learning Construct 2
Table of Contents
Learning Construct 2
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Downloading and Understanding Construct 2
About Construct 2
Downloading Construct 2
Walking through the installation of Construct 2
Navigating through Construct 2
Creating game objects
Adding layers
Sorting the z-order
Layer properties
Saving your project
What is an event system?
Reading an event system
Writing events
Creating a variable
Using a license
Summary
2. Creating Your First Game Design
Defining a game
Making your own challenges in a game
Rewarding your players
Ending the loop
Examples of games for Construct 2
Drawing the flow of the game
Making game mechanics
Creating game rules
Main game phases
Understanding the fun factor
More references for game design
Game-design template
Game-design books
Summary
3. Creating Diverse Player Experiences with a Flappy Bird Clone
How Flappy Bird works
Understanding random generation
Flappy Bird game design
Making our own Flappy Bird game
Adding the layers
Adding a Sprite object
Using image points
Setting the collision polygon
Enabling the plane to fall and collide
Making it tap to flap
Using instance variables
Using the timer behavior
Stopping the rotation
Learning random generation
Making the ground scroll
Picking objects for actions
Creating random obstacles
Adding collectibles
Completing our code
Summary
4. Making a Breakout Clone
Creating the design
Designing the reward system
Setting up our layout
Using a tiled background object
Moving the paddle in only two directions
Making the ball bounce
Adding the blocks
Destroying the blocks
Setting up the power up blocks
Writing an expression
Understanding constant variables
Adding sub-events
Changing a game object's state
Adding more states
Ending a game
Losing by time
Losing by life
Calculating the score
Comparing an expression
Killing the bug
Summary
5. Making a Platformer Game
Preparing the level
Setting up the character
Moving the character
Changing the animations
Making the camera follow the player
Jumping through platforms
Moving to another level
Hitting the coin box
Learning about physics
Forces, impulses, torques, and joints
Adding a puzzle element
Moving our character with the Physics behavior
Changing the properties of the rock
Selecting an object via its UID
Joining two objects
Types of physics engines in Construct 2
Summary
6. Creating a Space-shooter Game
Setting the stage
Scrolling the stage
Creating the enemy
Deleting offscreen objects
Making the player shoot at enemies
Adding the particle effects
Storing data in Construct 2
Getting to know arrays
Understanding the elements of an array
One-dimensional and multidimensional arrays
Storing data in a dictionary
Comparison between arrays and dictionaries
Using arrays in your game
Inserting data into a dictionary
Retrieving the value in an array and dictionary
Storing data in the player's machine
Using WebStorage to store data
Making the leaderboard
Understanding looping
Using a loop in our leaderboard
Summary
7. Making a Battle Tank Game
Setting up the layout
Using a container
Pinning an object to another object
Moving the units
Adding obstacles
Making custom obstacles for the units
Creating enemies
Making the turrets shoot
Navigating through the level
Adding music and sound effects
Choosing the right file
Playing the sound
Making enemies smarter
Enabling enemy patrolling
Creating a scout type of enemy
Additional reading
Summary
8. Debugging Your Game
Bugs and their types
Solving a runtime bug
Picking the right object
Picking in sub-events
Picking unreferenced objects
Using Construct 2's debugging tool
Using the inspector
Watching the properties values
Profiling the CPU
Reading the profiler
Performance summary
Using breakpoints
Different levels of bug importance
Summary
9. Mastering the Best Practices
Applying common best practices
Backing up data regularly
Testing your game on multiple browsers
Supporting devices with touchscreen
Using the right file format
Security
Using technical best practices
Optimizing for mobile platforms
Knowing the cause of poor performance
Listing the common optimization misconceptions
Zeroing in on a frames per second rate
Understanding which part of the game to optimize
Previewing over Wi-Fi
Using your memory wisely
Avoid using large image files
Doing it the right way
Construct 2 – texture loading
Mobile limitations
Summary
10. Publishing Your Game
Exporting to the Web
Exporting as an HTML5 game
Uploading games to your Dropbox
Requirements for the Scirra Arcade
Publishing for Scirra's Arcade
Changing the icons used
Publishing to desktop
Exporting using node-webkit
Publishing as an Open Web App
Exporting a packaged app
Exporting a hosted app
Submitting to the Firefox marketplace
Publishing to mobile platforms
Preparing your PhoneGap game
Uploading to PhoneGap
Summary
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜