Example implementation of a 3d hexagon tile-based map editor using bevy

Overview

bevy-hex-sandbox

Example implementation of a 3d hexagon tile-based map editor using bevy v0.10.

smol.mov

This is not a maintained project.

Instead, this is a series of example implementations of how a series of capabilities could be implemented in bevy. There are no guarantees that any of the implementations are idiomatic.

Capabilities/Functionality:

  • Maintainable/scaleable egui interface
    • adapted from bevyengine/bevy#5522
    • widgets aren't required to implement SystemParam
    • implementation: src/ui/widget.rs
    • complex usage: src/bin/editor_ui/panel.rs
  • Reorganizable egui tile picker
    • multi-select, drag & drop to sort
    • implementation editor_ui::panel::TilePicker
  • Render images of GLTF models
    • use a second camera & RenderLayers to render each GLTF scene into an image
    • implementation: src/thumbnail_render.rs
  • native file pickers (save & load) via IoTask & rfd crate
    • src/file_picker.rs
  • IoTask-based save & load (not using Assets)
    • When bevy's Asset infrastructure is too heavy-weight for loading config data, we can use IoTask to load & return the results
    • implementation tileset::tileset_importer & tileset::tileset_exporter
    • more complicated example in src/persistence.rs
  • Serialize (not reflection) based save/load
    • When you need to save a framework agnostic format (example: map file) reflection-based formats expose too many internals
    • Reflection-based save also causes noise in diffs due to Entity values changing between each run
    • implementation: src::persistence::MapFormat
    • not fully diff-stable at this time (tiles not sorted)
    • format needs improvements for diffs to be fully human readable
  • version-aware save/load
    • limited support, recognizes incorrect version
    • can be expanded to generate intermediate representation based on what the version provides
    • see Tileset::Serialize/Deserialize

Assets

Assets included in this project were created by Kenney, and available at https://kenney.nl/assets/hexagon-kit

Usage

  • File -> New Map
  • In the Tileset panel, click the "..." button and select "Import Tileset"
    • Note: bug here, may have to click it multiple times
  • Select "kenney.tileset.ron"
  • click on tile then click on map

Controls

  • Q/E: Rotate currently selected tile
  • [ / ]: Rotate camera
  • Scroll wheel: zoom in/out
  • Space + mouse move: pan camera
You might also like...
Minecraft-esque voxel engine prototype made with the bevy game engine. Pending bevy 0.6 release to undergo a full rewrite.
Minecraft-esque voxel engine prototype made with the bevy game engine. Pending bevy 0.6 release to undergo a full rewrite.

vx_bevy A voxel engine prototype made using the Bevy game engine. Goals and features Very basic worldgen Animated chunk loading (ala cube world) Optim

Bevy Simple Portals is a Bevy game engine plugin aimed to create portals.
Bevy Simple Portals is a Bevy game engine plugin aimed to create portals.

Portals for Bevy Bevy Simple Portals is a Bevy game engine plugin aimed to create portals. Those portals are (for now) purely visual and can be used t

A networked (p2p), cross-platform physics simulation example using rollback netcode

bevy_gaff (work in progress) bevy_gaff is an attempt at making a networked (p2p), cross-platform physics simulation using rollback netcode. It synchro

A feature-rich, production-ready, general purpose 2D/3D game engine written in Rust with a scene editor.
A feature-rich, production-ready, general purpose 2D/3D game engine written in Rust with a scene editor.

A feature-rich, production-ready, general purpose 2D/3D game engine written in Rust with a scene editor.

Reads files from the Tiled editor into Rust

rs-tiled Read maps from the Tiled Map Editor into rust for use in video games. It is game engine agnostic and pretty barebones at the moment. Document

A simple space shooter game. Runs in the terminal using characters-based UI. Fully written in Rust, using the
A simple space shooter game. Runs in the terminal using characters-based UI. Fully written in Rust, using the "ruscii" library.

Thrust - a terminal shooter game Originally created as a project for the "Missing Semester" course at JKU Linz (338.006). The game is entirely written

A physics lib for the bevy game engine based on physme

physimple Physimple aims to be the simplest(and capable) physics engine(currently for bevy) WARNING Beware for breaking changes with each update for n

Bevy plugin for an AssetServer that can load embedded resources, or use other AssetServers based on the path.

Bevy-Embasset Embed your asset folder inside your binary. bevy-embasset adds support for loading assets embedded into the binary. Furthermore, it can

Rapidly iterate and build Bevy UI's with existing web-based technologies
Rapidly iterate and build Bevy UI's with existing web-based technologies

bevy_webview WIP   Rapidly iterate and build Bevy UI's with existing web-based technologies It is currently very early days of this plugin - only Linu

Owner
David M. Lary
David M. Lary
A simple camera for properly displaying tile-based low resolution pixel perfect 2D games in bevy.

Bevy Tiled Camera A simple camera for properly displaying low resolution pixel perfect 2D games in bevy. The camera will adjust the viewport to scale

sark 10 Oct 5, 2022
A simple extension for `bevy-editor-pls` to support tilemap editing right inside the bevy app.

What is this This is a simple tilemap editor plugin, that hooks right into bevy_editor_pls to work with bevy_ecs_tilemap. It works completely within i

null 3 May 8, 2023
Work-in-Progress NES / Famicon Image Editor & Map Creator

NESImg An extremely work-in-progress tool for making NES/Famicom-compatible images. When faced with the challenge of formatting artwork in a way that

Katharos Technology 10 Nov 24, 2022
Quake .map files for the Bevy game engine.

Qevy A plugin that adds Quake .map file support for the Bevy game engine Supported Bevy Versions: 0.12 Supported Physics Engines: XPBD (Rapier coming

Brian Howard 8 Nov 12, 2023
Minecraft using Bevy and Bevy-Meshem

minecraft_bevy Minecraft_bevy was built to showcase bevy_meshem. After a week of developing it has: Chunk loading / unloading each chunk's mesh is bei

Adam 7 Oct 4, 2023
bevy-hikari is an implementation of voxel cone tracing global illumination with anisotropic mip-mapping in Bevy

Bevy Voxel Cone Tracing bevy-hikari is an implementation of voxel cone tracing global illumination with anisotropic mip-mapping in Bevy. Bevy Version

研究社交 208 Dec 27, 2022
2d collision test for game-development in rust (with optional integration and example for bevy)

impacted 2d collision test for game-development in rust (with optional integration and example for bevy) This provides a low-level "narrow-phase" coll

Jonathan Cornaz 17 Nov 5, 2022
A simple example showcasing how to use Bevy to display a square with acceleration (controllable with your keyboard) that wraps around the screen!

Bevy Wrapping Square example A simple example showcasing how to use Bevy to display a square with acceleration (controllable with your keyboard) that

Luciano Mammino 3 Oct 23, 2022
2D and 3D physics engine based on Extended Position Based Dynamics for Bevy.

Bevy XPBD Bevy XPBD is a 2D and 3D physics engine based on Extended Position Based Dynamics (XPBD) for the Bevy game engine. Design Below are some of

Joona Aalto 203 Jul 6, 2023
Using bevy and custom render pipelines in order to render many objects in a forest using chunks for performance.

bevy_efficient_forest_example Using bevy and custom render pipelines in order to render many objects in a forest using chunks for performance. Grass i

Henrik Djurestål 43 Jan 5, 2023