Difference between revisions of "Getting Started (简体中文)"

(获得 LÖVE)
Line 8: Line 8:
 
love --version
 
love --version
 
</code>
 
</code>
 +
 +
== Making a Game ==
 +
 +
To make a minimal game, create a folder anywhere, and open up your favorite code editor. Notepad++ is a pretty good one for Windows, and it has Lua support built in. Create a new file in the folder you just created, and name it main.lua. Put the following code in the file, and save it.
 +
 +
<source lang="lua">
 +
function love.draw()
 +
    love.graphics.print("Hello World", 400, 300)
 +
end
 +
</source>

Revision as of 22:25, 1 May 2011

获得 LÖVE

LÖVE 网站 下载最新版本的 LÖVE,然后安装到电脑中。 如果使用 Windows 平台并不是必须要安装 LÖVE 才可使用,也可以通用下载 LÖVE 压缩包,然后解压到硬盘中任意位置的方式来使用 LÖVE 。

使用如下命令可以查看已安装的 LÖVE 版本:

love --version

Making a Game

To make a minimal game, create a folder anywhere, and open up your favorite code editor. Notepad++ is a pretty good one for Windows, and it has Lua support built in. Create a new file in the folder you just created, and name it main.lua. Put the following code in the file, and save it.

function love.draw()
    love.graphics.print("Hello World", 400, 300)
end