Difficult-Rocket

(WIP)Difficult Rocket by Python

MPL-2.0 License

Stars
33
Committers
11

Bot releases are hidden (Show)

Difficult-Rocket - 0.9.2.0 ! oreui 来力! Latest Release

Published by shenjackyuanjie 3 months ago

现在有 oreui 的按钮啦!
好耶

image

recording

Difficult-Rocket - 0.9.0.0 新年快乐!

Published by shenjackyuanjie 10 months ago

DR game/DR rs 0.3.x 更新日志

20231224 DR rs 0.3.0

感谢 @InfyniteHeap 进行的重构工作

  • 重构了 Rust 部分的文件结构

  • 去除了早期的 serde-xml-rsxml-rs 依赖

    • 这是因为之前 quick-xml 在解析 Option<Vec<T>> 有问题
    • 现在问题解决了
    • 以及 quick-xml 的解析方式更符合规范 ( 或者说更明确 )
  • 将所有的 logging 去除

    • 改为 lib-not-dr.loggers
  • 现在飞船保存测试的命令叫作 save

DR sdk 0.9.0.0

Changes

  • api.screen.BaseScreen
    • on_draw
      • self, window: ClientWindow -> self, dt: float, window: ClientWindow
      • dt 为上一帧到这一帧的时间间隔
      • dt is the time interval from the last frame to this frame

Rename

  • Api_version -> api_version
  • _DR_Status -> _DRStatus
    • name = DR Option -> DR Status
    • 这毛病属实是没想到, 之前一直没发现

Rework

  • logging 的依赖改为 lib_not_dr.loggers
    • 以后都用 lib_not_dr 的 logger 了
    • Change the dependency of logging to lib_not_dr.loggers
    • Use lib_not_dr logger in the future

Add

  • 添加内置依赖: lib-not-dr
    • Added built-in dependency: lib-not-dr
    • 不再同时维护两份代码
    • No longer maintain two sets of code at the same time

Fix

  • 如果没有 DR_game 的情况下, 退出时会 join 控制台线程
    • 通过检测线程是否是守护线程来判断是否 join
    • If there is no DR_game, join the console thread when exiting
      • Determine whether to join by detecting whether the thread is a daemon thread

Dependency

  • 更新了所有的依赖版本号
    • 去看 requirements.txt
  • Updated all dependency version numbers
    • Go see requirements.txt
  • 去除了 rtoml 的依赖
    • 改为 tomlitomlkit 组合
  • Removed rtoml dependency
    • Change to tomli and tomlkit combination
  • 删除了 requirement-xxx.txt
    • 现在使用 gen_require.py 0/1/2 来先生成然后安装依赖
    • python gen_require.py 0 ( 运行 / run only )

    • python gen_require.py 1 ( 构建 / build )

    • python gen_require.py 2 ( 开发 / develop )

    • gen_require.py 会在 requirements.txt 中生成依赖
  • Delete requirement-xxx.txt
    • Now use gen_require.py 0/1/2 to generate and install dependencies
    • python gen_require.py 0 ( run only )

    • python gen_require.py 1 ( build )

    • python gen_require.py 2 ( develop )

    • gen_require.py will generate dependencies in requirements.txt
Difficult-Rocket - 0.8.7.2 0.8最后一版 更新了一大堆东西

Published by shenjackyuanjie 10 months ago

(文件是 0.8.7.3 但是内容还是 0.8.7.2

DR sdk 0.8.7.2

Add

  • assets/fonts
    • unifont.otf
      • unifont v 15.1.02

Translate key

  • Add
    • client
      • load.font
        • start
        • file
        • error
        • use_time

Enhance

  • client.pyglet_load_fonts_folder
    • 现在使用 os.walk 遍历文件夹
    • 使用 tr 进行日志记录

DR sdk 0.8.7.1

Add

  • BaseScreen
    • 现在继承了 Options
    • 添加了 name 选项来识别名称
    • Now inherits Options
    • Added name option to identify name
  • gui.widget.PressTextButton
    • 作为 gui 的一部分
    • 依然在测试阶段
    • 有人发现 bug 请务必发 issue, 十分感谢
    • As part of gui
    • Still in the testing phase
    • If you find a bug, please be sure to issue it, thank you very much

DR sdk 0.8.7.0

Add

  • 添加了 Difficult_Rocket.utils.camera.GroupCamera
    • Difficult_Rocket.utils.camera.CenterGroupCamera
    • 实际上就是使用 pyglet.graphics.Group 来实现的 Camera
    • 具有相同的功能
    • 顺便同样在 api.camera 里添加了导出
      • 这次我一定不会再忘记导出了
    • Added Difficult_Rocket.utils.camera.GroupCamera
    • And Difficult_Rocket.utils.camera.CenterGroupCamera
    • Actually, it is implemented Camera using pyglet.graphics.Group
    • Has the same function
    • By the way, the export was also added in api.camera
      • This time I will never forget to export it again
  • 为所有 xxCamera 添加了
    • reset 方法
    • 用于一键重置缩放+平移
    • Added reset method for all xxCamera
      • Used to reset zoom + translation with one click
Difficult-Rocket - 0.8.6.0 code clean up and some bug fix

Published by shenjackyuanjie over 1 year ago

实际上最近的时间都去写 lib-not-dr 的指令树和应对期末考试

所以最近没多少更新

(好消息 期末考试年级第 16 班级第 4

DR sdk 0.8.6.0

重构了一下项目结构

Refactored the project structure

Fix

  • issue #42
    • Crash report 的时区不正确
      • Crash report time zone is incorrect

Change

  • 将大部分资源文件移动到 assets/
    • libs/fonts -> assets/fonts
    • configs/lang -> assets/lang
    • configs/xxx.xml -> assets/builtin/xxx.xml
    • textures -> assets/textures
    • Move all the resources to assets/

DR game 0.3.1.2 / 0.3.1.3

  • 加回了显示 delta 的那根线
    • Add back the line that displays delta

DR rs 0.2.15.2

Add

  • SR1PartData_rs
    • get_id -> IdType
    • get_x -> f64
    • get_y -> f64
    • get_activate -> bool
    • get_angle_v -> f64
    • get_explode -> bool

DR rs 0.2.15.1

Changes

  • types.rs & python.rs 利用可用的 Clippy 改进了代码
    • types.rs & python.rs improved the code with available Clippy

20230715 build 2.1.3.0

修改

  • 添加 email win32con smtplib win32evtlog win32evtlogutil win32api--no-follow-import
    • Add email, win32con, smtplib, win32evtlog, win32evtlogutil, win32api to --no-follow-import
  • include_data_dir 移除 libs/fonts textures
    • 改为 assetsconfig

Files:

  • DR 0.8.6.0 build for
    • Linux
    • MacOS
    • Windows
  • dr_game 0.3.1.3 package with
    • dr_rs 0.2.15.2 build for
      • cpython 3.8 amd64 windows
      • cpython 3.10 amd64 windows
      • cpython 3.11 amd64 windows
      • cpython 3.8 darwin
      • cpython 3.8 x86_64 linux-gnu
      • cpython 3.10 darwin
      • cpython 3.10 x86_64 linux-gnu
      • cpython 3.11 x86_64 linux-gnu
      • pypy 3.8 7.3 amd64 windows
      • pypy 3.9 7.3 amd64 windows
      • pypy 3.10 7.3 amd64 windows
Difficult-Rocket - 0.8.5.2 bugfix! for 0.8.5.0

Published by shenjackyuanjie over 1 year ago

DR sdk 0.8.5.2

Fix

  • crash 引用了已经重命名的 Difficult_Rocket.game_version (Difficult_Rocket.sdk_version)

DR sdk 0.8.5.1

API

  • CameraCenterCamera 添加到 Difficult_Rocket.api.camera
    • Add Camera and CenterCamera to Difficult_Rocket.api.camera

DR game 0.3.1.1

Fix

  • sr_tr 加载语言文件的路径并没有跟随目录名称改变
    • sr_tr does not follow the directory name change when loading the language file path

DR game 0.3.1.0

  • 使用 Difficult_Rocket.api.camera.Camera
    • Use Difficult_Rocket.api.camera.Camera class

Files:

  • DR 0.8.5.2 build for
    • Linux
    • MacOS
    • Windows
  • dr_game 0.3.1.1 package with
    • dr_rs 0.2.15.0 build for
      • cpython 3.8 amd64 windows
      • cpython 3.10 amd64 windows
      • cpython 3.11 amd64 windows
      • cpython 3.8 darwin
      • cpython 3.8 x86_64 linux-gnu
      • cpython 3.10 darwin
      • cpython 3.10 x86_64 linux-gnu
      • cpython 3.11 x86_64 linux-gnu
      • pypy 3.8 7.3 amd64 windows
      • pypy 3.9 7.3 amd64 windows
      • pypy 3.10 7.3 amd64 windows
Difficult-Rocket - 0.8.5.0 code clean up with new render on drgame

Published by shenjackyuanjie over 1 year ago

DR sdk 0.8.5.0

Changes

  • Difficult_Rocket.__init__
    • 重命名 / Rename
    • game_version -> sdk_version
  • ModManager
    • get_mod_module(mod_name: str) -> Optional[ModInfo]
      • 通过 mod 名称获取 mod 的信息
      • Get mod information by mod name
    • load_mod(mod_path: Path) -> Optional[ModInfo]
      • 加载指定路径的 mod
      • Load the mod at the specified path
    • find_mods_in_path(extra_mods_path: Optional[List[Path]]) -> List[Path]
      • 在指定的路径中查找 mod 并返回 mod 的路径
      • Find mods in the specified path and return the path of the mod
    • unload_mod(mod_id: str, game: Game) -> Optional[ModInfo]
      • 卸载指定的 mod 并返回 mod 的信息
      • Unload the specified mod and return the mod information
    • reload_mod(mod_id: str, game: Game)
      • 重新加载指定的 mod
      • Reload the specified mod

Remove

  • DR.client.guis.widget.InputBox
    • 没用了 TextEntry 已经好了 可以直接用了
    • Use Less, the TextEntry is ok to use

Command

  • mods
    • list
      • 列出所有已加载的 mod
      • List all loaded mods
    • reload <mod_id>
      • 重新加载指定的 mod
      • Reload the specified mod

DR sdk 0.8.4.1

Add

  • utils.camera
    • Camera
      • 一个 2D 摄影机,可以用于高效变换渲染坐标
    • CenterCamera
      • 一个中心对器的 2D 摄影机,可以用于高效变换渲染坐标

DR rs 0.3.0.0

修改

  • 适配了 DR sdk 的关于 mods 的修改
    • Adapted the modification of mods about DR sdk
  • RustConsole
    • 现在输入体验更好了
    • Now the input experience is better

DR rs 0.2.15.0

修改

  • 现在支持新的 mods reload 和 unload 了
    • 适配了 DR sdk 的关于 mods 的修改
    • Now support new mods reload and unload
      • Adapted the modification of mods about DR sdk

添加

  • IdType = i64
    • 统一的 id 类型
    • Unified id type
  • PySR1Ship
    • get_connection -> Vec<(i32, i32, IdType, IdType)>
      • 获取飞船的连接信息
      • Get the connection information of the ship

DR rs 0.2.14.0

删除

  • 删除了多个 xml 测试读取函数
    • Remove multiple xml test read functions

改进

  • 改进了 xml writer 的 SR1Ship 写入
    • Improve the xml writer's SR1Ship write

DR game 0.2.1.0

修改

  • sr1_ship 中的 Camera_rs 改为 Difficult_Rocket.utils.camera.Camera
    • Change Camera_rs in sr1_ship to Difficult_Rocket.utils.camera.Camera
  • 添加了部件的连接线(都是彩色哒)
    • Add the connection line of the part (all are colored)

DR rs 0.2.13.0

删除

  • 删除了 render.rs
    • 没必要拿 rust 写这玩意(
    • DR gamecamera 代替
    • Delete render.rs
      • No need to write this thing with rust (
      • Use DR game's camera instead

添加

  • 添加了 基于 quick-xml::writer::Writer 的 xml SR1Ship 写入
    • 折磨啊啊啊啊啊啊啊啊
    • Add xml SR1Ship write based on quick-xml::writer::Writer
      • Torture ah ah ah ah ah ah ah ah

DR rs 0.2.12.0

添加

  • 添加了 xml 的读取测试
    • Add xml read test

DR game 0.1.2.0

修改

  • 现在渲染飞船的时候不会再显示那个白色框了
    • 改为一个彩色的框
  • Now, the ship will not be displayed in the white box
    • Change to a colored box

DR rs 0.2.11.0

添加

  • Python::data::PySR1Ship
    • get_part_box(&self, part_id: i64) -> Option<(f64, f64), (f64, f64)>
      • 用于获取对应 id 的实际碰撞箱

DR game 0.2.0.0

适配

  • 适配了 DR_sdk 0.8.3.0 的修改

DR game 0.1.1.0

添加

  • types.py
    • DR.api.types.SR1 中移动过来

新功能

  • console.py
    • 基于 PyConsole
    • 用于替换 DR sdk 的默认控制台方法

20230630 build 2.1.1.0

修改

  • 现在本地构建会根据系统名称修改输出目录
    • 例如
      • Windows 上构建会输出到 build\nuitka-windows
    • Now the local build will modify the output directory according to the system name
      • For example
        • Build on Windows will output to build\nuitka-windows

Files:

  • DR 0.8.5.0 build for
    • Linux
    • MacOS
    • Windows
  • dr_game 0.3.0.0 package with
    • dr_rs 0.2.15.0 build for
      • cpython 3.8 amd64 windows
      • cpython 3.10 amd64 windows
      • cpython 3.11 amd64 windows
      • cpython 3.8 darwin
      • cpython 3.8 x86_64 linux-gnu
      • cpython 3.10 darwin
      • cpython 3.10 x86_64 linux-gnu
      • cpython 3.11 x86_64 linux-gnu
      • pypy 3.8 7.3 amd64 windows
      • pypy 3.9 7.3 amd64 windows
      • pypy 3.10 7.3 amd64 windows
Difficult-Rocket - 0840 some remake and translate update

Published by shenjackyuanjie over 1 year ago

DR sdk 0.8.4.0

Fix

language

  • 去除了 dr_game 相关的键值
    • 现在这些键值已经在 dr_game 自己的语言文件中了
    • Removed the key values related to dr_game
      • Now these key values are in the language file of dr_game itself
  • 将 mod 加载部分的键值独立出来
    • 这样调用起来更方便一些
    • Separate the key values of the mod loading part
      • This makes it easier to call

修改

  • utils.translate
    • Tr
      • 现在支持自定义语言文件的路径了
        • lang_path
      • 用于给 mod 加载自己的语言文件
  • 现在 logging 的配置转移到 __init__ 中了
    • 保证调用 logging 的时候可以正常使用
    • Now the configuration of logging is moved to __init__
      • Ensure that logging can be used normally when called
  • 现在输入命令之后不会输出一个 True/False
    • (实际上是用来检测命令是不是用 / 开头的)
    • Now, the command will not output a True/False
      • (Actually used to detect whether the command starts with /)
  • CommandText
    • find
      • 现在会先用 str.startswith 检测是否以要求的字符串开头
        • 实际上就是丐版 re.match
      • 并且会在匹配上之后 如果匹配内容后面第一个字符是空格 则会截取掉空格
      • Now, it will first use str.startswith to detect whether it starts with the required string
        • Actually a poor version of re.match
      • And after matching, if the first character after the matching content is a space, the space will be intercepted

What's Changed

Full Changelog: https://github.com/shenjackyuanjie/Difficult-Rocket/compare/0.8.3.0...0.8.4.0

Difficult-Rocket - 0.8.3.0 bug fix and rework (breaking changes)

Published by shenjackyuanjie over 1 year ago

What's Changed

Full Changelog: https://github.com/shenjackyuanjie/Difficult-Rocket/compare/0.8.2.0...0.8.3.0

DR game 0.2.0.0

适配

  • 适配了 DR_sdk 0.8.3.0 的修改

DR sdk 0.8.3.0

删除

  • pyglet_rs
    • 事实证明这玩意没啥用
    • Removed pyglet_rs

Fix

添加

  • DR_status
    • 实际上就是 DR_runtime
    • DR_runtime -> DR_status
    • client_running
      • 客户端是否在运行
      • Is client running
    • server_running
      • 服务器是否在运行
      • Is server running
  • Mod loader
    • 添加了对支持版本号的 warnings
    • Added warnings for supporting version numbers

移动

  • Difficult_Rocket.DR_runtime
    • DR_version -> DR_status.DR_version
    • API_version -> DR_status.API_version
    • Build_version -> DR_status.Build_version
    • default_language -> DR_status.default_language

删除

  • Diffiuclt_Rocket.long_version
    • 不再使用整数标记版本号 (反正 Version 有一个完整的版本号比较机制)
    • No longer use integer to mark version number (since Version has a complete version comparison mechanism)
  • Difficult_Rocket.DR_rust_available
    • 似乎我忘记删掉这个 DR_rs 的耦合了
long_version: int = 15
"""
long_version: 一个用于标记内部协议的整数
15: 完全移除 DR_rust 相关内容 解耦完成
14: BaseScreen 的每一个函数都添加了一个参数: window: "ClientWindow"
13: 为 DR_runtime 添加 API_version
12: 去除 DR_runtime 的 global_logger
    要 logging 自己拿去(
11: 为 DR_option  添加 use_DR_rust
    修复了一些拼写错误
10: 为 DR_runtime 添加 DR_Rust_get_version
9 : 为 DR_option  添加 pyglet_macosx_dev_test
8 : 为 DR_runtime 添加 DR_rust_version
    为 DR_option  添加 DR_rust_available
    以后就有 DR_rust 了
7 : 为 DR_option 添加 std_font_size
6 : 事实证明, 不如直接用int
5 : 添加 build_version 信息,用于标记编译文件版本,
    游戏版本改为四位数,终于有一个可以让我随便刷的版本号位数了
4 : 把 translate 的字体常量位置改了一下,顺便调换顺序
3 : 就是试试改一下,正好 compiler 要用
2 : 哦,对 longlong 好耶!
1 : 我可算想起来还有这回事了 v0.6.4
"""

files:

  • DR 0.8.3.0 build for
    • Linux
    • MacOS
    • Windows
  • dr_game 0.2.0.0 package with
    • dr_rs 0.2.10.1 build for
      • cpython 3.8 amd64 windows
      • cpython 3.10 amd64 windows
      • cpython 3.11 amd64 windows
      • cpython 3.8 darwin
      • cpython 3.8 x86_64 linux-gnu (not sure can use)
      • cpython 3.10 darwin
      • cpython 3.10 x86_64 linux-gnu
      • cpython 3.11 x86_64 linux-gnu
      • pypy 3.8 7.3 amd64 windows
      • pypy 3.9 7.3 amd64 windows
      • pypy 3.10 7.3 amd64 windows
Difficult-Rocket - 0.8.2.0

Published by shenjackyuanjie over 1 year ago

#27 啊啊啊啊啊啊啊 WHY FIX ISSUE AFTER RELEASE

Full Changelog: https://github.com/shenjackyuanjie/Difficult-Rocket/compare/0.8.1.0...0.8.2.0

DR sdk 0.8.2.0

Fix

Difficult-Rocket - 0.8.1.0 bug fix and build improvement

Published by shenjackyuanjie over 1 year ago

What's Changed

Fix

#24

Full Changelog: https://github.com/shenjackyuanjie/Difficult-Rocket/compare/0.8.0.1...0.8.1.0

DR sdk 0.8.1.0

删除

  • api.types.SR1
    • 移动到 dr_game

添加

  • api.types
    • 添加 Version (libs.MCDR.version.Version)
  • Difficult_Rocket.api.types.Options
    • str_option
      • 获取一个所有键、值都是 builtin 类型的字典
      • 可以用于写入文件
    • __str__
    • __repr__
      • Options 可以被 print 打印

修复 Bug

  • 自带的 console 类在 get_command 时 没有检查是否为空

20230611 build 2.1.0.0

添加

  • 现在会在每个平台上自动排除其他平台的 pyglet 兼容模块
    • 例如
      • Windows--no-follow-import pyglet.libs.x11
    • 大幅提升编译效率
    • 缩短编译时间

20230609 build 2.0.0.0

Breaking Change

  • 将构建脚本生成方式改为通过 libs/utils/nuitka.py 生成
  • GitHub Actions 也使用相同脚本构建

DR game 0.1.1.0

添加

  • types.py
    • DR.api.types.SR1 中移动过来

新功能

  • console.py
    • 基于 PyConsole
    • 用于替换 DR sdk 的默认控制台方法

DR rs 0.2.10.1

types.rs

  • 兼容了 Option<Vec<Step>>sr1_data.rs
    • Vec<Step> -> Option<Vec<Step>>

Bug 修复

  • #24 无法解析 带 staging 不带 steps的飞船

DR rs 0.2.10.0

python::PySR1PartType

  • 添加可从 Python 端获取的部件信息
    • get_descriptiton -> String
      • 部件描述 (Part description)
    • get_sprite -> String
      • 部件贴图 (Part sprite)
    • get_width -> u32
      • 部件宽度 (Part width)
    • get_height -> u32
      • 部件高度 (Part height)
    • get_friction
      • 部件摩擦系数 (Part friction)
    • get_hidden
      • 部件是否隐藏 (Part hidden)

DR rs 0.2.9.3

sr1_data

  • inflation
    • Option<bool> -> Option<f64>

Bug 修复

  • #21 field: "missing field Activate"

DR rs 0.2.9.2

Bug 修复

  • #20 <DisconnectedParts/>

DR rs 0.2.9.1

实现

  • types::sr1::get_max_box
    • 部分实现
  • types::math::Rotatable
    • 添加了 mut 版方法

DR rs 0.2.9.0

新功能

  • python::console::PyConsole
    • 一个基于 std::thread 的多线程控制台
    • GIL 我谢谢你
    • 用于替换 DR sdk 的默认控制台方法
      • A multi-thread console based on std::thread
      • Used to replace the default console method of DR sdk

Bug 修复

  • #19 BorrowMutError
Difficult-Rocket - pre release for 0.8.0.1

Published by shenjackyuanjie over 1 year ago

What's Changed

Issue Fixed

#19
#20
#21
#22

Full Changelog: https://github.com/shenjackyuanjie/Difficult-Rocket/compare/0.8.0.0...0.8.0.1

Difficult-Rocket - big update

Published by shenjackyuanjie over 1 year ago

也许能用?

————废话分割线————

这回真的更新了好多东西

update logs的搬运(

20210928 V 0.5.2

Change

  • now bin folder use the name Difficult_Rocket
  • now test files no longer have _test_ prefix
  • now will always use local pyglet
    • may change later
  • fitting pypy3.10 (well······ not success (because OpenGL, blame it))
  • now crash-report have more information
  • now when pressed, the sprite will rotate randomly
  • now pyglet.app.run() use multiprocess
  • now will allways use libs/ lib when using pyglet or json5
  • now tools.config() is tools.load_file()
  • now lang file have server``client and window

Add

  • mods support will be done in 1.0.0
    • just maybe
  • now you can use DEBUGGING to test or check game run stats
    • when True it will always make a crash report
  • now Difficult_Rocket.api.translate.Lang can be used to auto translate text in configs/lang/xxx.json5
    • you can use translate.tr[xxx] to use translated info
    • and use .format to format info's {}
    • if translate is not found, Lang will try to find translate in default language translate
    • (witch was zh-CN)
  • crash now have more information about multiprocess
  • add some unused read_input in client
  • now when logs/ is not found logger will info logger.mkdir

DEBUG

  • now version on the window will be 0.5.2

Delete

  • now client.Client and server.Server only use net_mode option
  • api.new_thread have no more extra line of testing
  • configs/view.json5 now removed

Translate

  • add mouse.release and language to en-us
  • add language to zh-CN
  • add tr.lang(xx, xx) that can solve error on getting item from lang file
    • tr[xxx] can also use but won't solve error when item not found
    • so best use tr.lang(xx, xx)
Difficult-Rocket - command line comming!

Published by shenjackyuanjie over 1 year ago

20211025 V 0.6.0

Command Line Update!

Change

  • now Difficult Rocket will only fit python3.8+
    • because :=
  • now main crash report handler have new way to handler crash
  • now fonts' folder's name is HarmonyOS_Sans

Add

  • Difficult_Rocket.graphics.widgets.Parts
    • have many costume value
  • libs/fonts now have HarmonyOS_Sans font
  • handler of on_key_press and on_key_release and on_text
  • game.config config file
  • lang/en-us.json5 now up to date with lang/zh-CN.json5
  • translate/Lang.翻译 same as Lang.lang
  • command/CommandLine to render command line
  • @new_thread now can option if log this thread to crash or not
  • start.cmd witch could debug easier

Translate

  • Add
    • window
      • message.text
      • command.text
      • text.motion
      • text.motion_select
      • setup.use_time_ns
      • fonts.found
      • game.input_stop
      • game.command_stop
      • game.window_stop
      • game.stop_get
      • game.stop
      • game.end
    • client
      • setup.use_time_ns

Command

  • now you can press t to call out a message window
    • or press / to open command line
    • not done
    • useless until now
  • new command
    • /min_fps
      • get min fps in 5 second
    • /max_fps
      • get max fps in 5 second
    • /stop
      • stop the game
    • /default
      • switch window size to default size
Difficult-Rocket - 0.8.0.0 Mod Loading!

Published by shenjackyuanjie over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/shenjackyuanjie/Difficult-Rocket/compare/0.7.2.1...0.8.0.0

202305 DR 0.8.0.0 + DR_api 0.1.0.0 + DR_rs 0.2.7.0 + 15

啊哈! mod 加载来啦!

啊啊啊啊啊 大重构 api

现在控制台是 真 多线程了

DR_api 0.1.0.0

  • 大概是一个可用的版本了
  • ModInfo
    • on_load(game: Game, old_self: Optional[ModInfo]) -> bool
      • game: Game 对象 用于存储 DR SDK 的信息
      • old_self: 旧的 ModInfo 对象, 可以用于从上次加载中恢复信息
      • 返回值: 是否加载成功
    • on_client_start(game: Game, client: ClientWindow) -> None
      • game: Game 对象 用于存储 DR SDK 的信息
      • client: ClientWindow 对象 用于传递客户端状态
    • on_client_stop(game: Game, client: ClientWindow, source: str = 'window')
      • game: Game 对象 用于存储 DR SDK 的信息
      • client: ClientWindow 对象 用于传递客户端状态
      • source: 关闭调用的来源

DR_rs 0.2.7.0

  • __init__.py
    • 添加了 SR1Ship_rs 的 typing
      • name
      • description
      • lift_off
      • touch_ground
      • img_pos() -> Tuple[int, int, int, int]
  • 导出了 SR1Ship_rs
    • Exported SR1Ship_rs
  • types::SR1PartData
    • get_box(&self, part_type: &SR1PartType) -> (f64, f64, f64, f64)
  • types::SR1Ship
    • from_file
  • 添加了 Console_rs
    • 用于使用 Rust 多线程读取 stdin
    • Use Rust mutithread to read stdin

Remove

  • game.config
    • 已删除
    • Removed
  • DR_option & DR_runtime(long_version 15)
    • 完全移除 DR_rust 部分
      • Completely removed the DR_rust part
  • 现在 client 不会在 setup() 中调用 DR_runtimefind_mods() 方法
    • Now client will not call the find_mods() method of DR_runtime in setup()
  • Difficult_Rocket.crash
    • Remove write_options method
    • Remove write_markdown_tablet method
      • Replace with Option().as_markdown()
  • Difficult_Rocket.utils.new_thread
    • Moved to Diffiuclt_Rocket.utils.thread
  • Difficult_Rocket.utils.thread
    • Remove Threads

Changes

  • main.toml
    • game.mods.path
      • 存储 mod 的路径
        • Store the path of the mod
  • Difficult_Rocket.mod.MODInfo -> Difficult_Rocket.api.mod.ModInfo
    • 用于存储 mod 的信息
      • Used to store information about the mod
  • Difficult_Rocket.DR_runtime
    • 添加 mod_path: str 字段
    • 添加 DR_Mod_List: List[Tuple[str, Version]] 字段
    • 添加 load_mods() -> None 方法
    • 添加 find_mods -> List[str] 方法
      • Add mod_path: str field
      • Add DR_Mod_List: List[Tuple[str, Version]] field
      • Add load_mods() -> None method
      • Add find_mods -> List[str] method
  • 现在游戏崩溃时会自动在 stdio 中输出崩溃日志 内容跟 crash report 中的基本相同
    • Now when the game crashes, it will automatically output the crash log in stdio
      • The content of the crash log is basically the same as the crash report
  • utils.new_thread
    • 跟随 MCDR 的更新
    • 将记录线程的方式改成 函数回调
      • Follow the update of MCDR
      • Change the way to record threads to function callbacks
  • Difficult_Rocket.api
    • 大重构,移除定义,改为引用
      • Big refactoring, remove definition, change to reference
  • Difficult_Rocket.api.types.Options ( Difficult_Rocket.utils.options.Options )
    • options -> _options
    • option_with_len(self) ->
      • 修改 返回值 类型+类型注释
      • Modify the return value type + type annotation
      • List[Union[List[Tuple[str, Any, Any]], int, Any]]: -> Tuple[List[Tuple[str, Union[Any, Type], Type]], int, int, int]
  • Difficult_Roocket.main.Game
    • 使用 Options 完全重构
    • 分离 init mods init console init logger load_file
      • Completely refactored using Options
      • Separate init mods init console init logger load_file
  • Difficult_Rocket.command.api.CommandText
    • find -> re_find

Add

  • Difficult_Rocket.api.types.Options ( Difficult_Rocket.utils.options.Options )
    • 添加 as_markdown 方法
      • 用于方便的用人类可读的 Markdown 格式 直接输出一个已经实例化的 Options 类的所有字段
    • Add as_markdown method
      • Used to easily output all fields of an instantiated Options class in a human-readable Markdown format
  • Difficult_Rocket.command.api.CommandText
    • 添加基于 str.findfind(text: str) -> bool 方法
    • Add method find(text: str) based on str.find

Docs

  • howto/translate.md
    • 修改为新的 tr 调用方式
      • Modified to the new tr call method
  • SUMMARY.md
    • add howto/translate.md
    • add howto/game/readme.md
    • contributors -> Contributing

Mod Loader

  • ModInfo
    • on_load(game: Game, old_self: Optional[ModInfo]) -> bool
      • game: Game 对象 用于存储 DR SDK 的信息
      • old_self: 旧的 ModInfo 对象, 可以用于从上次加载中恢复信息
      • 返回值: 是否加载成功
        • game: Game object used to store information about the DR SDK
        • old_self: Old ModInfo object, can be used to restore information from the last load
        • Return value: Whether the load is successful
Difficult-Rocket - 0.7.2.1

Published by shenjackyuanjie over 1 year ago

Difficult-Rocket - 0.7.2.0 修复了一直以来的缩放问题 优化了log

Published by shenjackyuanjie over 1 year ago

可算是发布0.7.2.0了
下面就是0.7.3.0的开发了

20230405 DR 0.7.2.0

Translate

  • 添加
    • language_set_to: 设置到对应语言时输出
      • Display when setting to the corresponding language
    • language_available: 可用的语言列表
      • List of available languages
    • client
      • config.save.start
      • config.save.done
  • Difficult_Rocket.utils.translate
    • Tr
      • 添加了 _language(@property) 字段
      • 用于存储和修改语言
        • Added the _language(@property) field
        • Used to store and modify languages
      • init_translate
        • 添加了 lang 参数
        • 用于设置语言
          • Added the lang parameter
          • Used to set the language
  • game.require_DR_rs
    • 用于标记需要 DR_rs 才能运行的部分
      • Used to mark the parts that need DR_rs to run

Exception

  • language
    • TranslateFileNotFound -> TranslateFileError

Command

  • lang <language>
    • 添加了 lang 命令
    • 直接调用时,会显示可用的语言列表
    • 用法:lang <language>
      • Added the lang command
      • When called directly, the available language list will be displayed
      • Usage: lang <language>

Changes

  • 现在很多输出信息的地方会使用 i18n
    • Now many places that output information will use i18n
  • 现在会在渲染飞船的时候在控制台输出飞船的部件数、总质量、解析时间
    • Now it will output the number of ship parts, total mass, and parsing time when rendering the ship in the console
Difficult-Rocket - 0.7.1.5 一个没多少东西的预发布版,可能会有不稳定

Published by shenjackyuanjie over 1 year ago

说是没有多少东西,你看更新日志有多长就只收到实际上还是写了不少东西的

20230302 DR 0.7.1.5 + Build 1.2.1.0 + DR_rs 0.2.5.6~0.2.6.0 + DR_api 0.0.1.0

文档

  • 现在可以访问 dr.shenjack.top
  • 或者 hws.shenjack.top:81/dr
  • 或者 shenjack.top:81/dr
  • 来访问 DR 的文档页面
    • Now you can visit dr.shenjack.top
    • Or hws.shenjack.top:81/dr
    • Or shenjack.top:81/dr
    • To visit the DR document page

Translate

  • 添加
    • client.sr1_render
      • setup.done
      • setup.use_time
      • xml.loading
      • xml.load_done
      • xml.load_time
      • ship.load
      • ship.load_time
      • ship.info
      • ship.render.done
    • server.use_time
  • 修改
    • client.setup.done -> client.setup.start
    • window.setup.done -> window.setup.start
    • server.setup.done -> server.setup.start

Workflow

  • 新增了 dsm.py
    • 用于将文档部署到服务器
    • 同时保证不会丢下一大堆连接不管
    • 应该吧······
      • Add dsm.py
        • Used to deploy documents to the server
        • At the same time, ensure that there will be no connection left

DR_api V 0.0.1.0

  • 修改了 BaseScreen 的定义
    • 跟随 pyglet master 的修改
      • Modify the definition of BaseScreen
        • Follow the modification of pyglet master

DR_rs V 0.2.6.0

  • 实装了之前的修改 步进版本号

DR_rs V 0.2.5.7

  • 整个项目 cargo fmt 了一遍
    • cargo fmt the whole project
  • types::sr1::SR1PartData
    • 修改了部分字段的定义
    • 补全了缺失的字段
      • Modified the definition of some fields
      • Complete the missing fields
  • types::sr1::SR1PartAttr -> types::sr1::SR1PartTypeAttr
  • +types::sr1::SR1PartDataAttr
    • 用于存储 实际部件 的属性
      • Used to store the attributes of the actual parts
  • 还有一大堆修改,只不过都没实装
    • There are a lot of modifications, but they are not implemented

DR_rs V 0.2.5.6

  • 重新把 CenterCamera_rs 放回去了
    • (事实证明是我确实没好好看文档)
  • 导出了 CenterCamera_rs
    • Replaced CenterCamera_rs back
      • (It turns out that I didn't read the document carefully)
    • Exported CenterCamera_rs

Build V 1.2.1.0

  • Actions 崩溃了 等等吧
  • 恢复了, 摆烂了, 就现在这样挺好的
    • Actions crashed, wait a minute
    • Recovered, it's good now

Build V 1.2.0.0

  • 现在打包之前会移除无用文件
    • Now useless files will be removed before packaging

重命名

  • Difficult_Rocket.client.render.sr1_ship
    • Camera_rs -> CenterCamera_rs

typing

  • 移除了以下文件的 from x import *
    • Remove from x import * in the following files
      • Difficult_Rocket.api.exception.command
      • Difficult_Rocket.api.exception.logger
      • Difficult_Rocket.api.exception.threading
      • Difficult_Rocket.api.exception.unsupport
  • 移除了以下文件的多余引用
    • Remove unnecessary imports in the following files
      • Difficult_Rocket.client.__init__
      • Difficult_Rocket.exception.language
      • Difficult_Rocket.utils.translate
      • libs.utils.logger

移除

  • 移除了 pyproject.tomltool.ruff 的不必要规则忽略
    • Remove unnecessary rule ignore in tool.ruff of pyproject.toml
Difficult-Rocket - DR 0.7.1.4 修复了两个小天才问题

Published by shenjackyuanjie over 1 year ago

Full Changelog: https://github.com/shenjackyuanjie/Difficult-Rocket/compare/0.7.1.3...0.7.1.4

20230301 DR 0.7.1.4 + DR_rs 0.2.5.4/5

修复了上个版本没有步进版本号的毛病

  • 修复了上个版本没有步进版本号的毛病
    • Fix the problem that the version number of the previous version was not incremented

DR_rs V 0.2.5.5

  • 完成了 SR1PartTypeRawPartType 的数据转换方法
    • 修复了 Rcs 字段 实际上检测的是 Tank 的问题
    • Complete the data conversion method of SR1PartType and RawPartType
      • Fix the problem that the actual detection of Rcs field is Tank

DR_rs V 0.2.5.4

  • 完善了 SR1PartTypeRawPartType 的转换
Difficult-Rocket - 0.7.1.3 加入API版本号

Published by shenjackyuanjie over 1 year ago

Full Changelog: https://github.com/shenjackyuanjie/Difficult-Rocket/compare/0.7.1.2...0.7.1.3

20230326 DR 0.7.1.3 + DR_rs 0.2.5.3 + API 0.0.0.1 + 13

内部协议 13

game_version = Version("0.7.1.2")  # 游戏版本
build_version = Version("1.1.0.0")  # 编译文件版本(与游戏本体无关)
DR_rust_version = Version("0.2.5.3")  # DR 的 Rust 编写部分的版本
Api_version = Version("0.0.0.1")  # API 版本
long_version: int = 13
"""
long_version: 一个用于标记内部协议的整数
13: 为 DR_runtime 添加 API_version
12: 去除 DR_runtime 的 global_logger
    要 logging 自己拿去(
11: 为 DR_option  添加 use_DR_rust
    修复了一些拼写错误
10: 为 DR_runtime 添加 DR_Rust_get_version
9 : 为 DR_option  添加 pyglet_macosx_dev_test
8 : 为 DR_runtime 添加 DR_rust_version
    为 DR_option  添加 DR_rust_available
    以后就有 DR_rust 了
7 : 为 DR_option 添加 std_font_size
6 : 事实证明, 不如直接用int
5 : 添加 build_version 信息,用于标记编译文件版本,
    游戏版本改为四位数,终于有一个可以让我随便刷的版本号位数了
4 : 把 translate 的字体常量位置改了一下,顺便调换顺序
3 : 就是试试改一下,正好 compiler 要用
2 : 哦,对 longlong 好耶!
1 : 我可算想起来还有这回事了 v0.6.4
"""

没别的内容了

20230326 DR 0.7.1.2 + DR_rs 0.2.5.3

新发布

  • version.md 记录了 1.0.0.0Semver++
    • version.md records the Semver++ of 1.0.0.0
  • Github copilot 翻译了一部分的更新日志
    • Github copilot translated part of the update logs

DR_rs V 0.2.5.3

  • 0.2.5.2 -> 0.2.5.3

  • sr1_data.rs types.rs

    • 公开了一些忘记加 pub 的结构体字段
    • 修改了一些结构体的命名
      • PartType -> RawPartType
      • PartList -> RawPartList
    • 移除了 types.rs 中多余的 PartTypes 方法
    • Damage 实现了 to_damage 方法
    • RawPartType 实现了 to_sr_part_type 方法
      • 写的真够费劲的 (甚至还没写完)
    • 添加 SR1PartTypeData 特征
      • 用于进行 RawPartTypeSR1PartType 的互相转换
    • sr1_data.rs 的各类数据结构做了向 types.rs 的转换
      • 简直折磨人

      • public some forgotten pub fields

      • modify some struct name

        • PartType -> RawPartType
        • PartList -> RawPartList
      • remove redundant PartTypes method in types.rs

      • implement to_damage method for Damage

      • implement to_sr_part_type method for RawPartType

        • write so hard (not finished yet)
      • add trait SR1PartTypeData

        • used to convert RawPartType and SR1PartType to each other
      • add convert from sr1_data.rs to types.rs

        • torture

DR_rs V 0.2.5.2

  • 0.2.5.0 -> 0.2.5.2

  • sr1_data.rs

    • 现在可以完整解析 SR1 的 PartList.xml
    • 解析后会生成一个 PartList 对象
      • Now can parse PartList.xml completely
      • Will generate a PartList object after parsing
  • types.rs

    • 完善 PartTypes 使其匹配原始 PartList.xml 的数据内容

修复

  • 现在编辑器缩放体验会更好 (?)(可能)
    • Now the editor zoom experience will be better (?) (maybe)

更改

  • Difficult_Rocket.client.fps.fps_log
    • class FpsLogger
      • 现在使用类型注释,而不是注释类型
        • Now use type annotation instead of comment type
  • pyglet
    • 现在使用我维护的 local 分支
      • Now use my maintained local branch

删除

  • Difficult_Rocket.api.__init__.
    • 移除了没用的 from .delivery import Delivery
      • Remove unused from .delivery import Delivery
  • 删除了不少的未使用 import
    • Remove unused import

重命名

  • .github/workflows/after_compile.py -> .github/workflows/post_compile.py
  • libs/Difficult_Rocket_rs/src/after_build.py -> libs/Difficult_Rocket_rs/src/post_build.py
  • Difficult_Rocket.crash.crash -> Difficult_Rocket.crash
Difficult-Rocket - 0.7.1.2 DR_rs 更新

Published by shenjackyuanjie over 1 year ago

20230326 DR 0.7.1.2 + DR_rs 0.2.5.3

新发布

  • version.md 记录了 1.0.0.0Semver++
    • version.md records the Semver++ of 1.0.0.0
  • Github copilot 翻译了一部分的更新日志
    • Github copilot translated part of the update logs

DR_rs V 0.2.5.3

  • 0.2.5.2 -> 0.2.5.3

  • sr1_data.rs types.rs

    • 公开了一些忘记加 pub 的结构体字段
    • 修改了一些结构体的命名
      • PartType -> RawPartType
      • PartList -> RawPartList
    • 移除了 types.rs 中多余的 PartTypes 方法
    • Damage 实现了 to_damage 方法
    • RawPartType 实现了 to_sr_part_type 方法
      • 写的真够费劲的 (甚至还没写完)
    • 添加 SR1PartTypeData 特征
      • 用于进行 RawPartTypeSR1PartType 的互相转换
    • sr1_data.rs 的各类数据结构做了向 types.rs 的转换
      • 简直折磨人

      • public some forgotten pub fields

      • modify some struct name

        • PartType -> RawPartType
        • PartList -> RawPartList
      • remove redundant PartTypes method in types.rs

      • implement to_damage method for Damage

      • implement to_sr_part_type method for RawPartType

        • write so hard (not finished yet)
      • add trait SR1PartTypeData

        • used to convert RawPartType and SR1PartType to each other
      • add convert from sr1_data.rs to types.rs

        • torture