项目介绍

Piripant/skii 是一个托管在 GitHub 上的开源项目,主要使用 Rust 编写,目前获得 72 个 Star、2 次 Fork。

仓库全名
Piripant/skii
Star 数
72
Fork 数
2
未关闭 Issue
1

README 摘要

Skii Skii is a 2D top-down skiing game with a procedurally generated landscape and fully json constumizable assets. Building Skii uses cargo, so compiling only consists in writing: cargo build If you want to directly play the game, you can also use: cargo run --release Dependecies Skii has only one non-cargo handled dependecy, SDL, derived from ggez. To find instruction on how to install SDL, you may want to read…

完整内容见 GitHub 原始 README 或本页 。

常见问题

skii 用什么语言开发?

主要使用 Rust 编写,目前有 72 个 Star。

如何获取 skii 的源码?

可以直接克隆仓库:git clone https://github.com/Piripant/skii.git,默认分支为 master;安装与运行步骤见仓库 README。

skii 最近还在维护吗?

仓库最近一次更新为 2018年1月4日,当前有 1 个未关闭 Issue;Star 数为 72,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

A rust skiing game

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
79
价值分
44
活跃状态
活跃

语言占比

Rust

README

Skii

Skii is a 2D top-down skiing game with a procedurally generated landscape and fully json constumizable assets.

Alt Text

Building

Skii uses cargo, so compiling only consists in writing:

cargo build

If you want to directly play the game, you can also use:

cargo run --release

Dependecies

Skii has only one non-cargo handled dependecy, SDL, derived from ggez. To find instruction on how to install SDL, you may want to read this.

Modding

The game reads json file in resources/config to find info about the tiles, objects and player.

There are three types of description files: tile, object, and player.

Tile

  • type: the file type
  • properties: all the tile properties
    • texture: the tile texture, found in resources/textures
    • forward_friction: the forward friction with the skies
    • sideway_friction: the sideways friction with the skies
    • distribution: the base chance of generating the tile
{
    "type": "tile",
    "properties": {
        "texture": "deep_snow.png",
        "forward_friction": 0.2,
        "sideway_friction": 30.0,
        "distribution": 0.05
    }
}

Object

  • type: the file type
  • properties: all the object properties
    • texture: the object texture, found in resources/textures
    • distribution: the base chance of generating the object
    • hitbox: the object hitbox
      • width: the hitbox width
      • height: the hitbox height
{
    "type": "object",
    "properties": {
        "texture": "tree1.png",
        "distribution": 0.06,
        "hitbox": {
            "width": 1.0,
            "height": 1.0
        }
    }
}

Player

  • type: the file type
  • properties: all the object properties
    • texture: the player texture
{
    "type": "player",
    "properties": {
        "texture": "player.png"
    }
}

Generation

The generation algorithms, (found in src/generation.rs) are cellular automata inspired, and modify the generation chance starting from the distrubution value declared in the json files.

Tiles

if identical neighbors is between 1 and 3 => generating chance *= 2
if identical neighbors is more than 3 => generating chance /= 5

Objects

if objects in 3.0 radius are between 1 and 2 => generating chance *= 2
if objects in 3.0 radius are more than 2 => generating chance /= 6

Note that the objects in range do not need to be the same as the object we are considering to generate.

评论

暂无评论