Closed Demonese closed 1 year ago
The canvas mode with fixed design/rendering resolution is actually used in many 2D games (such as galgame) and dnh engine. Its characteristic is that the canvas size is fixed and the rendering resolution is fixed. It is not aware of, and has nothing to do with, platform-dependent window sizes, display settings, etc.
Since the change is too large, it may involve changes in a large number of engine components and a huge change in the Lua API. It is planned to create a new branch to implement this feature.
Design:
Progress:
固定设计/渲染分辨率的画布模式其实在很多 2D 游戏(比如 galgame)和弹幕风中都有使用,其特征为,画布大小固定,渲染分辨率固定,且对平台相关的窗口大小、显示设置等无感知,也与它们无关。
由于该改动过于巨大,可能会涉及引擎大量组件的更改和 Lua API 的巨大变动,计划开一个新分支用来实现该特性。
设计上:
不再支持显式指定窗口大小,窗口大小也不再固定,允许自由调整大小3、在第 2 条失败的情况下,对于 Windows 8.1 及以上的系统,采用 DirectComposition 底层系统 API 进行全屏无边框窗口显示,以获得最高的效率(已放弃,它在 Windows 8.1 上并不比传统的全屏无边框窗口好)lstg.SetWindowed 允许运行时调用,且切换全屏显示模式时不再直接进入独占全屏模式,而是自动选择最优的全屏模式(暂时不改,维持 API 行为一致性)lstg.SetVsync 允许运行时调用(暂时不改,维持 API 行为一致性)lstg.SetResolution 允许运行时调用,且不再修改窗口大小,而是修改画布大小(暂时不改,维持 API 行为一致性)lstg.SetImageScale 不再支持修改全局渲染缩放(为了兼容,可以不抛出错误,而是打印警告)(暂时不改,维持 API 行为一致性)进度: