Libgdx study Note 3 helloworld

Source: Internet
Author: User
Tags libgdx
Introduction (preface)

Import an existing project to demonstrate the structure of the libgdx project to the development workflow.

Requirements)

Eclipse and Android SDK are required first. Visit Android SDK instructions for more details.

Download and import)

Download on Downloads page.Helloworld.zipSource code.

Choose File> Import...> General> existing projects into workspace in eclipse. On the import projects screen, click Select archive file. Click helloworld.zip.

Then find GDX-helloworld andGDX-helloworld-androidSelect projects and click Finish.

Running)

In the game code location, find our first projectGDX-helloworld. You can run it as an independent desktop application. Yes, it does not require simulators and Android phones. To run this project, you need

Right-click the GDX-helloworld folder and choose run as-> JAVA application. In the displayed dialog box, access the main class and select helloworld desktop. The Hello world desktop application will start:

The GDX-helloworld-android project adds some code on GDX-helloworld, allowing him to run on Android devices. If you see its source file directory, you will find it contains code. Because

This project involves everything from GDX-helloworld. Run this program (GDX-helloworld-android) and select Run as-> Android Application

At this point, the application will load and run in a compatible simulator (Virtual Device), or an Android device connected to the computer.

Going forward (next step)

Because the android simulator in the test game is too slow, running the game can simplify the development process as a desktop application.

Developers avoid loading the game to a device every time they want to preview

In addition, development teams and designers can test and share their changes more quickly.

You can try to make some changes in GDX-helloworld and run it as a desktop application. When you see the changes made when running the GDX-helloworld-android project on Android, you will be satisfied with the final result. A better development process is the advantage of libgdx. For details about the different features of libgdx, refer to the upcomming 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.