#ascii #bevy #terminal #rogue-like #tilemap

bevy_ascii_terminal

bevy中的简单终端,用于渲染ascii

36个版本

0.15.0 2024年3月17日
0.14.0 2023年11月5日
0.13.0 2023年7月12日
0.12.4 2023年3月11日
0.7.4 2021年11月24日

#246游戏开发

Download history 283/week @ 2024-04-02 18/week @ 2024-04-09 13/week @ 2024-04-16 11/week @ 2024-04-23 6/week @ 2024-04-30 2/week @ 2024-05-07 8/week @ 2024-05-14 12/week @ 2024-05-21 9/week @ 2024-05-28 12/week @ 2024-06-04 10/week @ 2024-06-11 5/week @ 2024-06-18 13/week @ 2024-06-25 62/week @ 2024-07-02 3/week @ 2024-07-09 8/week @ 2024-07-16

89 每月下载量
用于 2 包

MIT 许可证

140KB
2.5K SLoC

License: MIT Crates.io docs

Bevy Ascii Terminal

集成到bevy的ecs框架中的简单ascii终端。



此包的目的是提供一个简单、直接且希望快速的渲染彩色ascii的方法,旨在“传统roguelikes”,但如果需要,也可以作为简单的UI工具。

代码示例

use bevy::prelude::*;
use bevy_ascii_terminal::prelude::*;

fn setup(mut commands: Commands) {
    // Create the terminal
    let mut terminal = Terminal::new([20,3]).with_border(Border::single_line());
    // Draw a blue "Hello world!" to the terminal
    terminal.put_string([1, 1], "Hello world!".fg(Color::BLUE));

    commands.spawn((
        // Spawn the terminal bundle from our terminal
        TerminalBundle::from(terminal),
        // Automatically set up the camera to render the terminal
        AutoCamera,
    ));
}

fn main () {
    App::new()
    .add_plugins((DefaultPlugins, TerminalPlugin))
    .add_systems(Startup, setup)
    .run();
}

版本

bevy bevy_ascii_terminal
0.13 0.15.0
0.12 0.14.0
0.11 0.13.0
0.9 0.12.1
0.8.1 0.11.1-4
0.8 0.11
0.7 0.9-0.10

Bevy Ascii Terminal项目

Bevy Roguelike - 源代码 - WASM

Ascii Snake - 源代码 - WASM

Ascii Tetris - 源代码 - WASM

Roguelike Snake Tetris

依赖

~37–73MB
~1.5M SLoC