Bevy

367 readers
1 users here now

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

founded 2 years ago
MODERATORS
51
9
Implemented door placement (files.mastodon.social)
submitted 2 years ago* (last edited 2 years ago) by Shatur@lemmy.ml to c/bevy@programming.dev
 
 

Boolean operations in 3D are quite heavy. But fortunately, each wall can be represented as two 2D planes.

To determine which 2D shape I need to cut from the mentioned planes, I add a special plane in Blender with "Cutout" name. This is what The Sims series do.

And for all doors located on a wall I triangulate combined vertices using earcutr. The library API doesn't fit well with Bevy, but it does the trick.

The project is open source, so if you are interested in the implementation, you can take a look at the wall module. I organize my modules as plugins, so you can copy the module and its submodules into your game with some minor edits and enable WallPlugin.

52
 
 

Now walls are separate meshes and take full advantage of ECS, including change detection to rebuild only changed parts.

The new approach also automatically fixed some bugs and enabled instant update of other walls that were affected by currently spawning wall.

53
54
 
 

It was an interesting task and I learned a lot about how meshes are represented internally.

Initially I used 8 vertices for each wall. But then I discovered that if I needed a different color and normal for each side, then I needed a different vertex! So I reworked the mesh generation to make 20 vertices per mesh (for each side with no bottom).

The project is open source, so if you are interested in the implementation, you can take a look at mesh_update_system. I organize my modules as plugins, so you can copy the module and its submodules into your game with some minor edits and enable WallPlugin.

55
 
 

The model made by @YaraGardaria, was posted before in @blender@lemmy.world.

Bevy looks quite nice with normal maps and good lighting settings.

56
 
 

It's a high level networking crate for the Bevy game engine.

After quite some R&D from UkoeHB in Discord and I, the library now features entity visibility control for clients!

The new companion crate bevy_replicon_attributes extends replicon visibility with a highly ergonomic attributes-based API.

See the changelog for a full list of changes.

📦bevy_replicon
📦bevy_replicon_attributes

57
3
Love Bevy asset reloading feature! (files.mastodon.social)
submitted 2 years ago* (last edited 2 years ago) by Shatur@lemmy.ml to c/bevy@programming.dev
 
 

To implement object buttons reloading when changing metadata files, I simply added a system that respawns buttons when metadata changes. Complete separate preview system automatically updates the image. So convenient.

58
59
60
 
 

Intro to a blog series this person is starting up for constructing features for their game in bevy

61
62
63
64
65
66