跳至正文

10 月:Alpha 版本发布!

· 1 分钟阅读
Gabriel • SyedMuhammad
lead developer™

我们自豪地宣布……

……Alpha 版本更新的巨长列表!

初步想法

感谢大家在上个月给予的所有支持! 我们的社区已经壮大了许多,看到它变得如此美好和友善真是太棒了 🥰!

周日的游戏测试活动非常精彩! 我们得以很好地测试游戏的稳定性。 可以说,我们遇到的大部分崩溃都与外部集成问题(WebUI 或虚幻引擎本身)有关,这展示了我们核心系统极高的成熟度。 我想以后可以更频繁地举办这种活动,玩万圣节模式以及测试社区的游戏模式真的充满了乐趣!

从现在开始,所有更新都将开始引入版本控制(终于!),小更新/非破坏性更改将获得 PATCH 版本号,而破坏性更改将获得 MINOR 版本号。

备注

以下更新日志包含了自上次官方宣布的 0.73.0 版本以来的所有功能。 接下来的许多项目其实此前已经包含在 bleeding-edge 分支中了。

材质

现在 nanos world 支持材质资产了! 🎨

这意味着你可以在你的 Assets.toml 中配置自己的材质,并通过 Paintable 方法来引用它们!

函数 :SetDefaultMaterial() 已被替换为 :SetMaterial()。 你可以在此处查看所有开箱即用的内置材质列表。

此外,现在还可以获取 WebUI 材质并将其应用到任何表面上(详情见下文)!

由于这一改动,一些现有的方法正在进行重构,例如可拾取物获得了一个新方法 :SetCrosshairMaterial(),因此你可以从材质中设置准星(而不再是通过预定义的列表),同时,所有旧的准星都已转换为材质,你可以在此处找到它们。

改进的 WebUI

The WebUI received several improvements, including the ability to run HTML5 Audio and Videos! 📽

注意

我们使用的是 Ultralight 的 Beta 版本,该版本支持音频和视频,因此必然会发生崩溃,此外音频目前仅支持 2D。 Ultralight 官方正在研究解决方案,以便我后续能实现 3D 音频。

WebUI 构造函数加入了几个新参数:is_transparentauto_resizewidthheight。 宽和高仅在自动调整大小为 OFF 时使用,如果你想生成一个 WebUI 并将其作为材质应用到任何表面上(并且不希望它是整个屏幕的大小),这将非常有用。

Also it received new methods: :SetFreeze(), :Resize() and :SetAutoResize().

引入了全新的搜索器,改进了加载 .html 文件的方式,现在会按照以下顺序进行查找:

  1. Relative to current-file-path/
  2. Relative to current-package/Client/
  3. Relative to current-package/
  4. Relative to Packages/

现在可以从 WebUI 生成材质,它会自动动态地渲染到任何表面上::SetMaterialFromWebUI()(该方法属于 Actor)。

Actor

Actor 的新内容:

  • 为所有 Actor 添加了新方法::SetLifeSpan(time),它将在 time 秒后自动销毁该 Actor。
  • Added new method for all actors: :IsBeingDestroyed() which will return if this actor is being destroyed (useful to check from inside other Events such as Drop or Ungrab).
  • Added new parameter for all actors :AttachTo() method: lifespan_when_detached, which will destroy the actor after time seconds after it's detached.
  • Now event TakeDamage has a new argument: causer (the object/actor which caused the damage). Also added new damage types: RunOverVehicle and RunOverProp.
  • Now event Hit has new arguments: impact_force, normal_impulse, impact_location and velocity.
  • Now :SetLocation() will try to find the better spot to teleport the Actor (to avoid collisions).

Character

New additions for Characters:

Character Methods additions/improvements:

  • 添加了若干个用于获取其属性的新 Getter。
  • Added :SetDamageMultiplier() change the damage multiplier depending on the bone damaged.
  • Added :SetHiddenBone() to make invisible any part of the body.
  • Added :SetJumpZVelocity() to make the character jump higher.
  • Improved :PlayAnimation() got new parameters (blend times, loop and play rate), and now it supports loading any type of animation (Montage or Sequence).
  • Removed :SetInitialLocation(), it has been replaced with :Respawn().

Character Events additions/improvements:

  • Added AttemptEnterVehicle called when Character tries to enter a vehicle, returns false to prevent it.
  • Added AttemptLeaveVehicle called when Character tries to leave a vehicle, returns false to prevent it.
  • Added AttemptReload called when Character tries to reload it's weapon, returns false to prevent it.
  • Added Interact called when Characters tries to Pick Up a Pickable or Grab a Prop.
  • Added Highlight called when Characters looks at a Prop or Pickable being able to pick up it.

Some Characters animations have been renamed from AM_ to A_ in the Default Asset Pack (as they are not Montages anymore). 此外还添加了大量新的动画。

武器

New additions for Weapons:

Weapon Methods additions/improvements:

Additional stuff:

  • 现在当角色在驾驶时,武器会被隐藏。
  • Added sounds of Shell Dropping & hitting the ground for the built-in Shell particles (this is a procedural and 100% precise sound 😉).
  • 添加了拾取或丢下武器时的音效,并且在丢下武器时会将其稍微向前抛出。

手榴弹

All Properties from Grenades have been deprecated, now access must be done through Methods.

We've added a special Particle for Grenades nanos-world::P_Grenade_Special which will explode different particles depending on the ground the grenade is. 也就是说, 如果手榴弹在草地表面,它会爆炸出“草地爆炸”粒子;如果在水下,则会爆炸出“水下爆炸”粒子。 Note: This particle only works for Grenades.

声音

New additions for Sounds:

Now it is possible to load .ogg sounds at runtime! You can store them in any Package or Asset Pack and load it using our new pattern for SpecialPath (assets://asset-pack-name/path.ogg or package://package-name/path.ogg).

Added loop_mode parameter to constructor (can loop any sound forever now).

Also, it is possible to pass .ogg using the SpecialPath in any Sound parameter.

Sound Methods additions/improvements:

Input

Added a new class: Input!

现在你可以用正确的方式来控制、创建和自定义按键绑定了! 示例:

-- Registers the binding_name 'SpawnMenu' with default key 'Q'
-- This will add 'SpawnMenu' to user KeyBinding Settings automatically
Input.Register("SpawnMenu", "Q")

-- Subscribes for Pressing the key
Input.Bind("SpawnMenu", InputEvent.Pressed, function()
-- Opens the Spawn Menu
end)

-- Subscribes for Releasing the key
Input.Bind("SpawnMenu", InputEvent.Released, function()
-- Closes the Spawn Menu
end)

HTTP

Added a new class: HTTP!

现在我们有了一个专门用于发送 HTTP 请求的独立类。 它还支持异步 HTTP 请求(并且是线程安全的!)

性能优化

我们在 Alpha 版本更新中对性能技术进行了大量的钻研。 以下是本次更新的亮点:

  • Now Basic Structs Vector and Rotator are automatically compressed when sending through the Network. 在最理想的情况下,其体积最多可减少 90%! 这对于网络占用来说是一个极大的利好。
  • A new setting was added Profiling which you can enable with --profiling on server and in Settings on Client. 这将在控制台中记录运行各项操作/脚本事件等所消耗的所有时间。
  • 现在 HTTP 请求(即 加入服务器时下载文件的过程)会自动进行压缩,这可以减少下载大文件时的网络占用!
  • 现在,距离非常远或不在屏幕上的 Actor 的同步/更新频率将减半,以提高性能。 我们后续仍计划对其进行微调,并在某些情况下使其更加激进。
  • 资产加载系统经过了重做,现在速度快了许多。
  • Small Props (radius < 200) will not collide with players or dynamic objects anymore. 此外,较大的道具将默认禁用 CCD(大幅提升性能),这可以在 Prop 构造函数中开启。
  • 现在语音通话使用了 Steam 系统,它提供了极高的压缩率,并且可以通过 Shift+Tab 菜单进行自定义设置。
  • 针对我们的低级 Lua 代码进行了多项改进,以提升脚本编写的性能。

Server

New additions to Server static class:

Client

New additions to Client static class:

现在加入服务器时,Windows 任务栏上会显示一个进度条,并且在加载完成后它会闪烁提示:

游戏内控制台

现在可以在游戏内直接访问服务器控制台了!

If you open it, 2 tabs will appear: client and server. 你可以阅读所有的服务器日志,并且还能输入命令。

备注

并非所有的日志都会显示在这里,仅显示你连接到服务器期间所输出的日志。

Timer

New additions to Timer:

命令行界面

  • Now it is possible to download multiple Assets/Packages at once with CLI, just separate them by spaces, e.g.: cli assets install quaternius city-park.

Steam 成就

通过集成 Steam,我们正在尽可能地利用它所允许的每一项功能 😅!

And this includes the Achievements! We are counting on the support of a talented friend Esther who is drawing the amazing arts for them!

我们会一步步创建更多成就并发布它们! 我们同样期待你为更多成就提出想法!

脚本改进

  • Added new Searchers to Package.Require(), we now currently support 5 searchers, which are looked in the following order:

    1. Relative to current-file-path/
    2. Relative to current-package/Client/ or current-package/Server/ (depending on your side)
    3. Relative to current-package/Shared/
    4. Relative to current-package/
    5. Relative to Packages/
  • Package.Require() now can be called in runtime and at any moment.

  • Package.RequirePackage() now will load a package as a library inside the current package, it means the package loaded will now be automatically sent to clients, and all paths it loads is relative to the package itself (and not to the one which is requiring it anymore).

  • 详细日志现在将显示当前线程的 ID。

重命名默认资源包

The default Packages NanosWorldWeapons and NanosWorldVehicles were renamed to nanos-world-weapons and nanos-world-vehicles, following the new correct pattern for Packages and Assets names. Including them now should be made like Package.RequirePackage("nanos-world-weapons"), the usage keeps the same (NanosWorldWeapons.AK47()).

常规更改

  • Cable got new methods: :GetAttachedStartTo() and :GetAttachedEndTo() to get if it's attached at any end.
  • Player got new methods: :SetVOIPVolume(), :GetSteamID().
  • Pickables got new events: ReleaseUse, PullUse when Character pulls or releases its usage (i.e. trigger for weapons).
  • Improved the way the interact trigger enables for Pickables and Props.
  • Trigger got new method: :ForceOverlapChecking() which will checks for overlaps in the game thread and immediately dispatch events.
  • Added new methods for Quaternions (+, -, Normalize).
  • Added new method for generating a random Rotator: Rotator.Random().
  • 在默认资产包中添加了大量新的声音、动画、道具和网格体。
  • 添加了 Steam 登录。
  • All .config files had it's tabs replaced with spaces.
  • .GetPairs() now only supports pairs.
  • 添加了分辨率图形设置。
  • 删除了游戏内菜单的“Make Day”按钮。
  • 添加了道具或物体进入水中时的全新溅水效果。
  • :GetValue() now has an additional parameter: fallback which will be returned if the value doesn't exist.
  • 可能还有很多其他添加了但被忘掉的东西 😜。

漏洞修复

  • Fixed World.SetFogDensity() not working.
  • Fixed Client.SetCameraLocation not working.
  • Fixed Actors.RotateTo() not doing properly math.
  • Fixed StaticMesh.GetBounds() not working.
  • 修复了 Cable 方法可以在客户端被调用的问题。
  • Fixed several Character properties not syncing.
  • 修复了在运行时更改地图导致崩溃的问题。
  • Fixed Characters not reseting the life to max_health when Respawning.
  • Fixed dead ragdolls still moving around (from MoveTo()).
  • Fixed infinite recursion with LogEntry event.
  • Fixed Characters Morph Targets not syncing.
  • 修复了 Discord 自定义集成有时不起作用的问题。
  • 修复了当玩家没有 Steam 个人资料图片时导致崩溃的问题。
  • 修复了在新游戏屏幕取消勾选 Server Announce 时复选框被禁用的问题。
  • Fixed a crash when destroying entities from inside Interact event.
  • 修复了海量的其他崩溃 💥。 感谢各位提交的崩溃报告!