OUYA游戏开发快速入门教程

 OUYA游戏开发快速入门教程


  试读地址:http://pan.baidu.com/s/1o63a3W2
 
本教程是国内唯一OUYA游戏开发教程。本教程基于Unity全面讲解OUYA游戏开发方式。内容包括OUYA游戏机初始化设置、搭建开发环境、构建游戏、真机测试、游戏发布等方面。 
 
目  录
第1章  了解OUYA及其设备 1
1.1  OUYA的诞生 1
1.2  OUYA的硬件规格 2
1.2.1  游戏主机 2
1.2.2  游戏控制杆 3
1.3  OUYA设备的购买和安装 5
1.2.3  购买OUYA 5
1.2.4  OUYA设备的安装 7
1.4  使用OUYA 7
1.4.1  第一次启动OUYA 7
1.4.2  系统更新 8
1.4.3  设置语言 9
1.4.4  设置网络 10
1.4.5  绑定帐号 13
1.4.6  设置付费信息 14
1.5  OUYA系统 16
1.5.1  系统更新日志 16
1.5.2  OUYA系统主界面 17
1.5.3  PLAY主菜单项 18
1.5.4  DISCOVER主菜单项 19
1.5.5  MAKE主菜单项 20
1.5.6  MANAGE主菜单项 20
1.6  OUYA游戏常见操作 21
1.6.1  寻找游戏 21
1.6.2  了解游戏 21
1.6.3  下载、安装和卸载游戏 22
1.6.4  开始游戏 22
1.6.5  退出游戏 24
1.6.6  检索游戏 25
1.6.7  进入系统菜单 25
1.6.8  退出OUYA系统 26
第2章  成为OUYA游戏的开发者 27
2.1  OUYA带给开发者的际遇 27
2.1.1  OUYA出现的历史背景 27
2.1.2  开发者获取收益的方式 27
2.1.3  OUYA对于游戏内容的限制 27
2.2  OUYA帐号与ODK 28
2.2.1  创建OUYA帐号 28
2.2.2  安装ODK 32
2.2.3  ODK结构简介 32
第3章  搭建一个可编译OUYA游戏的开发环境 36
3.1  安装JDK 36
3.1.1  下载JDK 37
3.1.2  JDK安装过程 38
3.2  安装Android SDK 39
3.2.1  下载Android SDK 39
3.2.2  Android SDK安装过程 41
3.3  设置Android SDK管理器 43
3.3.1  Android SDK管理器 43
3.3.2  安装特定的工具组件 44
3.4  安装Unity 47
3.4.1  下载Unity 47
3.4.2  Unity的安装 47
3.4.3  使用免费版本的Unity 48
3.4.4  注册Unity帐号 49
3.4.5  Unity的界面布局 50
3.5  安装ADB 51
3.5.1  接通OUYA主机的电源和显示器 51
3.5.2  将OUYA主机连接到电脑 52
3.5.3  为电脑安装ADB驱动 53
3.5.4  安装ADB可能遇到的错误 55
3.6  下载并运行游戏Demo 58
3.6.1  下载游戏Demo 58
3.6.2  在Unity中创建游戏项目 59
3.6.3  将游戏项目导入Unity 59
3.6.4  编译游戏Demo 60
3.6.5  运行游戏Demo 61
3.7  调试游戏Demo 62
3.7.1  查看游戏中的场景 62
3.7.2  修改游戏精灵的状态 64
3.7.3  修改游戏的背景 64
第4章  可选的OUYA游戏开发辅助工具 66
4.1  安装Android NDK 66
4.2  Android模拟器 68
4.2.1  Android虚拟设备管理器--AVD Manager 68
4.2.2  创建一个新设备 70
4.2.3  创建一个Android虚拟设备 72
4.2.4  手动下载Android SDK上的特定组件 75
4.2.5  运行Android模拟器 79
4.2.6  Android模拟器界面介绍 80
4.2.7  Android模拟器快捷键介绍 82
4.2.8  关闭Android模拟器 82
4.3  将Android SDK添加到PATH路径 83
4.3.1  修改系统的环境变量 83
4.3.2  验证添加效果 85
4.4  ADB工具介绍 86
4.4.1  启动和关闭ADB服务 86
4.4.2  查看Android设备 87
4.4.3  安装应用 88
4.4.4  卸载应用 89
4.4.5  进入设备或者模拟器的shell 91
4.4.6  发送文件到设备 93
4.4.7  从设备上下载文件 93
第5章  创建第一个OUYA游戏项目 95
5.1  创建游戏项目 95
5.2  OUYA Core Package 96
5.2.1  下载OUYA Core Package 96
5.2.2  导入OUYA Core Package 97
5.2.3  导入各类文件作用说明 99
5.3  配置项目属性 102
5.3.1  切换运行平台 102
5.3.2  PlayerSettings 103
5.4  设置OUYA Panel 107
5.4.1  Unity标签 107
5.4.2  Java JDK标签 108
5.4.3  Android SDK标签 108
5.4.4  Android NDK标签 109
5.4.5  OUYA标签 110
5.4.6  编译插件及NDK 111
5.5  添加OuyaGameObject对象 112
5.6  在OUYA主机上运行游戏项目 113
5.7  在Android虚拟机中运行项目 115
5.7.1  运行效果展示 115
5.7.2  编译失败--找不到设备 116
5.7.3  编译失败--无法安装APK 116
第6章  制作第一个OUYA游戏--《迷失的小毛驴》 119
6.1  游戏场景 119
6.1.1  概述 119
6.1.2  项目操作--创建场景 120
6.2  游戏对象 120
6.2.1  概述 120
6.2.2  项目操作--添加游戏对象 122
6.3  脚本文件 122
6.3.1  脚本语言 122
6.3.2  脚本编辑器 123
6.3.3  脚本模版代码 124
6.3.4  项目操作--添加脚本 125
6.3.5  项目操作--添加脚本代码 125
6.4  组件 126
6.4.1  概述 127
6.4.2  组件与脚本 127
6.4.3  项目操作--为游戏对象赋予脚本 128
6.5  资源 128
6.5.1  概述 128
6.5.2  项目操作--为游戏项目导入资源 130
6.5.3  资源与文件夹 130
6.5.4  项目操作--Project视图文件的整理 131
6.6  OUYA游戏示例 131
6.6.1  添加构成迷宫的游戏对象 131
6.6.2  在脚本中设计迷宫 133
6.6.3  在游戏场景里绘制迷宫 134
6.6.4  player对象的行为逻辑 137
6.6.5  切换迷宫 142
6.6.6  视图效果 146
6.7  添加Player动画 148
6.7.1  获取并导入角色模型和动画 148
6.7.2  了解Player对象的创建流程 149
6.7.3  制作Player对象,并赋予动画效果 150
6.7.4  效果展示 155
6.8  OUYA输入控制 155
6.8.1  简要介绍 155
6.8.2  添加OUYA输入控制 158
6.9  游戏效果展示 161
6.10  附:GameLogic脚本代码 161
第7章  编译并上传游戏到官网 169
7.1  对游戏项目的操作 169
7.1.1  创建Keystore 169
7.1.2  设置Bundle Identifier 171
7.1.3  编译成APK 171
7.2  上传游戏到OUYA官网 172
7.2.1  登录开发者帐号 172
7.2.2  完善个人信息 173
7.2.3  添加新游戏 175
7.2.4  上传APK 176
7.2.5  游戏及版本信息预览 181
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
使用 Kivy 打包 APK,您需要遵循以下步骤: 1. 安装 Kivy 和 Buildozer 您需要运行以下命令来安装 Kivy 和 Buildozer: ``` pip install kivy pip install buildozer ``` 2. 创建一个 Kivy 应用程序 创建一个 Kivy 应用程序,并确保它可以在本地计算机上运行。 3. 配置 buildozer.spec 文件 在您的 Kivy 应用程序目录中创建一个名为 buildozer.spec 的文件,并配置以下选项: ``` [app] # (str) Title of your application title = My Application # (str) Package name package.name = myapp # (str) Package domain (needed for android/ios packaging) package.domain = org.test # (str) Source code where the main.py live source.dir = . # (list) Source files to include (let empty to include all the files) source.include_exts = py,png,jpg,kv,atlas # (list) List of inclusions using pattern matching #source.include_patterns = assets/*,images/*.png # (list) Source files to exclude (let empty to not exclude anything) #source.exclude_exts = spec # (list) List of directory to exclude #source.exclude_dirs = tests, bin # (list) List of exclusions using pattern matching #source.exclude_patterns = license,images/*/*.jpg # (str) Application versioning (method 1) version = 0.1 # (str) Application versioning (method 2) # version.regex = __version__ = ['"](.*)['"] # version.filename = %(source.dir)s/main.py # (list) Application requirements requirements = kivy # (str) Custom source folders for requirements # (it's relative to the current directory) #source.custom_kivy = ../kivy # (list) Permissions android.permissions = INTERNET # (str) Android logcat filters to use android.logcat_filters = *:S python:D # (str) Android entry point android.entrypoint = org.test.myapp.myapp # (int) Target Android API, should be as high as possible. #android.api = 27 # (int) Minimum API your APK will support. android.minapi = 21 # (int) Android SDK version to use android.sdk = 20 # (str) Android NDK version to use #android.ndk = 19b # (bool) Use --private data storage (True) or --dir public storage (False) #android.private_storage = True # (str) Android NDK directory (if empty, it will be automatically downloaded.) #android.ndk_path = # (str) Android SDK directory (if empty, it will be automatically downloaded.) #android.sdk_path = # (str) python-for-android git clone directory (if empty, it will be automatically cloned from github) #android.p4a_dir = # (list) python-for-android whitelist #android.whitelist = # (str) OUYA Console category. Should be one of GAME or APP # If you leave this blank, OUYA will classify your app as "unknown". #android.ouya.category = GAME # (str) Filename of OUYA Console icon. It must be a 732x412 png image. #android.ouya.icon.filename = %(source.dir)s/data/icon-ouya-console.png # (str) XML file to include as an intent filters in <activity> tag #android.manifest.intent_filters = # (list) Android additionnal libraries #android.add_libs = libs/android/*.so # (list) Add Java jars #android.add_jars = foo.jar,bar.jar # (str) JNI directory containing the Android.mk file to use #android.jni_directory = None # (str) java directory containing the Android.mk file to use #android.java_directory = None # (bool) Use --bootstrap when building the Android app #android.bootstrap = False # (str) Path to a custom AndroidManifest.xml #android.manifest.custom = # (str) If you need to insert variables into your AndroidManifest.xml file, # you can do so with the manifestPlaceholders property. # See: https://developer.android.com/studio/build/manifest-build-variables.html #android.manifest.placeholders = # (str) Path to a custom build.py file #android.build.custom_dir = # (str) Path to a custom __init__.py file to use as __init__.py for the whole build #android.build.source_init = # (list) List of Java classes to add to the build process (can be java or aars) #android.add_classpaths = foo.jar,bar.jar # (list) List of Java classes to add to the build process (can be java or aars) #android.add_aars = foo.jar,bar.jar # (list) Gradle dependencies to add (currently works only with sdl2 bootstrap) #android.gradle_dependencies = # (str) Set the gradle version (default is 2.2.0) #android.gradle_version = 2.2.0 # (bool) If True, attempt to run the app on the device via adb #android.try_build_ext = False # (str) iOS bundle identifier #ios.bundle_identifier = org.test.myapp # (str) iOS App Store ID #ios.app_store_id = # (str) iOS SDK to use #ios.sdk = 10.1 # (str) The name of the certificate to use for signing the debug version of the app # Get a list of available identities: buildozer ios list_identities #ios.codesign.debug = "iPhone Developer" # (str) The name of the certificate to use for signing the release version of the app #ios.codesign.release = %(ios.codesign.debug)s # (str) The path to the provisioning profile to use for the debug version of the app # Get a list of available provisioning profiles: buildozer ios list_profiles #ios.provisioning_profile_debug = # (str) The path to the provisioning profile to use for the release version of the app #ios.provisioning_profile_release = # (bool) Compile with the SaleorSDK #ios.use_salesforce_mobile_sdk = False # (list) Icon files #icon.filename = %(source.dir)s/data/icon.png #icon.filename = %(source.dir)s/data/icon-256.png #icon.filename = %(source.dir)s/data/icon-512.png #icon.filename = %(source.dir)s/data/icon-1024.png # (str) Keystore location (if you want to enable signing with a custom keystore) #android.sign.keystore = # (str) Keystore alias (if you want to enable signing with a custom keystore) #android.sign.alias = # (str) Keystore password (if you want to enable signing with a custom keystore) #android.sign.keystore_password = # (str) Key password (if you want to enable signing with a custom keystore) #android.sign.key_password = # (int) Number of permissions to prompt in the ``Permissions`` popup #android.max_permissions = 5 # (str) Bootstrap to use. Choices: sdl2, pygame #p4a.bootstrap = sdl2 # (int) Number of times to retry retrieving the Android SDK before giving up #android.sdk_retry = 0 # (bool) Stop on first error encountered when compiling/building the python part of the project. #stop_on_first_error = False # (bool) Log output of p4a to files #log_level = 2 #log_dir = logs #log_name = p4a_build.log # (list) List of package names to be included in the final package. # Some android app store require this. #android.add_packages = # (list) Used to copy files into the App (useful to copy obb data, licensing stuff, etc.) Must be a list of tuples #android.add_files = # (list) List of Java classes to add to the build process #android.add_java_classes = # (list) List of Java files to add to the build process #android.add_javas = # (str) Path to a custom AndroidManifest.xml (template to generate the actual AndroidManifest.xml) #android.manifest.template = # (str) Path to a custom toolchain .zip file (can be used to use a pre-built library) #android.toolchain = # (str) Path to a custom obb file #android.obb.filename = # (str) Path to a custom obb file that should be put into the assets directory. This file will be read by the app at runtime. #android.obb.main = # (str) Path to a custom obb file that should be put into the assets directory. This file will be read by the app at runtime. #android.obb.patch = # (bool) Enables Android App Bundle format #android.bundle.enable = False # (str) Specifies the format to use for the Android App Bundle. Choices are: # universal: generates a fat APK that works on all devices # split: generates an APK per ABI and on that only contains the resources for that ABI. #android.bundle.mode = universal # (list) List of split options to apply # android.bundle.split_config = abi # (list) List of obfuscation options to apply #android.obfuscation = # (str) Path to the python for android git checkout to use for the build #p4a.source_dir = # (str) Path to the android ndk to use for the build #android.ndk_path = # (str) Path to the android sdk to use for the build #android.sdk_path = # (str) Path to the ant directory for the build #android.ant_path = # (str) Path to the android build tools directory #android.build_tools_path = # (bool) If True, automatically accept SDK license #android.accept_sdk_license = False # (bool) If True, no other SDK packages will be downloaded #android.no_sdk_packages = False # (str) Android theme to use for the app #android.theme = # (bool) Copy library instead of making a libpymodules.so #android.copy_libs = False # (bool) Use a black background #ios.black_background = False # (str) URL scheme to use for the iOS app #ios.url_scheme = # (str) Bundle name for the iOS app #ios.bundle_name = # (str) The entitlements file to use #ios.entitlements = # (str) The entitlements file to use for the debug version of the app #ios.entitlements.debug = # (str) The entitlements file to use for the release version of the app #ios.entitlements.release = # (str) The path to the entitlements file to use #ios.entitlements.path = # (str) The development team to use for signing the app #ios.development_team = # (str) The development team to use for signing the debug version of the app #ios.development_team.debug = # (str) The development team to use for signing the release version of the app #ios.development_team.release = # (str) The provisioning profile to use for the debug version of the app #ios.provisioning_profile_debug = # (str) The provisioning profile to use for the release version of the app #ios.provisioning_profile_release = # (list) URL Schemes to use for the app #ios.url_schemes = # (list) iOS frameworks to link against #ios.frameworks = # (list) iOS frameworks to weakly link against #ios.frameworks.weak = # (list) iOS libraries to link against #ios.libraries = # (list) iOS libraries to weakly link against #ios.libraries.weak = # (bool) Enable bitcode support #ios.enable_bitcode = False # (str) The path to the entitlements file to use for the watch extension #ios.watch_extension_entitlements = # (str) The path to the provisioning profile to use for the watch extension #ios.watch_extension_provisioning_profile = # (list) iOS icon files to be used #ios.icons = # (str) The background color of the application's icon #ios.icon_background_color = # (str) The mask to use for the application's icon #ios.icon_mask = # (list) iOS assets to include #ios.assets_directory = # (str) iCloud entitlements file to use for the project #ios.icloud_entitlements = # (bool) Whether the app should be uploaded to TestFlight on build #ios.testflight.upload = False # (str) API Key for TestFlight #ios.testflight.api_token = # (str) Team Token for TestFlight #ios.testflight.team_token = # (str) Distribution lists for TestFlight #ios.testflight.distribution_lists = # (list) Any other custom Xcode build settings to use #ios.pbxproj_variables = ``` 您需要根据您的应用程序进行相应的更改。 4. 创建一个虚拟环境 在您的项目目录中创建一个虚拟环境: ``` python3 -m venv myenv ``` 5. 激活虚拟环境 激活虚拟环境: ``` source myenv/bin/activate ``` 6. 初始化 buildozer 初始化 buildozer: ``` buildozer init ``` 7. 编辑 buildozer.spec 文件 编辑 buildozer.spec 文件,并确保您已经配置了正确的选项。 8. 打包 APK 运行以下命令来打包 APK: ``` buildozer -v android debug ``` 这将创建一个名为 myapp-0.1-debug.apk 的 APK 文件。 注意:在打包 APK 之前,请确保您已经按照 Kivy 官方文档中的说明正确地配置了 Android SDK 和 NDK。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值