zoukankan      html  css  js  c++  java
  • libgdx 学习笔记三 HelloWorld

    Introduction(序言)

    导入一个现有项目来展示libgdx project的结构到开发工作流程中。

    Requirements(需求)

    首先需要Eclipse 和Android SDK。访问Android SDK Instructions 获取更多细节。

    Download and Import(下载和导入)

    downloads page. 下载 helloworld.zip 源代码。

    在Eclipse选 File -> Import... -> General -> Existing Projects Into Workspace。在Import Projects屏幕中,点击Select archive file。然后浏览helloworld.zip。

    之后确定找到gdx-helloworld and gdx-helloworld-android projects 并选中,然后点击Finish。

    Running(运行)

    在游戏的代码位置,找到我们的第一个project gdx-helloworld。你可以作为一个独立的桌面应用程序运行它。是的,它不需要模拟器和android手机。运行这个工程,需要在工程处

    右键gdx-helloworld 文件夹 选择 Run As->Java Application 如弹出一个对话框,访问main类,选择HelloWorld Desktop。这个Hello World桌面应用将启动:

    gdx-helloworld-android 工程添加一些的代码在 gdx-helloworld 上,允许他运行在android 设备上。如果你看到它的源文件目录,将发现它包含代码。因为

    这个工程从gdx-helloworld涉及了一切。运行这个程序(gdx-helloworld-android)选择 Run As->Android Application

    在这一点上应用程序将在兼容模拟器(即虚拟设备加载和运行,或者一个连接到电脑的android设备。

    Going Forward(下一步)

    由于测试游戏中android模拟器太慢,运行游戏时,作为一个桌面应用程序可以简化开发过程。

    开发人员避免每次他们要预览时必须载入游戏到一个装置

    此外开发团队和设计师可以更迅速地测试和分享彼此的变化

    你可以尝试在gdx-helloworld 中做一些改变,作为一个桌面应用程序运行它。当你看见在android上运行gdx-helloworld-android工程时做出的改变,你会满意最终的结果 。
    一个更爽的开发过程就是 libgdx的优势。关于libgdx的不同特点,请看upcomming 教程

  • 相关阅读:
    asp.net core 2.0的认证和授权
    数据库性能优化详解
    StringUtils.defaultIfBlank
    SQL优化(二) 快速计算Distinct Count
    SQL语句中Left join,right join,inner join用法
    sql中的limit关键字
    多线程之间的资源共享
    面试长谈的String,StringBuffer,StringBuilder三兄弟有啥区别
    关于java中的值传递与引用传递遇到的问题
    Struts1和Struts2的区别和对比:
  • 原文地址:https://www.cnblogs.com/tianjian/p/2154527.html
Copyright © 2011-2022 走看看