Skip to content
Xrysnow edited this page Jul 13, 2020 · 13 revisions

What is LuaSTG-x

LuaSTG-x is an multi-platform game engine based on cocos2d-x and LuaSTGPlus (er+1.02). It is aimed at providing a powerful engine for building STG, especially bullet hell games.

Compatibility with LuaSTGPlus

LuaSTG-x provides nearly all C API of LuaSTGPlus and most of them are identical in feature. Lua scripts (THlib) is based on er+1.02 with a few changes. It's compatible with most games made for er+1.02 except those use cunstom shaders. See API change section for more information.

C++ part of engine

The foundation of the engine is cocos2d-x 4.0. Some codes are from LuaSTGPlus and fancy2D. Refer to github repo for all dependencies.

Main features:

  • Multi-platform audio engine supports wav/flac/ogg/mp3 format, play from memory or file, seamless loop and OpenAL effects
  • Multi-platform video engine supports basic playback
  • Load scene made by Cocos Creator
  • 3D model support from cocos
  • Powerful particle system from cocos. Here is a visual editor: http://particle2dx.com
  • Live2D support from Cubism 4 SDK
  • Full ImGui integration
  • Console window on desktop platforms. print function in Lua will output there
  • Window resizing and fullscreen toggling on desktop platforms
  • Game resolution swiching

Small features:

  • Latex doc rendering
  • SVG image rendering
  • utf8 lib from Lua5.3
  • Read/write of zip files
  • MSAA
  • Transparent window on desktop platforms
  • Many collider shapes

Lua part of engine

Lua API doc: https://xrysnow.github.io/lstgx_LuaCore/index.html

THlib API doc: https://xrysnow.github.io/lstgx_THlib/index.html

  • THlib comes from er+1.02
  • Some old scripts were modified and many new scripts were added
  • data and game can be loaded from both zip files and local folders (see src/core/loading.lua)
  • Scripts in plugin folder will be loaded automatically (see src/core/loading.lua)
  • lstg.world now has a metatable, do not replace it(see src/core/view.lua)
  • Some native APIs are provided on android platform(see src/platform/android/native.lua)
  • Provides i18n function
Clone this wiki locally