Questions tagged [bevy]

A cross-platform, massively parallel game engine with an entity component system and 2D and 3D renderers.

Read more at the official website.

161 questions
1
vote
0 answers

Is there a way to hide window while game is starting in Bevy?

When running game in Bevy: At startup, I see a big window with white rectangle in it. After a few seconds my WindowDescriptor kicks in, and the window is resized to the dimensions that I want. Is there a way to hide the window during the loading…
jm.
  • 23,422
  • 22
  • 79
  • 93
1
vote
0 answers

Display Many Sprites in Bevy

I want to write a small game using Bevy in Rust. Displaying a lot of sprites (10'000) is a problem if all of them are a separate SpriteBundle. How do I get one entity to contain and display several Sprites? I am aware of Fastest way to deal with…
Wisart
  • 11
  • 1
1
vote
0 answers

How to run a system independently from the rendering engine

I'd like to run a system as often as possible, independently from all others, possibly in its own thread. Is this supported?
nside
  • 113
  • 2
  • 8
1
vote
0 answers

Shader crashes the game when including it through "include_str!" (bevy)

I copy-pasted the shader example from https://github.com/bevyengine/bevy/blob/main/examples/shader/shader_custom_material.rs which worked well. However, I want to put the shaders in their own files so I don't need to have them inline in the rust…
teevik
  • 112
  • 1
  • 7
1
vote
1 answer

Bevy 0.5: arrange text in column

I'm trying to put one text above another using this code use bevy::prelude::*; fn setup_ui(mut commands: Commands, asset_server: Res) { let font: Handle = asset_server.load("fonts/RobotoMono-Regular.ttf"); …
Inspi
  • 530
  • 1
  • 4
  • 19
1
vote
1 answer

How do I expand nested bundles when deriving bundles in Bevy?

In this example, the following code is provided. #[derive(Bundle)] struct PlayerBundle { xp: PlayerXp, name: PlayerName, health: Health, _p: Player, // We can nest/include another bundle. // Add the components for a standard…
kazagistar
  • 1,537
  • 8
  • 20
1
vote
0 answers

What is the correct way to parent ImageBundles in the Bevy game engine so the child image doesn't alter the size of the parent image?

When I try to parent two ImageBundles together I don't get the expected result. The child image causes the parent image to resize to the size of the child image. I am trying to place the button image on top of the background image, but the following…
Martin
  • 31
  • 3
1
vote
1 answer

How to prevent the camera from seeing through walls in Bevy?

Using Bevy, I made a 3d maze, but when I try to navigate the maze, the camera can see through the walls. Looking down a corridor, the wall ahead will appear but as it gets closer, it just cuts off and I can see through to the other corridor. I am…
1
vote
1 answer

How to add components to entities spawned in a scene?

In a Bevy project with the following scene file called my_scene.scn: [ ( entity: 0, components: [ { "type": "Transform", "map": { "translation": { "type": "Vec3", "value": (150.0,…
Didi Bear
  • 356
  • 3
  • 13
1
vote
2 answers

Multiple buttons without multiple button systems?

I'm fairly new to rust and newer to bevy. I realize it's the early days, and like bevy a lot, but I frankly find examples and docs a bit lacking. I use the /examples/ui/button.rs as a starting point. And I want to add a bunch of buttons instead of…
ippi
  • 9,857
  • 2
  • 39
  • 50
1
vote
1 answer

Is it possible to add a child or children to an entity without using the World directly with a thread-local system?

I have an Entity and a Bundle of Components that I want to be attached to an entity that will be the child of the first entity. I can use Commands to spawn an entity with my components, but I can't get it's actual Entity, which means that I can't…
YourGamerMom
  • 377
  • 3
  • 13
1
vote
1 answer

Why does my attempt at Change Detection in Bevy never trigger?

I am unsure whether I am confusing what the Bevy's Change Detection systems do , or if I am just doing it wrong. But, in attempts to detect changes, I am only notified when the component is spawned. Below, I spawn a tuple of Group,Size(2). Then,…
STF_ZBR
  • 617
  • 1
  • 4
  • 19
1
vote
1 answer

How to get the absolute position of a child entity in bevy?

I am using the Bevy game engine. The ability to have transforms be propagated to children in Bevy is handy, but when I am performing collision checks in my game, I have been using the object's Translation to compute its location. Now that I have…
EtTuBrute
  • 502
  • 5
  • 16
0
votes
1 answer

Adding collider to floor on bevy and bevy_rapier2d

I try to add a collider to the floor of my 2d game: fn setup( mut commands: Commands, asset_server: Res, ) { let vertices = [ Vec2::new(-WINDOW_WIDTH, 0.0), Vec2::new(WINDOW_WIDTH, 0.0), ]; commands …
Adri HM
  • 2,314
  • 2
  • 17
  • 30
0
votes
0 answers

Error message meaning after rendering 3d cube with bevy?

Hello I tried bevy today and I rendered a simple scene: a little plane with a cube on it, with basic light and shadow. But then I looked into the terminal and saw following errors: 2023-08-24T13:11:17.972906Z ERROR wgpu_hal::vulkan::instance:…