thetawavegame / thetawave

A physics based, space shooter game made with Rust and the Bevy engine.
https://thetawave.metalmancy.tech
MIT License
164 stars 9 forks source link

Load backgrounds from scene files #6

Closed cdsupina closed 3 years ago

cdsupina commented 3 years ago

Bevy has the capability to load entities from scene files. https://github.com/bevyengine/bevy/blob/main/examples/scene/scene.rs

Instead of hardcoding backgrounds like what was done in Amethyst Thetawave, we should define the entities in these scene files. Currently, there are gltf model files for the earth and sun located in the Amethyst Thetawave repo. Since everything else in the game (player, enemies, items, etc) is generated at runtime, the scene file should only contain these background model files.

cdsupina commented 3 years ago

Arena border barriers are also constant they can be defined in scene files as well.

cdsupina commented 3 years ago

It seems that at this point scene files aren't meant for/ aren't capable of handling entities at the complexity level needed. If this changes we will switch to scene files, otherwise we can store the data to define level backgrounds in .ron game data files.

Discussion: https://github.com/thetawavegame/thetawave/blob/cdsupina/load_background_scene/src/main.rs