[Gameplay3d] Development Guide-part of Translation

Source: Internet
Author: User
Tags doxygen visual studio 2010
[Note: according to the English version of the translation, the level is limited, it is inevitable that there are many poor translations, hope to understand. I suddenly found that there was no such nonsense in it, so I would not continue to translate it. Take notes based on your learning situation. Practical and quick start. If you have any questions, please refer to the official documentation. -Breakpoint fairy tale

The gameplay framework is an open-source, cross-platform game framework. He aims to make it easier for us to learn how to use the original C ++ to develop 3D mobile and desktop games. In this development guide, we include the libraries, tools, and all major API methods that teach you to use gameplay from the upper layer to the bottom layer in the framework. This guide introduces a set of C ++ classes for game development.

Design objectives and precautions

When we create the gameplay framework, our goal is not only to focus on creating a high-performance native C ++ game framework, but also to create a clean, simple, and elegant style for him. This framework uses the smallest cross-platform external dependency and tries to design the class using the simplest abstract method. This method allows you to learn the classes in the library and expand the framework to build your own game engine and tools. This framework is a good runner for learning how to write 3D cross-platform mobile and desktop games, allowing you to spend more time designing your games.

Why write another game engine?

We actually want gameplay to be considered a game framework. However, in fact, he is only the core component of the game engine. The following are several reasons for developing the gameplay framework:

First, most advanced 3D game engines are closed source code, although sometimes free or cheap. In addition, they usually have license fees. The gameplay framework is an open-source free software with the Apache 2.0 license. We want more people to know that cross-platform platforms can be implemented and lay a solid foundation for further game development.

Second, a game engine is not just rendering. It is undeniable that rendering occupies a large part, but the game engine is equally important in many other aspects, such as audio, physics, animation, UI form, particle transmitter, script, and mathematics. Due to the differences in opportunities in the learning process, searching on the Internet and finding the right options for using these things in game engines or games may put your energy in many places. I hope this framework will bring these together to you.

Finally, mobile games are popular. The gameplay framework will focus a lot on games and mobile devices. Mobile games are now the fastest growing sector in the gaming industry. In addition, we provide support for desktop platforms on both tools and games. However, we believe that more emphasis should be placed on mobile games and learning how to write games that can be easily oriented to cross-platform mobile departments.

Compilation framework

To compile the gameplay library, tools, and examples, and develop your own games, you must install and use the corresponding development tools in the following table on different platforms. The following table shows the development environment supported by each specific operating system as the target platform.

Desktop OS

Tool

Development Environment

Microsoft Windows 7

Visual Studio 2010

Windows 7

Apple Mac OS X

Xcode 4.3.2

Mac OS X

 

Mobile OS

Tool

Development Environment

Blackberry playbook OS 2.0

Blackberry native sdks 2.0

Windows 7, Mac OS X

For Android 2.3

Android ndk 7

Windows 7, Mac OS X

For IOS 5.1

Xcode 4.3.2

Mac OS X

Project Database

The project library contains the following significant folders and files:

Folder/Files

Description

/Bin

Pre-compiled binary Tool

/External-deps

External Dependency function library

/Gameplay

Gameplay Library

/Gameplay-API

Doxygen api reference

/Gameplay-docs

Document guide and tutorials

/Gameplay-Encoder

Game asset/Content Encoding tools

/Gameplay-luagen

Lua script bundle generation tool

/Gameplay-template

Game sample template project file

/Gameplay-Samples

Game example

Gameplay. xcworkspace

Xcode Project

Gameplay. sln

Microsoft Visual Studio Solution

Gameplay-newproject.bat/. Sh

New cross-platform project script

Start Desktop System

The fastest way to use the gameplay framework and tools is to start simple work in a desktop environment. You must use Microsoft Visual Studio 2010 express and professional on Windows 7, or xcode 4.3.2 on Mac OS X. Next, you only need to open the Microsoft Visual Studio solution or xcode project, and then compile and run the project. These solutions/projects are set to compile all required projects by default and run the example programs you select to activate.

Look, you have a few simple and interactive examples running in your desktop environment. You can explore them and become more familiar with them.

Game examples

The gameplay document folder contains additional sample tutorial documents. These are all for you to learn more and use the Framework to design and develop games. They all have a good starting point, but the deliberate reservation is incomplete. This provides an opportunity to change the examples, improve them, and make them more fun in interaction and play. It provides a good building module, which is the basis for you to explore different features in the framework. You can use the game clips in the example in your own game to Accelerate the development cycle.

API reference

We firmly believe that building an intuitive API set is straightforward and consistent as possible. However, all classes in the framework have been documented in the doxygen format. All classes will be updated or improved repeatedly in each version. This will help you learn what classes or methods can be used and use them as recommended.

You should consider reading the latest api reference manual from the pre-generated HTML doxygen API documentation in the gameplay API folder. This gives you a better understanding of the C ++ gameplay framework.

Start mobile devices

Now it is up to you to decide which desktop environment to run. We suggest you think carefully and start Mobile development. In today's mobile game stores, cross-platform development is indeed a reality. For a wide audience of devices, using the gameplay framework is simple and easy. Download the Native Development Kit, or all of the supported operating systems.

Mobile settings

The following describes how to download, install, and install the supported mobile devices and development environments in gameplay.

Blackberry native sdks 2.0/10 Beta (playbook tablets and BlackBerry 10 devices)


1 download and install the BlackBerry native sdks 2.0 (for playbook) or BlackBerry 10 Beta (for BlackBerry 10 devices ).

2 run the QNX momentics IDE (eclipse CDT based) and click
File> Import existing projects.

3 Import all the gameplay projects by selecting the repository project folder.

4 set the Active configuration to one of the device-xxx or simulator-xxx profiles.

5 build and run any of the game samples.

Apple xcode 4.3.2 (iPad tablets and iPhone devices)

6 download and install Apple xcode 4.

7 open the gameplay. XC workspace.

8 change the Active configuration to iOS device, iPhone simulator, or iPad simulator.

9 build and run any of the game samples.

Android ndk 7 (Android tablets and devices)

10 downloadand install Android ndk 7, Android SDK, Apache ant, and GNU make for cygwin.

1 setup the android SDK.

1 Make sure <Android-SDK-path>/tools and <Android-SDK-path>/platform-tools are added to path.

1 setup the android ndk and follow these instructions.

1 Make sure <Android-ndk-path> is added to path.

1 install Apache ant.

1 Make sure <ant-path>/bin is added the path.

1 install cygwin and select and add the package make: the GNU version of The 'make' utility during installation.

1 rename awk.exe to something else (awk_.exe for example) in <Android-ndk-path>/prebuilt/Windows/bin. this is to prevent the android build system from being confused by the cygwin's awk.

1 build the gameplay library using following steps: Open the cygwin terminal.

1 change to the <gameplay-root>/gameplay/Android folder.

1 run the following command to generate the needed files to build the project:> Android. Bat update project-T 1-P.-S

1 run the following command to build the gameplay Library:

> Ndk-build

1 build a sample game (s) with following steps: Open the cygwin terminal.

1 change to:

<Gameplay-root/gameplay-samples/samplexx-XXXXX>/Android folder.

2 run the following command to generate the needed files to build the project:> Android. Bat update project-T 1-P.-S

3 run the following command to build the gameplay sample:> ndk-build

Android ndk permissions errors:

If you see an error like ". /obj/local/armeabi/LibPNG. a: No such file: Permission denied ", make sure that "*. A "files have read permission by running:

> Chmod + r obj/local/armeabi/*.

11 connect the device and run the following command in the cygwin terminal to deploy the game:> ant debug install

NOTE: If "ant debug install" does not work, ensure your device is being detected properly by running "ADB devices ". if no devices are reported, try downloading the correct USB drivers from you phone manufacturer's website. (OEM drivers)

Linux (UBUNTU)

12 sudo apt-Get install build-essential GCC cmake libglu1-mesa-dev libogg-dev libopenal-Dev

13 CD build

14 cmake ..

15 make

Considerations for Mobile Platforms

Make sure that you can test on a physical device first. Based on different types of games and design concepts, you will want some methods of the performance type, and you will get the game plan and prototype you strive to get. Be careful not to rely on the desktop and mobile simulator as indicators of performance and mobile device capabilities.

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.