Bevy & Rust Star Wars Scene - How it Works

preview_player
Показать описание
BEVY and RUST + Star Wars = epic. This is a code breakdown / walk through of this project I built in 1 hour using Bevy and Rust.
Everything from laser shooting walkers + xwing to procedual world generation to heightmap rendering shader.

PROJECT SOURCE CODE:

VIDEO OF ME BUILDING THIS PROJECT in 1 hour no commentary:

MILESTONE TIMESTAMPS:
0:00 what we building
0:30 lasers
3:07 procedural generation
5:23 terrain shader
6:58 vertex shader: heightmap
7:35 fragment shader: texturing
8:25 walker + cliff movement
8:43 bevy settings
9:08 project secrets exposed

My discord group:

Want to support me?
⁍ Monero: 43Ktj1Bd4Nkaj4fdx6nPvBZkJewcPjxPB9nafnepM7SdGtcU6rhpxyLiV9w3k92rE1UqHTr4BNqe2ScsK1eEENvZDC3W1ur

#gamedev #rustlang #bevyengine
Рекомендации по теме
Комментарии
Автор

after trying my hand at bevy shaders and failing horribly I definitely got a whole new kind of appreciation for what you managed to do in a single hour

ny
Автор

Oh wow, you're really full-sending Bevy. A friend of mine and I decided to pick it up too after seeing your videos, since we thought it might be fun to create a small RPG-adventure with it.

ym-xxkj
Автор

I'm beginning to love zig more than Rust but I still love you the same amount Tantan!

seantyson
Автор

2:56 I gotta nitpick this, but that code does not make the lasers 6 times faster every second. At 1 FPS, it makes them 7 times faster every second. At 2 FPS, it makes them 16 times faster every second. At 5 FPS, it makes them 51.5 times faster every second. At 10 FPS, it makes them 109.95 times faster every second. At 60 FPS, it makes them 304.48 times faster every second.

The way you actually make it 6 times faster every second is `laser.velocity *= Also, when something is accelerating, `translation += velocity * time` is also wrong; the object will travel different distances depending on framerate. The correct formula depends on how the object is accelerating, but in this case it's `translation += (velocity_after - velocity_before) / 6.0f64.ln();`. I don't like delta time game loops because it's really hard to get consistent behavior across a range of framerates.

minuskelvin
Автор

error[E0277]: the trait bound `LandscapeMaterial: Asset` is not satisfied :((

cayman_islands
Автор

Time to steal your idea for the lasers to add colliders into my scene lol.

AFRspace
Автор

oh cool this is basically advanced shader art

RADkate
Автор

Is there any documentation anywhere to how to recuperate your landscape material in the shader ? Why is there #(uniform[0]) ... why is there @group(1) @binding(0) ? I am really struggling using this.

adampaul
Автор

I just started learning WebGPU with TypeScript and realized that I missed out on so much (especially the compute shaders).

SuboptimalEng
Автор

My issue with gltf was, that even simple models did not work, and I had no 3d experience. So I am hyped about next bevy release, which I hope will support those pesky ..._1 values some models use for UV lighting or animations.

RogerValor
Автор

I am getting an error. What should I do? :((
error[E0277]: the trait bound `LandscapeMaterial: Asset` is not satisfied
--> src\landscape. rs:18:41
|
18 | pub struct CurrentLandscapeMaterial(pub Handle<LandscapeMaterial>);
| the trait `Asset` is not implemented for `LandscapeMaterial`
|
= help: the following other types implement trait `Asset`:
bevy::prelude::AnimationClip
Font
AudioSource
Pitch
DynamicScene
Scene
bevy::gltf::Gltf
GltfNode
and 14 others
note: required by a bound in `bevy::prelude::Handle`
--> rs:124:20
|
124 | pub enum Handle<A: Asset> {
| required by this bound in `Handle`

cayman_islands
Автор

Hello, thanks for your videos, is it possible to buil an html 5 webgl game with Bevy at the moment?

romanshatov
Автор

is the game that stuttery or it's the recording ?

NielsGx
Автор

tantan, man where ya been? Have you been working at a different job?

steve
Автор

Quickly, someone get acerola to do a video on Rust shaders

SpikerStudios
Автор

Thanks for this nice tutorial! It just run slow on my AMD Ryzen 7 5800h notebook :( (Ubuntu 22.04 linux)

SuperSkydrake