最近发现一个有意思的lua游戏引擎,名字叫love2d

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了最近发现一个有意思的lua游戏引擎,名字叫love2d相关的知识,希望对你有一定的参考价值。

Hi there! LÖVE is an *awesome* framework you can use to make 2D games in Lua. It‘s free, open-source, and works on Windows, Mac OS X, Linux, android and ios.

Open Source

LÖVE is licensed under the liberal zlib/libpng license. This means that:

  • It costs nothing.
  • You can use it freely for commercial purposes with no limitations.

The source can be found on Bitbucket.

Community

If you get stuck, many friendly people are ready to help you at the forums. Be warned, however, that it sometimes gets too friendly.

People also post their games and projects on the forums, so it‘s a nice way of exploring what LÖVE can do. Or at least what people choose to use it for.

There is also an IRC channel: #[email protected].

Examples

It’s pretty easy to get started with LÖVE, just check out these code snippets.

Drawing text
function love.draw()
    love.graphics.print("Hello World!", 400, 300)
end
Drawing an image
function love.load()
  whale = love.graphics.newImage("whale.png")
end
function love.draw()
  love.graphics.draw(whale, 300, 200)
end
Playing a sound
function love.load()
    sound = love.audio.newSource("music.ogg")
    love.audio.play(sound)
end

 

Check out some more tutorials on the wiki.

以上是关于最近发现一个有意思的lua游戏引擎,名字叫love2d的主要内容,如果未能解决你的问题,请参考以下文章

Lua制作flappy bird

使用 Lua 在 Love2D 中需要一个共享对象 (.so) 文件

什么是使用 Lua 的优秀游戏引擎? [关闭]

Lua,Love2d,不同文件夹下两个类名相同的游戏

Lua/love2d - 游戏的资产文件夹路径

《杀戮地带:暗影坠落》是使用啥游戏引擎?游戏引擎叫啥名字?怎么觉得看的有一小点像虚幻4?