Bevy

228 readers
1 users here now

A community for discussion around the bevy game engine! https://bevyengine.org/

founded 10 months ago
MODERATORS
1
2
 
 

I'm working on a life simulation game with the working title Project Harmonia and would like to share my progress.

I migrated navigation from oxidized_navigation to vleue_navigator.

It uses the novel Polyanya algorithm instead of the classical A*.

I faced a few issues during the migration, but the author helped me resolve them all. He even dumped the navmesh of the house I built in the game and created a test named after the project πŸ˜…

I also implemented skipping points that the agent has projected past to prevent jitter when multiple points are close to each other.

3
4
 
 

I working on a life simulation game with a working title Project Harmonia.

I’ve finally added the ability to edit and remove previously spawned walls, along with an undo/redo system.

Implementing the undo/redo was a bit challenging. If a command spawns or despawns an entity, it needs to be tracked to update the history with the correct ID. Additionally, since the game is networked, I had to introduce the concept of pending history commands. These commands are only added to the history after server confirmation.

5
6
 
 

It’s a crate for server-authoritative networking. We use it for Project Harmonia, but it's general-purpose.

Some highlights:

  • Added the ability to defer replication, which is useful for exchanging messages or downloading assets required by the server before replication starts.
  • If there is any spawning, despawning, removal, or insertion, client events wait for replication. However, with this release, it can be disabled per event.
  • Fixed entity mapping when a client event is buffering.

πŸ“œFull changelog πŸ“¦bevy_replicon

7
8
22
Initial roads support (files.mastodon.social)
submitted 1 month ago by [email protected] to c/[email protected]
 
 

I working on a life simulation game with a working title Project Harmonia.

Added initial editor for roads, reusing some logic from the walls implementation.

Currently, I'm using segments for road creation, but I plan to add Bezier curves to allow for curved walls and roads. Maybe I should use Bezier curves even for straight lines πŸ€”

I also need to use a texture without road markings for connection islands and implement rounding for turns.

But wanted to share the current progress :)

9
 
 

I'm working on a life simulator game and want to share some progress :)

I found that Tonemapping::AcesFitted better fits the game aesthetic. With a little bit of bloom and an environment map, it looks much nicer.

My wife also made more placeable objects, and I finished refactoring into new features from Bevy 0.14. Substates are so convenient!

10
 
 

While I am refactoring the code to new features from Bevy 0.14, my wife continues making models.

I think Bevy can look attractive. However, I am still not fully satisfied with my lighting configuration and will come back to it later.

11
13
OpenGL 1.5 support? (infosec.pub)
submitted 2 months ago* (last edited 2 months ago) by [email protected] to c/[email protected]
 
 

I know the title looks insane, but hear me out.

I wanted to make a game, specifically an isometric 2.5D RPG game, nothing that fancy.

So I decided to write it in Rust because I... like Enums, or something, and I had already finished the concurrency chapter, so I should be able to hang on.

Bevy seemed like the most complete engine out there, if overkill for my use case, but it's presumably so modular I could de-bloat it adequately, But...

Someone I know has a laptop; it is old.

It is not super old, a Toshiba Portege R700 with a locked BIOS which took me 3 days to trick its Windows 10 boot loader into booting Debian, and accidentally, yet irresponsibly, broke Windows and installed Grub.

There is no reason the thing shouldn't be able to run my hypothetical game. I've personally seen it LANning Sven Co-Op (Half-Life Co-Op) not long ago; the beast could maintain 60FPS for a solid few minutes, before overheating and dropping to 5, but it should hold on better now that I installed GNU/Linux.

So I, just to make sure, ran the command that exposes the OpenGL version used by Mesa, and... Open GL (ES?) 1.5? I surely, need a plan.

I noticed this issue with many indies. Many would-run-on-a-2005-thinkpad games sacrifice this untapped market for features they never use, or worse, go against the artistic vision.

So, since Bevy is modular, can I, a humble would-be-intern, write a rendering backend for the 2003 specification, but not before learning what a rendering backend is?

Or can I, a seasoned searcher, find a premade solution solution for Bevy or any other Rust engine, made to use the 2003 spec, or even the 1992 1.0 spec?

Or would it be worthwhile, to construct an engine of mine?

Edit: Or can I, a man of determination, write an FFI for an existing C solution?

12
12
Bevy 0.14 (bevyengine.org)
submitted 2 months ago by [email protected] to c/[email protected]
13
 
 

It’s a crate for server-authoritative networking.

This release adds support for Bevy 0.14.0 and includes features from the previous RC. I like Bevy's new release candidate process a lot!

But it will take some time for the messaging backends to update. The bevy_replicion_renet that I maintain needs the renet crate to be updated to Bevy 0.14 first.

πŸ“œFull changelog πŸ“¦bevy_replicon

14
7
Bevy 0.14 (bevyengine.org)
submitted 2 months ago by [email protected] to c/[email protected]
15
11
Bevy 0.14 (bevyengine.org)
submitted 2 months ago by [email protected] to c/[email protected]
16
17
3
submitted 3 months ago* (last edited 2 months ago) by [email protected] to c/[email protected]
 
 

It’s a crate for server-authoritative networking.

We usually don't make breaking changes when a Bevy release is around the corner, but decided to make a small exception for this one :)

This release adds support for Bevy 0.14.0-rc.4 and splits the crate functionality by features. For example, for headless server you can disable client feature. By default all features, except diagnostics are enabled, so you have the same set of plugins as before. But most plugin authors will need to add default-features = false.

πŸ“œFull changelog πŸ“¦bevy_replicon

18
12
Bevy 0.14.0-rc.4 (crates.io)
submitted 3 months ago* (last edited 3 months ago) by [email protected] to c/[email protected]
 
 

You can find it on crates.io or on GitHub. If you're already on the rc.3, cargo update should automatically pick it up.

Here is the list of fixes since the 0.14.0-rc.3. This is likely the last release candidate!

The estimated release date for the 0.14 is now beginning of next week.

19
 
 

For me, it's just ECS nature and Schedule that optimizes everything for you.

It's near native C / Assembly with safe garbage collection, so everything complex like some simulations should be more doable. I play Tunnet with no stuttering on my Linux machine in 4K and 144Hz!

20
 
 

You can find it on crates.io or on GitHub. If you're already on the rc.2, cargo update should automatically pick it up.

Here is the list of fixes since the 0.14.0-rc.2. This version also has observers merged!

The estimated release date for the 0.14 has been pushed back by one week, to be able to finish the release note and migration guide.

21
22
 
 

Mine is Tunnet. Maybe someone found some gem? Itch.io games also counts, just needs to be made in Bevy!

23
 
 

I don't know if it's the best place to ask this, but I've been having issues with trying to make minesweeper with bevy.

I tried making a function that would give the number of mines around the tile that was clicked if it wasn't a mine. Then, I wanted to make it so that when the number of mines around the clicked tiles is 0, it reveals the surrounding tiles. Finally, I tried making the function recursive by rerunning it on the empty surrounding tiles.

The issue is that it seems that certain tiles with no mines surrounding them don't reveal the surrounding tiles.

Here's the portion of the code I am talking about (I know it's pretty bad):

fn find_surrounding_mines(
                          mut set: ParamSet<(
                              EventReader<TileEntity>,
                              EventWriter<TileEntity>,
                             )>,
                          mut surrounding_mines: EventWriter<SurroundingMines>,
                          mut query_board: Query<&mut Board>,
                          mut change_tile_image: EventWriter<ChangeTileImage>,
                        mut query_mine: Query<(&Mine, &mut Tile)>) {
    let dy: [i8; 8] = [-1, -1, -1, 0, 0, 1, 1, 1];
    let dx: [i8; 8] = [-1, 0, 1, -1, 1, -1, 0, 1];
    
    let board = query_board.single_mut();
    let mut num_mine: u8 = 0;
    let mut y: u8 = 0;
    let mut copy_x: usize = 0;
    let mut tile_read:bool = false;
    let mut copy_num_mine:u8 = 0;
    for tile in set.p0().read(){
        for (row_index, vector) in board.tiles.iter().enumerate(){
            if let Some(x) = vector.iter().position(|&x|x == tile.0) {
                copy_x = x;
                y = row_index as u8;
                for i in 0..8{
                    if x as i8 + dx[i] >= 0 && x as i8 + dx[i] < board.width as i8 && y as i8 + dy[i] >= 0 && y as i8 +dy[i] < board.height as i8{
                        if let Ok((_mine,mut tile)) = query_mine.get_mut(board.tiles[(y as i8 + dy[i]) as usize][(x as i8+ dx[i]) as usize]){
                            num_mine += 1;
                            tile.hidden = false;
                        }
                    }
                }
                break;
            } 
        }
        
        surrounding_mines.send(SurroundingMines(num_mine));
        change_tile_image.send(ChangeTileImage{tile: tile.0, asset: "Minesweeper_LAZARUS_21x21_".to_string() + &num_mine.to_string() + ".png"});
        copy_num_mine = num_mine;
        num_mine = 0;
        tile_read = true;
    }

    if copy_num_mine == 0 && tile_read{
            tile_read = false;
            for i in 0..8{
                if copy_x as i8 + dx[i] >= 0 && copy_x as i8 + dx[i] < board.width as i8 && y as i8 + dy[i] >= 0 && y as i8 +dy[i] < board.height as i8{
                    if let Ok((_mine, mut tile)) = query_mine.get(board.tiles[(y as i8 + dy[i]) as usize][(copy_x as i8 + dx[i]) as usize]){
                        continue;
                    }else{
                        println!("{:?}", (y as i8 + dy[i], copy_x as i8 + dx[i]));
                        set.p1().send(TileEntity(board.tiles[(y as i8 + dy[i]) as usize][(copy_x as i8 + dx[i]) as usize]));
                    }
                }
            }
        }
}
24
 
 

It’s a crate for server-authoritative networking.

Bevy has started drafting release candidates to let users test them before the actual release. And I think it's awesome!

This release adds support for Bevy 0.14.0-rc.2. There are no functional changes.

We haven't released bevy_replicon_renet because we need to wait for bevy_renet. However, other crates, including other messaging backends, won't be blocked.

πŸ“¦bevy_replicon

25
 
 

You can find it on crates.io or on GitHub. Notice that as it's a release candidate, you have to specify the version for it to be selected, it's not automatic.

Please test it on all the strange use cases you have, update the plugins you maintain, and get ready for an exceptional release! The migration guide is still being worked on, but the draft can already prove useful.

For the next two weeks, we'll cherrypick back to the release branch merged PRs from the 0.14 milestone, so that they will be in the 0.14 release. While we will avoid breaking changes, it's still a possiblity one will be merged if there's a big enough issue.

view more: next β€Ί