Escribe para buscar…

Basic

Esta página todavía no se ha traducido — se muestra en su idioma original:English

Bevy

ps
cargo init bevy-basic
cd bevy-basic
cargo add bevy

Compile with Performance Optimizations#

While it may not be an issue for simple projects, debug builds in Rust can be very slow - especially when you start using Bevy to make real games.

It’s not uncommon for debug builds using the default configuration to take multiple minutes to load large 3D models, or for the framerate for simple scenes to drop to near-unplayable levels.

Fortunately, there is a simple fix, and we don’t have to give up our fast iterative compiles! Add the following to your Cargo.toml:

toml file="cargo.toml"
# Enable a small amount of optimization in the dev profile.
[profile.dev]
opt-level = 1

# Enable a large amount of optimization in the dev profile for dependencies.
[profile.dev.package."*"]
opt-level = 3

Setup

Apps

Every Bevy program can be referred to as an App. The simplest Bevy app looks like this:

rust
use bevy::prelude::*;

fn main() {
    App::new().run();
}

Apps

https://www.youtube.com/watch?v=nE76GGICofU

Pending

Estás leyendo una vista previa.

Inicia sesión con Google para leer la página completa. Una cuenta de Google incluye 5 páginas gratuitas en total; el alumnado y el profesorado leen las páginas de su curso sin límite.

Iniciar sesión