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
0
votes
1 answer

Inconsistent Response Time Measurements in Bevy App on Both WASM and Desktop

I'm trying to develop a simple psychology experiment using the Bevy engine, which runs on both WASM and desktop. I measure the response times from when ellipses are displayed until a user provides input. The experiment measures response times, but…
AltunE
  • 375
  • 3
  • 10
0
votes
0 answers

Bevy Add background image with sprite animation

I'm using bevy adding two Spawn lawyers. One is the background and the other is the sprite I want to animate. For some reason I can only see the background image but not the sprite. use bevy::prelude::*; use…
paul
  • 12,873
  • 23
  • 91
  • 153
0
votes
0 answers

How to import .ldtk map for platformer game in rust & how to set collision for it?

I've just started making this project, so there is nothing much in it. I will use the bevy_ecs_ldtk dependency. I will use any one of these .ldtk file I was also looking for collision setup, is there a automatic way to do it, while using…
0
votes
1 answer

Bevy ECS - Delayed spawning of child entities in a system results in intermittent errors

I'm working on a 2048 game using the Bevy game engine (version 0.10.1), and I've encountered an intermittent issue when rendering the game board. In my code, I have a function display_game_board that iterates through the game board and spawns…
0
votes
1 answer

Error running a Bevy game in browser: "WebAssembly.instantiate(): Import #0 module="wbindgen_placeholder" error: module is not an object or function"

I am trying to run a game I built with Bevy and Rust in the browser. Bevy started supporting WebGL2 from version 0.11.0, and I am using this version. I have compiled my Rust code to WebAssembly using wasm-pack build --target web. However, when I try…
jjreedv
  • 71
  • 2
  • 7
0
votes
1 answer

Text not appearing in Bevy 0.11

I'm using Bevy 0.11, which has a default font. Unfortunately I'm struggling to get the text to actually show up. I have confirmed that my system is running and that the dep I'm using is actually 0.11. Relevant code: fn lobby_startup(mut commands:…
Daniel Porteous
  • 5,536
  • 3
  • 25
  • 44
0
votes
0 answers

How to play sound based on the current app state in Bevy game engine? `Bevy 0.10.1`

I'm developing a game using the Bevy game engine and I want to play different sounds based on the current state of the application. I have a State resource that keeps track of the current app state using the bevy::prelude::State struct. Here's my…
0
votes
0 answers

rust bevy hide primary window

Is there a way to disable and enable the primary window at any time? I looked into the WindowPlugin and the Window struct itself, but neither of them have anything related to visibility. Thanks for your help pub struct Window { /// The cursor of…
0
votes
1 answer

can't order startup-system in bevy 0.10.1

I am Trying out the newest version of bevy. how can I access MyRessource in the function two? I would expect using .chain() on the tuple of systems would execute one system after another. use bevy::prelude::*; #[derive(Resource)] struct…
reyop
  • 3
  • 1
0
votes
0 answers

Cannot cross-compile rust/bevy from WSL2 ubuntu via Dockerfile with target stable-x86_64-pc-windows-gnu

Im not very familliar with Docker OR with rust cross compilation maybe somebody can point out what I'm doing wrong here. The environment is not relevant but im on WSL2: ubuntu and I'm trying to compile to windows. My dockerfile: FROM…
0
votes
2 answers

Bevy 0.10: How do I render 3D text in bevy? (using font.ttf file)

I am developing a card game for which I need to render some 3d text. The game itself is designed to be 3d, however the card graphics are .png files (so effectively 2d) which I am rendering using the shape::Quad + StandardMaterial.base_color_texture…
0
votes
1 answer

How to get the actual pixel size of a transformed sprite in Bevy?

This seems like it should be easy but I haven't found a straight answer on how to do this anywhere. So, in Bevy, I'm trying to have sprites spawn, move around and detect clicks on them and then do something. So in order to figure out if a sprite I…
CpILL
  • 6,169
  • 5
  • 38
  • 37
0
votes
1 answer

How to center a entity in the window with Bevy?

I'm making a 2048 game in rust using bevy to learn about the game engine. In this moment I'm making the scene with the main menu, but I'm having a problem to work with the Transform struct. Maybe is a problem with my understand of how Bevy…
0
votes
0 answers

How can you set the background color of a bevy entity?

I have a rapier2d project featuring a falling box, how can I make the falling box not have the debug renderer and have a solid black color? And then, how can I make a solid colored circle/triangle/other shapes? I tried using a NodeBundle with a…
0
votes
0 answers

How can I fix the error unable to open slave

I was using bevy game engine 0.10.1 on Arch Linux avoiding the ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave cannot connect snake-becy.P.3391259.0:out_000 to…