Android 2D game engine Andengine Quick Start tutorial

Source: Internet
Author: User
Tags android games

Android 2D game engine andengine Quick Start Tutorial

Introduction: Andengine is a well-known Android 2D game engine. The engine code is open source and can be used free of charge. This book explains in detail how to develop 2D games using the Andengine engine.

Probation:HTTP://PAN.BAIDU.COM/S/1C0CODIW


Objective

As a free mobile phone operating system, Android system occupies the majority of the mobile phone system share. Among Android's many app types, game apps are the biggest branch of entertainment. Due to mobile phone control features, 2D games become the mainstream of Android games, such as Flappy Bird, Plants vs Zombies, Angry Birds, flying, 2048 and so on.

Andengine is a well-known Android 2D game engine. The engine code is open source and can be used free of charge. The engine is developed primarily in the Java language and uses a small number of C/+ + languages. This book describes in detail the basic functions of andengine and the necessary operating procedures. In order to facilitate the reader to learn, the book appears in each Andengine basic functions, provided the corresponding examples.

1. Learn the required systems and software

Windows 7, Windows 8, or Windows8.1 operating systems

JDK 8

Android SDK 4.4

Andengine

Andenginephysicsbox2dextension

2. Learning Suggestions

Before you learn, you can write to xxxxxxxxxxxxxxxxxxx to get the relevant information and software. If you are having problems with your learning process, you can also send the issue to the mailbox. We'll try to solve it for everyone.

Directory

The 1th chapter of Understanding Andengine 1

1.1 What is Andengine 1

1.2 Configuring the Environment 1

1.2.1 Environmental Requirements 2

1.2.2 Configuring JDK 2

1.2.3 Download Eclipse 9

1.2.4 Configuring the SDK 14

1.2.5 Adding a game engine Project 16

1.2.6 Adding Andengine items 23

1.3 Creating a Project 26

1.3.1 Android Project Creation 26

1.3.2 Complete Android Game project configuration 29

2nd Chapter Andengine Game development Warm up 33

2.1 Andengine Life Cycle 33

2.1.1 Life cycle in Android 33

2.1.2 Basegameactivity Class 34

2.2 Andengine Project Commissioning Method 36

2.2.1 Configuration Simulator 36

2.2.2 Debugging using the simulator 38

2.2.3 testing in a physical machine 41

2.3 Selection of engine types 41

2.3.1 How to choose Engine Type 42

2.3.2 Select engine Type 42

2.4 Andengine Cross Device Solutions 43

2.4.1 Implementation Mode 43

2.4.2 Types of Solutions 43

The 3rd chapter starts the pre-game preparation 46

3.1 Planning Games 46

3.1.1 Positioning Game Content 46

3.1.2 Required entities in the game 47

3.1.3 Selection of pictures 48

3.1.4 Selection of Audio 50

3.2 Game Resource Allocation 50

3.2.1 Lead 50

3.2.2 Enemy 51

3.2.3 Platform and Cloud 51

3.3 Related tools recommended 51

3.3.1 Graphical Tools 52

3.3.2 Audio Tools 54

Chapter 4th Resource Management 55

4.1 Material Resources Texture 55

4.1.1 Related class Interface Introduction 55

4.1.2 Loading Images 55

4.1.3 Uninstalling an Image 60

4.2 Audio Resources 61

4.2.1 Audio Class 61

4.2.2 Loading Audio Resources 61

4.2.3 Uninstalling Audio Resources 63

4.3 Font Resources 64

4.3.1 Font Class 64

4.3.2 Loading Font Resources 64

4.3.3 Uninstalling Fonts 64

4.4 Integration Resources 65

4.4.1 Creating a ResourceManager class for a single-state mode 65

4.4.2 Loading Resources 71

4.4.3 Check if the load was successful 72

Chapter 5th Entity 73

5.1 Entity Introduction 73

5.1.1 Entities and Layers 73

5.1.2 Entity base class function 74

5.2 Scene 75

5.2.1 Using Scenario 75

5.2.2 Adding content to the scene 77

5.3 Drawing Different Shapes 78

5.3.1 Drawing Lines 78

5.3.2 Drawing a Rectangle 80

Use of 5.4 Mesh 81

5.4.1 Mesh Drawing Mode 81

5.4.2 using mesh to draw points 83

5.4.3 using mesh to draw different lines 85

5.4.4 using mesh to draw triangles 86

5.4.5 using mesh to draw a rectangle 88

5.4.6 using mesh to draw polygons 90

5.4.7 drawing Irregular shapes using mesh 92

6th Chapter Andengine in the wizard 94

6.1 Normal ELF 94

6.1.1 Using Sprites 94

6.1.2 Operation Wizard 96

6.1.3 Common Elf Operation example 97

6.2 Dynamic Sprite 103

6.2.1 Requirements for Images 103

6.2.2 Dynamic Sprite Operation 103

6.2.3 action on a person 107

6.3 Button Wizard 113

6.3.1 Requirements for button icons 113

6.3.2 Using the Button Wizard 113

6.4 Wizard's integrated use 115

Chapter 7th Text 124

7.1 Adding text in Andengine 124

7.1.1 loading Ben 124 in the game

7.1.2 about font resources and text entities 125

7.2 More Font Instances 126

8th Particle System 130

8.1 Using the particle system 130

8.1.1 Instance Operations 130

8.1.2 using particle systems Step 133

8.2 In-depth understanding of particle systems 134

8.2.1 Particle emitter 134

8.2.2 Particle Initialization 137

8.2.3 Particle System Application Scenario 139

9th modifier and Entity modifier 140

9.1 Common Modifiers Introduction 140

9.1.1 Common modifier Introduction 140

9.1.2 Andengnie Entity Modifier Introduction 143

9.2 Common modifiers for static sprites 145

9.2.1 Transparent modifier alphamodifier 145

9.2.2 Color modifier colormodifier 146

9.2.3 Delay modifier Delaymodifier 147

9.2.4 fade-in modifier fadeinmodifier 147

9.2.5 Fade modifier fadeoutmodifier 148

9.2.6 Jump modifier jumpmodifier 149

9.2.7 offset Modifier Movebymodifier 150

9.2.8 move modifier movexmodifier and moveymodifier in horizontal or vertical direction 151

9.2.9 rotation offset Modifier rotationatmodifier 153

9.2.10 Rotary modifier Rotationbymodifier 155

9.2.11 Rotary modifier rotationmodifier 156

9.2.12 scaling offset Modifier scaleatmodifier 157

9.2.13 Zoom modifier Scalemodifier 158

9.2.14 Tilt Modifier Skewmodifier 159

9.2.15 Path Modifier Pathmodifier 161

9.2.16 base spline modifier cardinalsplinemovemodifier 162

9.3 Dynamic Sprite 164

9.3.1 Loop modifier Loopentitymodifier 164

9.3.2 Parallel modifier Parallelentitymodifier 166

9.3.3 sequence Modifier Sequenceentitymodifier 167

9.4 Button Wizard 168

9.5 using modifiers in particle systems 172

9.5.1 modifiers in particle systems 172

Transparent modifier for 9.5.2 particle system alphaparticlemodifier 172

Color modifier for 9.5.3 particle system Colorparticlemodifier 173

9.5.4 particle system off-camera modifier offcameraexpireparticlemodifier 175

Rotary modifier for 9.5.5 particle system rotationparticlemodifier 175

Scaling modifier for 9.5.6 particle system scaleparticlemodifier 176

Modifier interface for 9.5.7 particle system Iparticlemodifier 178

Advanced operations for 9.5.8 particle Systems 179

9.6 Designing a Menu interface 184

10th Camera Object 190

10.1 Different camera Classes 190

10.1.1 Camera Class 190

10.1.2 Boundcamera class 193

10.1.3 Zoomcamera Class 195

Use of 10.1.4 Smoothcamera 196

10.2 Special features of the camera class 198

10.2.1 Gesture Zoom Function 198

Camera operations in the 10.2.2 stitching background 201

10.2.3 using HUD 204 in the camera

10.2.4 controlling the movement of Camera objects 208

10.2.5 Coordinate Conversion 211

10.2.6 creating a detached scene game 214

11th Application Physics engine 219

11.1 Application Physics engine 219

11.2 Body 222 in the physics engine

11.2.1 Bodytypes 222

Types of 11.2.2 Body Filter 224

11.2.3 combination of different body 226

11.3 Speed 228

11.3.1 Force manual set Speed 228

11.3.2 Gravity 234

11.4 Connection Body 236

11.4.1 How to use a variety of different connection methods 236

11.4.2 Create a "rag Doll" 244

11.4.3 Rope 251

11.5 Collisions 256

11.5.1 implementing the collision process 256

11.5.2 can destroy objects 259


Android 2D game engine Andengine Quick Start tutorial

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.