# corona-hack-pack
The corona-hack-pack is a collection of instructions, tutorials and code samples designed to help newbie coders learn the basics of scripting and game development using Lua and the Corona SDK.
##Install Lua
The Corona SDK will install it's own private version of Lua so the following steps to manually install Lua are only necessary if you want to run and test Lua scripts at a command prompt or terminal.
In other words, if you have no interest in running stand-alone Lua scripts for learning purposes and plan on writing all of your Lua code completely from within a Corona SDK project you do not need to manually install Lua as done here; you can simply jump straight to the section on installing the Corona SDK.
###Setup for Windows
The latest installer for Lua on Windows can be found at [this GitHub page](https://github.com/rjpcomputing/luaforwindows/releases). Once there, find and click on the link that says [LuaForWindows_v5.1.4-50.exe](https://github.com/rjpcomputing/luaforwindows/releases/download/v5.1.4-50/LuaForWindows_v5.1.4-50.exe) to download the installer.
Once installed you should be able to run the "lua" command from the Windows Command Prompt.
To test your install, you can open a command prompt on Windows by clicking Start button, clicking All Programs, clicking Accessories, and then clicking Command Prompt.
Once the Command Prompt window opens, you can type "lua" and press enter.
```
lua
```
You can also open a command prompt at a particular folder by pressing and holding the Shift key and then right clicking on the folder and then selecting "Open Command Window Here". This is very useful if you want to run Lua from a folder that already has some Lua scripts in it.
--------------------------------------------------------------------------------
###Install Lua on Mac OSX
First off, go ahead and open up a terminal on your Mac by going to your Applications folder, and then opening the Utilities folder. Once there, open the Terminal application.
Now, type "brew" and press enter to see if you have Homebrew installed. Homebrew is a package manager for OS X that can help us install other software tools and libraries for us.
```
$ brew
```
If brew is installed you should see something like this:
```
$ brew
Example usage:
brew [info | home | options ] [FORMULA...]
brew install FORMULA...
brew uninstall FORMULA...
brew search [foo]
brew list [FORMULA...]
brew update
brew upgrade [FORMULA...]
brew pin/unpin [FORMULA...]
...
```
If you don't have Homebrew installed, install Homebrew by copying and pasting this into the terminal:
```
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```
Instructions for this were found [here](http://brew.sh/).
Then, use Homebrew to install Lua in the terminal by typing:
```
$ brew install lua
```
Once installed you should be able to run the "lua" command from the terminal.
```
$ lua
```
If successful, you should see something like this in the terminal:
```
Lua 5.2.4 Copyright (C) 1994-2015 Lua.org, PUC-Rio
>
```
This is the command prompt for the Lua interpreter, which will allow you to write and run Lua code in the terminal window. Hold down the "control" key and press the "C" key to exit the Lua interpreter and return to the terminal prompt.
##Install and setup the Sublime Text editor
You can use any text editor you like for Lua or Corona SDK development, but Sublime Text 3 is the official editor used by Corona, so I highly recommend it if you simply have no preference of editor.
With that said, the following instructions are only for setting up the Sublime Text 3 editor for Lua and Corona SDK development.
[Download and install Sublime Text 3](http://www.sublimetext.com/3)
Install the package manager **Package Control** for **Sublime Text 3** so we can install some other useful features for Sublime.
1. [Go here...](https://packagecontrol.io/installation)
2. Copy the Python script from the tab for "SUBLIME TEXT 3".
3. Launch Sublime
4. Go to the menu 'View > Show Console' to open Sublime's console.
5. Paste the code into the console of Sublime and hit enter.
6. Installation progress will be displayed in the lower left corner of Sublime.
7. Restart Sublime
Use Package Control to install **Fix Mac Path** (**_This is only required if you're on a Mac._**)
1. Go to the menu 'Preferences > Package Control'
2. In the edit box type "Install Package" to find and select it.
3. In the edit box type "Fix Mac Path" to find and select it.
4. Installation progress will be displayed in the lower left corner of Sublime.
5. Restart Sublime
Use Package Control to install **Lua Dev**
1. Go to the menu 'Preferences > Package Control'
2. In the edit box type "Install Package" to find and select it.
3. In the edit box type "Lua Dev" to find and select it.
4. Installation progress will be displayed in the lower left corner of Sublime.
5. Restart Sublime
Use Package Control to install **Corona Editor**
1. Go to the menu 'Preferences > Package Control'
2. In the edit box type "Install Package" to find and select it.
3. In the edit box type "Corona Editor" to find and select it.
4. Installation progress will be displayed in the lower left corner of Sublime.
5. Restart Sublime
--------------------------------------------------------------------------------
The following are optional packages for Sublime but are very useful for Lua development.
Use Package Control to install **SublimeLinter**
1. Go to the menu 'Preferences > Package Control'
2. In the edit box type "Install Package" to find and select it.
3. In the edit box type "SublimeLinter" to find and select it.
4. Installation progress will be displayed in the lower left corner of Sublime.
5. Restart Sublime
6. [More info...](http://www.sublimelinter.com/en/latest/index.html)
Use Package Control to install **SublimeLinter-Lua**
1. Go to the menu 'Preferences > Package Control'
2. In the edit box type "Install Package" to find and select it.
3. In the edit box type "SublimeLinter-Lua" to find and select it.
4. Installation progress will be displayed in the lower left corner of Sublime.
5. Restart Sublime
6. [More info...](https://github.com/SublimeLinter/SublimeLinter-lua)
Use Package Control to install **SidebarEnhancements**
1. Go to the menu 'Preferences > Package Control'
2. In the edit box type "Install Package" to find and select it.
3. In the edit box type "SidebarEnhancements" to find and select it.
4. Installation progress will be displayed in the lower left corner of Sublime.
5. Restart Sublime
6. [More info...](https://github.com/titoBouzout/SideBarEnhancements)
Use Package Control to install **BracketHighlighter**
1. Go to the menu 'Preferences > Package Control'
2. In the edit box type "Install Package" to find and select it.
3. In the edit box type "BracketHighlighter" to find and select it.
4. Installation progress will be displayed in the lower left corner of Sublime.
5. Restart Sublime
6. [More info...](https://github.com/facelessuser/BracketHighlighter)
##Install the Corona SDK
Go to the [Corona SDK website](https://coronalabs.com/), sign up for a free account, and download the Corona SDK from [here](http://developer.coronalabs.com/user/login?destination=downloads/coronasdk).
--------------------------------------------------------------------------------
##List of Lua Videos
###Learning Lua - Ep 1 - Variables
In this video we will actually start to learn Lua scripting using our new Lua & Corona SDK development environment.
[Video Link](https://youtu.be/G8RUJxg1toU)
Source Used: lua_1_variables.lua
Keywords Used: local
Functions Used: print(), type(), tonumber(), tostring()
--------------------------------------------------------------------------------
###Learning Lua - Ep 2 - Tables
In this video we will learn about Lua's most powerful data type, tables, and how they're used to hold and organize collections of other data types
没有合适的资源?快使用搜索试试~ 我知道了~
corona-hack-pack 是一组说明、教程和代码示例,旨在帮助新手编码人员学习使用 Lua 和 Corona SD
共102个文件
lua:56个
png:24个
settings:14个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 148 浏览量
2022-06-23
23:36:29
上传
评论
收藏 4.3MB ZIP 举报
温馨提示
_lua_代码_下载 orona-hack-pack 是一组说明、教程和代码示例,旨在帮助新手编码人员学习使用 Lua 和 Corona SDK 编写脚本和游戏开发的基础知识。 ##安装Lua Corona SDK 将安装它自己的 Lua 私有版本,因此仅当您想在命令提示符或终端运行和测试 Lua 脚本时,才需要手动安装 Lua 的以下步骤。 换句话说,如果您对运行独立的 Lua 脚本不感兴趣并打算完全从 Corona SDK 项目中编写所有 Lua 代码,则无需像此处那样手动安装 Lua;您可以直接跳到安装 Corona SDK 的部分。 更多详情、使用方法,请下载后阅读README.md文件
资源推荐
资源详情
资源评论
收起资源包目录
corona-hack-pack 是一组说明、教程和代码示例,旨在帮助新手编码人员学习使用 Lua 和 Corona SD (102个子文件)
.gitignore 333B
main.lua 13KB
scene1.lua 9KB
scene1.lua 7KB
lua_1_variables.lua 6KB
scene1.lua 6KB
dpad.lua 6KB
dpad.lua 6KB
dpad.lua 6KB
scene1.lua 6KB
lua_8_file_io.lua 6KB
lua_2_tables.lua 5KB
lua_7_string_manipulation.lua 5KB
scene1.lua 5KB
lua_4_for_and_while_loops.lua 5KB
scene1.lua 4KB
lua_3_if_statements.lua 4KB
lua_5_functions.lua 4KB
scene1.lua 4KB
lua_6_reference_vs_copy.lua 4KB
scene1.lua 3KB
scene2.lua 3KB
scene1.lua 3KB
scene1.lua 2KB
scene1.lua 2KB
scene1.lua 2KB
bezier.lua 2KB
scene1.lua 2KB
main.lua 1KB
main.lua 958B
main.lua 577B
main.lua 562B
main.lua 562B
main.lua 562B
main.lua 562B
main.lua 562B
main.lua 562B
main.lua 562B
main.lua 562B
main.lua 562B
main.lua 562B
main.lua 562B
config.lua 338B
config.lua 103B
config.lua 103B
config.lua 103B
config.lua 103B
config.lua 103B
config.lua 103B
config.lua 103B
config.lua 103B
config.lua 103B
config.lua 103B
config.lua 103B
config.lua 103B
config.lua 103B
config.lua 103B
README.md 17KB
paper_mario_main_title.mp3 2.74MB
spinning_coin.png 422KB
corona.png 209KB
lakitu.png 71KB
mario.png 65KB
mario.png 65KB
mario.png 65KB
mario.png 65KB
mario.png 65KB
mario.png 65KB
green_burst.png 58KB
enemy.png 52KB
f22_raptor.png 38KB
star_coin.png 32KB
link.png 27KB
block.png 9KB
fighter.png 9KB
fighter.png 9KB
ground.png 4KB
pad.png 3KB
pad.png 3KB
pad.png 3KB
platform.png 3KB
button_gray.png 2KB
button_gray_over.png 2KB
Introduction to Lua.ppt 278KB
build.settings 695B
build.settings 695B
build.settings 632B
build.settings 632B
build.settings 632B
build.settings 632B
build.settings 632B
build.settings 632B
build.settings 632B
build.settings 632B
build.settings 632B
build.settings 632B
build.settings 626B
build.settings 626B
DelitschAntiqua.ttf 44KB
test.txt 78B
共 102 条
- 1
- 2
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9149
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功