5 releases (3 breaking)

Uses new Rust 2021

0.4.0 Nov 14, 2022
0.3.0 Aug 18, 2022
0.2.0 Jun 9, 2022
0.1.1 Jun 2, 2022
0.1.0 Jun 1, 2022

#226 in Game dev

Download history 14/week @ 2022-08-12 37/week @ 2022-08-19 35/week @ 2022-08-26 6/week @ 2022-09-02 22/week @ 2022-09-09 8/week @ 2022-09-16 8/week @ 2022-09-23 10/week @ 2022-09-30 6/week @ 2022-10-07 1/week @ 2022-10-14 9/week @ 2022-10-21 6/week @ 2022-10-28 15/week @ 2022-11-04 29/week @ 2022-11-11 7/week @ 2022-11-18 9/week @ 2022-11-25

61 downloads per month

MIT/Apache

110KB
2K SLoC

Build Status Latest Version Rust Documentation

Bevy YOLECK - Your Own Level Editor Creation Kit

Yoleck is a crate for having a game built with the Bevy game engine act as its own level editor.

Features

  • Same executable can launch in either game mode or editor mode, depending on the plugins added to the app.
  • Write systems that create entities based on serializable structs - use same systems for both loading the levels and visualizing them in the editor.
  • Entity editing is done with egui widgets that edit these structs.
  • Support for external plugins that offer more visual editing.
    • One simple such plugin included behind feature flag - vpeol_2d.
  • Playtest the levels inside the editor.

Examples:

File Format

Yoleck saves the levels in JSON files that have the .yol extension. A .yol file's top level is a tuple (actually JSON array) of three values:

  • File metadata - e.g. Yoleck version.
  • Level data (placeholder - currently an empty object)
  • List of entities.

Each entity is a tuple of two values:

  • Entity metadata - e.g. its type.
  • Entity data - that's the user defined struct

The reason tuples are used instead of objects is to ensure ordering - to guarantee the metadata can be read before the data. This is important because the metadata is needed to parse the data.

Yoleck generates another JSON file in the same directory as the .yol files called index.yoli. The purpose of this file is to let the game know what level are available to it (in WASM, for example, the asset server cannot look at a directory's contents). The index file containes a tuple of two values:

  • Index metadata - e.g. Yoleck version.
  • List of objects, each contain a path to a level file relative to the index file.

Versions

bevy bevy-yoleck
0.9 0.4
0.8 0.3
0.7 0.1, 0.2

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~21–31MB
~602K SLoC