Unturned II 开发日志 #037





我决定松散地遵循POSIX/GNU参数解析,以便在命令之间标准化。每个命令都可以定义从“-key=value”或“-key value”解析的命名参数,并将其他参数视为操作数。这些命令应该在操作数方面变得聪明,例如“/time 12:00”希望将时间更改到中午,但是命名的参数应该对“我想禁止使用此模板的播放器,而不是具有数字名称的播放机”这样的情况很有用。








原文 update with sky and framework for admin commands.

Informal Overiew Video

Admin Commands

Support for chat commands has been added alongside several time-related utilities. Note that permissions and roles have not been added yet, so anyone can execute them temporarily.

I decided to loosely follow POSIX / GNU argument parsing so that it can be standardized between commands. Each command can define named parameters parsed from "-key=value" or "-key value", and other arguments are treated as operands. The commands should try to be smart about the operands, e.g. "/time 12:00" wants to change the time to noon, but named parameters ought to be useful for cases like "I want to ban a player with this steamid, not a player with a numeric name."

One useful feature with most of the time commands is you can include a +/- offset operand like "/sunrise +1:00" to preview one hour after sunrise.

Earth Atmosphere

The atmosphere manages an ecliptic to world (level) space quaternion for converting orbits into in-game transforms, which is a relatively simple end result, but it took me a few days to wrap my head around the space stuff I needed to learn and arrive at that solution.

To clarify the sequencer comments from the video: a level sequence might control the fog colors, fog density, sky color, etc. similarly to Unturned. There could also be a sequence for the time of year. Ultimately the atmosphere actor would have to be responsible for blending them to handle special situations like underground caves or overrides.

What's Next?

It's coming time for a new Unturned curated map release, so I will be busy with that for the next couple weeks. Afterwards I should probably do at least basic permissions management now that there are commands (necessary for severs to be maintainable as gameplay is fleshed out), and from there continuing core gameplay features.