• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

kidanger/Drystal: Lua game engine

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

kidanger/Drystal

开源软件地址:

https://github.com/kidanger/Drystal

开源编程语言:

C 56.6%

开源软件介绍:

Drystal

About

Drystal is an opensource game engine.

Games are programmed in Lua and can be exported to Javascript seamlessly.

local drystal = require 'drystal'

function drystal.init()
  print('Game initialized!')
end

function drystal.draw()
  drystal.set_color('red')
  drystal.draw_background()
end

Authors

  • Jérémy Anger
  • Ronny Chevalier

Mailing list

https://groups.google.com/forum/#!forum/drystal

To subscribe, send an e-mail to:

To unsubscribe, send an e-mail to:

To follow via RSS:

https://groups.google.com/forum/feed/drystal/topics/rss.xml

To follow via ATOM:

https://groups.google.com/forum/feed/drystal/topics/atom.xml

License

LGPLv3 for all Drystal code

The external/ folder contains third-party libraries:

  • stb_vorbis.c and stb_truetype.h which are in the public domain
  • lua/* which is under the MIT License
  • box2d/* which is under the zlib License
  • lua-cjson/* which is under the MIT License
  • wavloader.c which is in the public domain
  • miniz.c which is in the public domain
  • libpng/* which is under the libpng License
  • zlib/* which is under the zlib License

Repository

The main repository of Drystal is hosted on Github at http://github.com/kidanger/Drystal/

You can clone this repository with the following command

git clone --recursive https://github.com/kidanger/Drystal.git

Documentation

The documentation of the current release is available in HTML format and can be found at http://drystal.github.io/

Demos

You can find games made with Drystal at https://github.com/kidanger/drystal-demos

Requirements

To build Drystal, the following tools are needed:

  • CMake
  • C compiler — Currently, only clang and gcc are supported.
  • make or ninja — Or any generators supported by CMake
  • C++ compiler (optional)
  • patch (optional)

And the following optional libraries:

  • SDL2
  • OpenAL
  • OpenGL
  • libpng >= 1.6
  • Box2D

When building the documentation, the following additional dependencies are needed:

  • sphinx
  • pip

When building a web version of Drystal, you also need Emscripten.

To use the test coverage, the following tools are needed:

  • gcov
  • lcov

First time

Native build

Once you cloned the repository and installed all the requirements, you can build Drystal in native mode (i.e. that will run on your computer).

make native

You can now find the executable in the build directory:

build-native-Debug/src/drystal --help

or install it:

make install-native CMAKE_FLAGS=-DCMAKE_INSTALL_PREFIX:PATH=$HOME/.local/

Web build

In order to compile Drystal to javascript you will also need to install Emscripten, then you can run:

make web

You will find the final javascript code (there will be two files drystal.js and drystal.mem.js) in the build-web-Release-src/ directory.

Build options

You can configure the build to fit to your needs, for example if you do not need the physics engine, you can run:

make native CMAKE_FLAGS="-DBUILD_PHYSICS=OFF"

Here is the list of options, their default and the additional dependencies needed to build:

Option Default Additional dependencies
BUILD_MANPAGES ON xsltproc
BUILD_ENABLE_COVERAGE OFF lcov, gcov
BUILD_LIVECODING ON
BUILD_PHYSICS ON Box2D
BUILD_PARTICLE ON
BUILD_WEB ON
BUILD_FONT ON SDL2, OpenGL
BUILD_AUDIO ON OpenAL
BUILD_STORAGE ON
BUILD_GRAPHICS ON SDL2, OpenGL, libpng
BUILD_UTILS ON

The additional dependencies listed here are only for a native build. When building with Emscripten, all these dependencies are either provided by Emscripten or recompiled entirely (using a git submodule).

For the web build, removing parts of Drystal that you do not use decrease the size of the final javascript code which helps loading the page of the game faster. (e.g. removing the physics module saves ~273 KiB)




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap