RFC RuleTiles / AutoTiles
#326
frederickjjoubert
started this conversation in
Ideas
Replies: 2 comments
-
Working Example of Autotiling on top of |
Beta Was this translation helpful? Give feedback.
0 replies
-
I would love it if this got implemented. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
RFC
RuleTiles / AutoTiles
Summary
Rule Tiles / Auto Tiles are tiles that automatically update their sprites based on their neighbors / adjacent tiles. Rules supplied by the developer govern which neighbors are allowed or not allowed, and based on their presence, the sprite is updated to match a particular rule.
Motivation
This is a tilemap plugin, and the development of games with tilemaps require rule tiles for developer convenience and development speed. Rule tiles allow developers to build complex tilemaps quickly, both during development for static tilemaps, and at run-time for dynamic tilemaps.
Other engines such as Unity and Godot already support rule tiles / auto tiles.
User-facing explanation
I would imagine Rule Tiles being inserted as a component similar to the current TileBundle and AnimatedTile
Something like this following the current API and basic example:
where
rules
(Vec<(Sprite, Rule)>
) could have the following data structures:Implementation strategy
TBD
Further discussion is needed.
Drawbacks
I don't see any drawbacks to add this feature, it is a staple in other engines that feature tilemaps. The biggst consideration is development time and complexity.
Rationale and alternatives
TBD
Further discussion is needed.
Prior art
Unity
Unity Rule Tiles
Code: https://github.com/Unity-Technologies/2d-extras/blob/master/Runtime/Tiles/RuleTile/RuleTile.cs
Custom Rule Tiles: https://docs.unity3d.com/Packages/com.unity.2d.tilemap.extras@1.6/manual/CustomRulesForRuleTile.html
Godot
Godot AutoTiles
Game Maker Studio
https://gamemaker.io/en/blog/practical-guide-tiles
https://gamemaker.io/en/tutorials/tile-set-editor
Other Articles
https://www.boristhebrave.com/2013/07/14/tileset-roundup/?q=tutorials/tileset-roundup
- Different Tileset behaviors
Unresolved questions
bevy_ecs_tilemap
"under the hood" as far as rendering / draw performance goes, that is outside of my current knowledge.hex
oriso
.Future possibilities
I understand this is a big feature to add to
bevy_ecs_tilemap
, but I do think it is a necessary long term feature to add, especially ifbevy_ecs_tilemap
ends up becoming part ofbevy
itself in the long term.Beta Was this translation helpful? Give feedback.
All reactions