Releases: Legacy-LuaSTG-Engine/LuaSTG-Sub
LuaSTG Sub v0.18.8-beta
This is an emergency fix update
WARNING: This update contains breaking changes
- v0.18.8-beta
- Fixed: keyboard and mouse input blocked when the program is under heavy load
- Add: when loading files from the Windows file system, additionally check whether the file path case matches, if not the load fails
这是一个紧急修复更新
警告:本次更新包含破坏性更改
- v0.18.8-beta
- 修复:当程序处于高负载下时,键盘和鼠标输入被阻塞
- 新增:从 Windows 文件系统加载文件时,额外检查文件路径大小写是否匹配,如果不匹配则加载失败
LuaSTG Sub v0.18.7-beta
- v0.17.4-beta
- Fixed: large number of duplicate vertex calculations and copy operations occur in curve laser rendering
- Add: function overloading
lstg.BentLaser:Update(x, y, rot, node_count, width) - Add: new function
lstg.BentLaser:RenderCollider(color) - Fixed: display mode not correctly matched when launching in exclusive fullscreen
- v0.18.0-beta
- Fixed:
lstg.ParticleSystem:Update(delta, x, y)delta parameter not being applied correctly - Other foundational changes (see git commit history)
- Fixed:
- v0.18.1-beta
- Add:
randomlua extension library, contains multiple families/types of random number generators (see the documentation in the doc folder for details) - Change:
lstg.ParticleSystemnow using RNGxoshiro128+
- Add:
- 0.18.2-beta
- Add: support for DDS texture files, using BC3 (DXT5) format can reduce the size of the video memory required by the texture to 1/4
- 0.18.3-beta
- Fixed: the color space was incorrectly handled when loading some png images, resulting in a darker rendered image
- Add:
utf8lua standard library (from lua 5.4)
- 0.18.4-beta
- Add: experimental class
lstg.Meshand experimental functionlstg.RenderMesh(see the documentation in the doc folder for details)
- Add: experimental class
- 0.18.5-beta
- Add: experimental function
lstg.SetTextureSamplerState(see the documentation in the doc folder for details)
- Add: experimental function
- 0.18.6-beta
- Fixed: character
\ncauses rendering of text content to fail - Fixed: previous version of the modification caused the null pointer to crash the game
- Fixed:
lstg.PostEffectincorrectly applies the pixel shader causing the rendering to fail
- Fixed: character
- 0.18.7-beta
- Fixed: in some versions of Windows system (the current known version is Windows 7), the message loop is blocked unexpectedly, resulting in failure to obtain keyboard and mouse input
- v0.17.4-beta
- 修复:曲线激光渲染中出现大量重复顶点计算和复制操作,导致性能低下
- 新增:函数重载
lstg.BentLaser:Update(x, y, rot, node_count, width) - 新增:函数
lstg.BentLaser:RenderCollider(color) - 修复:以独占全屏启动时显示模式没有正确匹配
- v0.18.0-beta
- 修复:
lstg.ParticleSystem:Update(delta, x, y)没有正确处理 delta 参数 - 其他底层更改(参见 git 提交历史)
- 修复:
- v0.18.1-beta
- 新增:
randomLua 扩展库,包含多个类型/家族的随机数生成器(详情请查看 doc 文件夹下的文档) - 修改:
lstg.ParticleSystem现在使用随机数生成器xoshiro128+
- 新增:
- 0.18.2-beta
- 新增:支持 DDS 贴图文件,使用 BC3(DXT5)格式可以将贴图所需显存的大小减少到1/4
- 0.18.3-beta
- 修复:加载某些 png 图片时没有正确处理颜色空间,导致渲染出来的画面偏暗
- 新增:
utf8Lua 标准库(从 Lua 5.4 迁移过来)
- 0.18.4-beta
- 新增:实验性类
lstg.Mesh和实验性函数lstg.RenderMesh(详情请查看 doc 文件夹下的文档)
- 新增:实验性类
- 0.18.5-beta
- 新增:实验性函数
lstg.SetTextureSamplerState(详情请查看 doc 文件夹下的文档)
- 新增:实验性函数
- 0.18.6-beta
- 修复:字符
\n导致文本无法正常渲染出来 - 修复:上一个版本的修改导致空指针让程序崩溃
- 修复:
lstg.PostEffect没有正确设置像素着色器导致内容无法正常渲染
- 修复:字符
- 0.18.7-beta
- 修复:在某些版本的 Windows 系统(目前已知版本为 Windows 7)中,消息循环被意外阻塞,导致无法获取键盘和鼠标输入
LuaSTG Sub v0.17.3-beta
WARNING: More strict verification codes have been added in this update. If you find that the lua script reports more errors, it means that the previously written lua code has undefined behavior. Please try to fix them, it's not a problem with the engine.
- Fixed:
lstg.SetBoundconverts arguments to integers - Change: Strengthen the verification of the validity of the game object, and an error will be reported immediately when accessing the game object that has been Del/Kill
- Fixed: Enhanced detection of undefined behavior when rendering, trying to modify the
layerproperty in the game object'srendercallback will immediately report an error - Fixed: GameObject's
_speedand_angleproperties used float calculations resulting in a large loss of precision (LuaJIT using double as number type) - Add: Support for Windows 10 20H2+, Windows 11 dark system theme, currently only affects the window title bar
- Add: GameObjects can access bound particle effect instances through the property
rc(needs to be explicitly enabled, please check the documentation in the doc folder for details) - Add:
lstg.ParticleSystemDatais used to create a instance of ParticleSystem object (see the documentation in the doc folder for details) - Add:
xinput.isConnectedis used to determine whether the specified controller is connected - Change: XInput no longer receive input when the window focus is not obtained, preventing misoperation
- Change: Enhanced the detection of undefined behavior during rendering, the
lstg.SetPerspectivemethod strictly requires0 < znear < zfar, otherwise an error will be reported immediately - Fixed: The error report popup window is sometimes covered by the window
- Fixed: DPI awareness cannot be turned on when running on Windows 10 1607
- Change: The WAV library is replaced with dr_libs, which improves the compatibility of WAV files
- Add: support for FLAC audio files
Engine foundation changes:
- no longer use
fancy2d
In this update, a lot of code was rewritten, refactored, reorganized, and a lot of code was deprecated, removed. The reason for making so many changes is that LuaSTG Plus/Ex Plus/Sub has too much technical debt and left too much legacy code, and I wrote a lot very hacky code when migrating from Direct3D 9 to Direct3D 11. For the healthy growth of LuaSTG Sub, I spent a month reorganizing the code.
These changes may not be felt, but because the foundation C++ API has been redesigned, the performance will be slightly improved, and the code will be easier to maintain.
警告:本次更新中加入了更多严格的验证代码,如果发现 lua 脚本报错更多了,说明是以前编写的 lua 代码中有未定义行为。请尝试修复它们,这不是引擎的问题。
- 修复:
lstg.SetBound将传递的参数转换为整数 - 修改:加强了对游戏对象有效性的验证,访问已被回收的游戏对象会立即报错
- 修改:加强了对渲染时未定义行为的检测,试图在游戏对象的
render回调函数中修改layer属性时会立即报错 - 修复:游戏对象的
_speed和_angle属性使用 float 计算导致精度大量损失(LuaJIT 中浮点数是 double) - 新增:对 Windows 10 20H2+、Windows 11 暗色系统主题的支持,目前仅影响窗口标题栏
- 新增:游戏对象可以通过属性
rc访问绑定的粒子特效实例(需要显式开启该功能,详情请查看 doc 文件夹下的文档) - 新增:
lstg.ParticleSystemData用于创建粒子特效对象(详情请查看 doc 文件夹下的文档) - 新增:
xinput.isConnected用于判断指定手柄是否已连接 - 修改:XInput 不再在未获得窗口焦点时获取输入,防止误操作
- 修改:加强了对渲染时未定义行为的检测,
lstg.SetPerspective方法严格要求0 < znear < zfar,否则立即报错 - 修复:报错弹窗有时候会被窗口覆盖的问题
- 修复:运行于 Windows 10 1607 时 DPI 感知无法开启
- 修改:WAV 库更换为 dr_libs,提高对 WAV 文件的兼容性
- 新增:对 FLAC 音频文件的支持
引擎底层修改:
- 不再使用
fancy2d
在这次更新中,大量代码被重写、重构、重新组织,也有大量代码被废弃、移除。做出如此多的修改的原因是,LuaSTG Plus/Ex Plus/Sub 欠下了太多的技术债和留下了太多的历史遗留代码,以及我在从 Direct3D 9 迁移到 Direct3D 11 时编写了很多很 Hack 的代码。为了 LuaSTG Sub 的健康成长,我使用一个月时间重新整理了代码。
这些修改也许无法感受到,但是由于底层 C++ API 被重新设计,性能会有些许改善,而且代码维护起来更加轻松了。
LuaSTG Sub v0.16.0-beta
WARNING: Breaking Changes
Since the io library and os library are changed to use utf-8, the library functions mentioned below should be used with attention to encoding
Changes:
- Change: Lua standard library
iolibrary andoslibrary use utf-8 insteadio.open,io.popenos.execute,os.remove,os.rename,os.tmpname,os.getenv
- Add: new function
lstg.FileManager.DirectoryExist(path:string, also_check_archive:boolean)used to determine whether a directory exists - Add: function overloading
lstg.FileManager.FileExist(filepath:string, also_check_archive:boolean)replacelstg.FileManager.FileExistEx - Deprecated: function
lstg.FileManager.FileExistEx(still available, will be removed in the future) - Add: function overloading
lstg.FileManager.EnumFiles(searchpath:string, extend:string|nil, also_enum_archives:boolean)replacelstg.FileManager.EnumFilesEx - Deprecated: function
lstg.FileManager.EnumFiles(still available, will be removed in the future) - Fix: The engine crashes randomly when enum files or check whether a file exists
LuaSTG aex+ updated: LuaSTG aex+, see "更新日志.txt"
破坏性更改警告:
由于 io 库和 os 库改为使用 utf-8,下方提到的库函数在使用的时候要留意编码
更新日志:
- 修改:Lua 标准库
io库和os库改为使用 utf-8io.open,io.popenos.execute,os.remove,os.rename,os.tmpname,os.getenv
- 新增:函数
lstg.FileManager.DirectoryExist(path:string, also_check_archive:boolean)用于判断文件夹是否存在 - 新增:函数重载
lstg.FileManager.FileExist(filepath:string, also_check_archive:boolean)用于替代lstg.FileManager.FileExistEx - 废弃:函数
lstg.FileManager.FileExistEx(仍然可用,在未来会删除) - 新增:函数重载
lstg.FileManager.EnumFiles(searchpath:string, extend:string|nil, also_enum_archives:boolean)用于替代lstg.FileManager.EnumFilesEx - 废弃:函数
lstg.FileManager.EnumFiles(仍然可用,在未来会删除) - 修复:判断文件是否存在、枚举文件时引擎随机崩溃
LuaSTG aex+ 已更新:LuaSTG aex+,详见“更新日志.txt”
LuaSTG Sub v0.15.8-beta
更新日志:
- 重写:
lfs库,但是注意lfs库已经处于**“过时、不推荐、弃用”**的状态,应该避免使用 - 修改:
lfs库支持 UTF8,砍掉大多数不适合游戏引擎的功能,只保留lfs.mkdir、lfs.rmdir、lfs.dir、lfs.currentdir、lfs.chdir以及功能有限的lfs.attributes - 修改:
lfs.attributes只能获取mode和size信息,其中mode只剩下"file"、"directory"、"other"三种类型 - 修复(v0.15.7):进入了独占全屏,但是没完全进入
- 新增(v0.15.6):函数
lstg.GetVersionNumber():number, number, number用于获取引擎 major、minor、patch 版本号,比如 0, 10, 0 代表 0.10.0 - 新增(v0.15.6):函数
lstg.GetVersionName():string用于获取引擎友好版本名称,比如 "LuaSTG Sub v0.10.0-beta" - 新增(v0.15.6):
lstg.Input库,包含lstg.Input.Keyboard和lstg.Input.Mouse静态对象,提供获取输入状态的方法和按键码常量(请查看 doc 文件夹内的 API 文档) - 重写(v0.15.6):帧率(FPS)限速器,重写后应该能让游戏帧率更稳定(?有待测试)
Changes:
- Rewrite:
lfslibrary, but note that thelfslibrary is already in an "obsolete, not recommended, deprecated" state and should be avoided - Change:
lfssupports UTF8 now, cutting out most features not suitable for game engines, keep onlylfs.mkdir,lfs.rmdir,lfs.dir,lfs.currentdir,lfs.chdirand limited functionalitylfs.attributes - Change:
lfs.attributescan only getmodeandsizeinfo, andmodeonly has three types:"file","directory","other" - Fix (v0.15.7): not fully entering exclusive fullscreen
- Add (v0.15.6): new function
lstg.GetVersionNumber():number, number, numberused to get version number major, minor, patch of game engine, for example 0, 10, 0 represent 0.10.0 - Add (v0.15.6): new function
lstg.GetVersionName():stringused to get the engine friendly version name, for example "LuaSTG Sub v0.10.0-beta" - Add (v0.15.6):
lstg.Inputlibrary, includelstg.Input.Keyboardandlstg.Input.Mousestatic instance, provides key code constants and methods for obtaining input status (see API documentation in the doc folder) - Rewrite (v0.15.6): frame rate (FPS) limiter, should make the game frame rate more stable after rewriting (? need to be tested)
LuaSTG Sub v0.15.4-beta
更新日志:
- 新增:命令行参数
--log-window开启引擎日志窗口 - 新增:命令行参数
--log-window-wait让引擎日志窗口在程序退出后不会立即关闭 - 修复:模型加载错误
- 新增(v0.15.3):引擎日志窗口(目前似乎只能在 Windows 10 上正常显示,Windows 7 命令行似乎不支持 UTF8,会乱码)
- 修改(v0.15.2):替换 DirectInput 键鼠输入为窗口消息输入(因为微软官方文档标记 DirectInput 键鼠输入为弃用且不推荐)
- 修改(v0.15.1):函数重载
lstg.SetImageScale(img:string, scale:number) - 修改(v0.15.1):函数重载
lstg.GetImageScale(img:string):number - 新增(v0.15.1):函数
lstg.SetAnimationScale(ani:string, scale:number) - 新增(v0.15.1):函数
lstg.GetAnimationScale(ani:string):number
Changes:
- Add: command line argument
--log-window, enable engine log window - Add: command line argument
--log-window-wait, do not close the engine log window immediately after closing the program - Fixed: loading model error
- Add (v0.15.3): engine log window (may only work properly on windows10, on windows 7 utf-8 encoding may not supported and its encoding is broken)
- Change (v0.15.2): replace DirectInput keyboard and mouse input with window messages (because Microsoft official documentation marks it as deprecated and not recommended)
- Change (v0.15.1): new function overloading
lstg.SetImageScale(img:string, scale:number) - Change (v0.15.1): new function overloading
lstg.GetImageScale(img:string):number - Add (v0.15.1): new function
lstg.SetAnimationScale(ani:string, scale:number) - Add (v0.15.1): new function
lstg.GetAnimationScale(ani:string):number
LuaSTG Sub v0.15.0-beta
更新内容:
- 支持简易的模型渲染,支持加载 glTF 2.0 模型
- 重新添加:lstg.LoadModel
- 重新添加:lstg.RenderModel
changes:
- support simple model rendering, support loading glTF 2.0 models
- re-add: lstg.LoadModel
- re-add: lstg.RenderModel
LuaSTG Sub v0.14.1-beta
- fixed: repeatedly interrupting and playing the same sound effect many times in the same frame will cause the sound effect to play incorrectly (no sound)
LuaSTG Sub v0.14.0-beta
doc readme

