Skip to content

LuaSTG Sub v0.20.1

Latest
Compare
Choose a tag to compare
@Demonese Demonese released this 25 Jan 13:06
· 240 commits to master since this release

Welcome to Canvas Mode update

WARNING: This update contains breaking changes

Engine updates:

  • v0.20.1
    • Fix: Multiple rendering APIs do not report errors when they cannot find resources, but only write logs
  • v0.20.0
    • Change: Now Canvas Mode is core feature
    • Change: Now when calling the rendering related API, it will verify whether it is in the rendering state (in FrameFunc)
    • Add: Experimental lstg.PostEffectShader object
    • Add: Experimental lstg.PostEffect method overloading
    • Add: Now other .hlsli header files can be included in .hlsl through #include
  • v0.19.202
    • Fix: load fancy2d font will crash then engine
  • v0.19.201
    • Fix: If an error occurs when executing the launch script, program will crash silently
    • Change: When resizing the canvas, if in Exclusive Fullscreen mode, reconfigure Exclusive Fullscreen
    • Change: if the internally used mode is Exclusive Fullscreen, when leaving fullscreen mode, reconfigure SwapChain
  • v0.19.200
    • Change: Initially merge the window message thread and update & render thread, which has an imperceptible impact on game performance, but makes the engine easier to maintain
    • Fix: if the internally used mode is Exclusive Fullscreen, when leaving fullscreen mode, the window layout will not restore successfully
    • Change: Improved scoring of refresh rates for enumerated display modes when using exclusive fullscreen mode, which can theoretically reduce the possibility of choosing an unsuitable refresh rate
  • v0.19.108
    • Update some third-party libraries
    • Change: On Windows 10/11, Desktop Composition Engine is disabled for some older devices for performance reasons
  • v0.19.107
    • Update some third-party libraries
    • Change: On Windows 10/11, Exclusive FullScreen using modern FLIP swapchain model (DXGI_SWAP_EFFECT_FLIP_DISCARD)
  • v0.19.106
    • Add: Window and Exclusive FullScreen mode
    • Change: Strict check on compatibility of Desktop Composition Engine, especially Multi-Plane Overlay compatibility
    • Change: On Windows 10/11, if the compatibility of the Desktop Compositing Engine does not meet the requirements, Window and Exclusive FullScreen mode are preferred, and if failed, fallback to Window and Borderless Window FullScreen
  • v0.19.105
    • Change: The file name of this version is revert to LuaSTGSub.exe
    • Change: Undo disabling of Desktop Composition Engine
  • v0.19.104
    • Change: The file name of this version is LuaSTGSub.EFS.exe
    • Change: Desktop Composition Engine is disabled in this version for testing.
    • Add: Window (Legacy) and Exclusive FullScreen mode
  • v0.19.103
    • Fix: The state of window at engine startup
    • Add: Now we can enter/leave fullscreen mode through lstg.ChangeVideoMode
    • Add: lstg.ChangeVideoMode and Alt+Enter share fullscreen state
    • Change: On Desktop Composition Engine mode, use more stable triple buffer
    • Change: On Desktop Composition Engine mode, enable low latency presentation
    • Change: On Window and Borderless Window FullScreen mode, use more stable triple buffer
    • Change: On Window and Borderless Window FullScreen mode, enable low latency presentation
    • Fix: Desktop Compositing Engine mode will scaling game canvas through point samplers on older devices
  • v0.19.102
    • Fix: Dead ImGui mouse input position and rendering viewport size
    • Change: Slightly improve the performance of call to Desktop Composition Engine
  • v0.19.101
    • Fix: lstg.GetMousePosition return the wrong value after launch
    • Add: Desktop Composition Engine mode
  • v0.19.100
    Initial support for canvas mode
    • Add: Canvas Mode, rendering resolution no longer bind to window size
    • Add: The Canvas will automatically be letter boxing renderering to the window or monitor.
    • Change: The mouse positions are mapped to the canvas coordinate
    • Add: Window and Borderless Window FullScreen mode
    • Add: Window (Legacy) and Borderless Window FullScreen (Legacy) mode
    • Change: Support free window size adjustment in window mode
    • Change: Support to enter/leave fullscreen mode through Alt+Enter
    • Remove: Enter/leave fullscreen mode through Ctrl+Enter
  • v0.19.8
    • Change: If an unrecoverable error occurs when updating (FrameFunc), rendering (RenderFunc) will not call to prevent error propagation
  • v0.19.7
    • Change: When the Desktop Window Manager (DWM) optimization is enable, enable triple buffering to make frame rate more stable
    • Change: When the Desktop Window Manager (DWM) optimization is enable, the present queue is automatically reset, and outdated image buffers are discarded
    • Change: Add Wait data in the Frame Statistics interface to visualize the waiting time of the frame rate controller
    • Fix: lfs.dir enumerates not the file/folder name but the relative path of the file/folder
  • v0.19.6
    • Change: Prevent the window from being squashed when it is too large (width or height is larger than the screen)
    • Change: If the operating system does not meet the minimum requirements (Windows 7 SP1 With Platform Update), an error window will pop up
    • Change: DirectWrite extension use rounded edges when generating stroke fonts to avoid stroke burrs on some fonts
    • Change: When the following conditions are met, the Desktop Window Manager (DWM) optimization is automatically turned on to deal with the problem that the performance of the traditional windowing mode is reduced after a certain update of Windows 10:
        1. Windows 10 1709+
        1. present allow tearing (DXGI_FEATURE_PRESENT_ALLOW_TEARING) (check engine.log to confirm whether your device supports it)
    • Add: 现在 engine.log 中会记录窗口焦点是被哪个窗口抢走的,用来抓流氓程序
    • Change: When the rendering API is called outside of RenderFunc, the device loss will be triggered, and the device loss event will also be recorded in engine.log. Developers should consciously check engine.log for device loss errors during development
  • v0.19.5
    • Add: Experimental function, which allows switching graphics card at runtime. For details, please see the API document in the doc folder
  • v0.19.4
    • Fix: lstg.PostEffect didn't check whether the parameter is correct
  • v0.19.3
    • Change: If a resource with the same name already exists when LoadMusic, skip loading and "do not stop" to correctly simulate the old behavior

Other updates:

  • Updated sample code
  • Updated documentation under doc folder

迎接画布模式更新

警告:本次更新包含破坏性更改

引擎更新:

  • v0.20.1
    • 修复:多个绘制 API 在找不到资源时不报错而只是打印 log 的问题
  • v0.20.0
    • 修改:画布模式提升为核心功能
    • 修改:现在调用绘制相关的 API 时会校验是否处于渲染状态(FrameFunc 范围内)
    • 新增:实验性 lstg.PostEffectShader 对象
    • 新增:实验性 lstg.PostEffect 方法重载
    • 新增:现在 hlsl 中可以通过 #include 包含其他 hlsli 头文件
  • v0.19.202
    • 修复:加载 fancy2d 字体会导致引擎崩溃
  • v0.19.201
    • 修复:执行 launch 脚本时如果出现错误,会导致整个程序闪退
    • 修改:调整画布尺寸时,如果处于独占全屏模式,则重新配置独占全屏
    • 修改:如果内部使用的模式为独占全屏,离开全屏模式时,重新配置交换链
  • v0.19.200
    • 修改:初步合并窗口消息线程和更新渲染线程,这对游戏性能影响难以察觉,但是能让引擎更易于维护
    • 修复:离开全屏模式时,如果内部使用的模式为独占全屏,窗口布局将无法正常还原
    • 修改:改进使用独占全屏模式时,对枚举得到的显示模式的刷新率的评分,理论上可以降低选择到不适合的刷新率的可能性
  • v0.19.108
    • 修改:Windows 10/11 上,由于性能原因,对某些旧设备禁用桌面合成引擎
  • v0.19.107
    • 修改:Windows 10/11 上,独占全屏使用快速交换模式(DXGI_SWAP_EFFECT_FLIP_DISCARD)
  • v0.19.106
    • 新增:窗口和独占全屏模式
    • 修改:对桌面合成引擎兼容性进行更严格的检查,特别是多平面叠加支持情况
    • 修改:Windows 10/11 上,若桌面合成引擎的兼容性不满足要求,则优先使用窗口和独占全屏模式,再失败则使用窗口和无边框窗口全屏模式
  • v0.19.105
    • 修改:可执行文件名称改回 LuaSTGSub.exe
    • 修改:取消禁用桌面合成引擎模式
  • v0.19.104
    • 修改:可执行文件名称临时改为 LuaSTGSub.EFS.exe
    • 修改:临时禁用了桌面合成引擎以便于测试独占全屏
    • 新增:窗口(旧版)和独占全屏模式
  • v0.19.103
    • 修复:引擎启动时窗口的状态
    • 新增:现在可以通过 lstg.ChangeVideoMode 进入、离开全屏模式
    • 新增:lstg.ChangeVideoMode 和 Alt+Enter 共享全屏模式状态
    • 修改:桌面合成引擎模式下,使用三重缓冲(BufferCount=3)
    • 修改:桌面合成引擎模式下,使用帧延迟可等待对象(DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT)
    • 修改:窗口和无边框窗口全屏模式下,使用三重缓冲(BufferCount=3)
    • 修改:窗口和无边框窗口全屏模式下,使用帧延迟可等待对象(DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT)
    • 修复:桌面合成引擎模式在较老的设备上通过邻近采样器缩放画面的问题
  • v0.19.102
    • 修复:Dear ImGui 获取的鼠标坐标和渲染的视口尺寸
    • 修改:稍微提升了桌面合成引擎模式下的性能
  • v0.19.101
    • 修复:启动后鼠标位置获取失败,调整一次窗口尺寸后恢复正常
    • 新增:桌面合成引擎模式
  • v0.19.100
    • 新增:画布模式,让渲染分辨率与呈现模式不再有关
    • 新增:画布会自动地内接等比放大显示到窗口或显示器上
    • 修改:鼠标坐标映射到画布坐标系
    • 新增:窗口和无边框窗口全屏模式
    • 新增:窗口(旧版)和无边框窗口全屏(旧版)模式
    • 修改:窗口模式下支持自由调整窗口尺寸、贴靠布局、最大化
    • 新增:通过 Alt+Enter 快捷键切换全屏模式
    • 移除:通过 Ctrl+Enter 快捷键切换独占全屏模式
  • v0.19.8
    • 修改:若更新(FrameFunc)时出现无法恢复的错误(弹窗报错),不再继续渲染(RenderFunc),以阻止错误传播
  • v0.19.7
    • 修改:开启桌面窗口管理器(DWM)优化时,启用三重缓冲让帧率更平稳
    • 修改:开启桌面窗口管理器(DWM)优化时,自动重置呈现队列,丢弃过时的画面缓冲区
    • 修改:Frame Statistics 界面添加 Wait 项,用于可视化帧率控制器的等待时间
    • 修复:lfs.dir 枚举得到的不是文件/文件夹名而是文件/文件夹相对路径的问题
  • v0.19.6
    • 修改:阻止窗口过大(宽度或高度比屏幕大)时被压扁
    • 修改:如果操作系统不满足最低需求(Windows 7 SP1 With Platform Update)则弹窗报错
    • 修改:DirectWrite 拓展生成描边字体时使用圆角边缘,避免在某些字体上出现描边毛刺
    • 修改:当满足以下条件时,自动开启桌面窗口管理器(DWM)优化,以应对 Windows 10 某次更新后导致传统窗口化方式性能下降的问题:
      • 1、系统为 Windows 10 1709+
      • 2、支持立即刷新(可查看 engine.log 确认自己的设备是否支持)
    • 新增:现在 engine.log 中会记录窗口焦点是被哪个窗口抢走的,用来抓流氓程序
    • 修改:在 RenderFunc 以外地方调用渲染命令时,将会引发设备丢失,在 engine.log 中也会记录设备丢失事件,开发者在开发时,应有意识地检查 engine.log 是否出现设备丢失的错误
  • v0.19.5
    • 新增:实验性功能,允许运行时切换显卡设备,详情请查看 doc 文件夹中的 API 文档
  • v0.19.4
    • 修复:lstg.PostEffect 没有检查参数是否错误的问题
  • v0.19.3
    • 修改:LoadMusic 时,如果同名资源已存在,则跳过加载,且“不停止播放”,以正确模拟以前的行为

其他更新:

  • 更新了附带的样例代码
  • 更新了 doc 文件夹下的文档