Bevy

386 readers
1 users here now

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

founded 2 years ago
MODERATORS
76
 
 

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.

77
78
 
 

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.

79
 
 

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

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