All notable changes to this project will be documented in this file. Usually just additions, fixes as well as if the API had been added to.
This project adheres to Semantic Versioning.
- Respawn panic and collision tile offsets.
- Deprecated
ncollide
replaced withncollide2
(technically this work was postponed but worth mentioning). - Fix deprecated uses of
add_layer_with_kind
. - Fixed missing
texture_dimensions
inphysics_dungeon
.
- Added 3D capabilities to the tilemap. No more being locked to a 2nd dimension!
- Added
TilemapBundle
visibility,Visible
, support which allows the visibility to be added to the tilemap and changed for all chunks if needed. - Added
z_order
andsprite_order
fields toTile
. - Added
MissingTextureDimensions
error toTilemapError
. - Added
event
module which allows use of theTilemapChunkEvent
. - Added
auto_spawn
to theTilemap
. - Added
clear_layer
to theTilemap
which enables clearing of whole layers.
- Updated to Bevy 0.5
- Renamed
Tilemap2DPlugin
toTilemapPlugin
as now the tilemap supports both 2D and 3D. Lets not get carried away here and go beyond the 3rd dimension! Chunk
was made private as it never was meant to be public. Oops.- Changed
RawTile
to be public. Now you can see raw details of the tiles. - Made the
TilemapError
inner public. TilemapBuilder::chunk_dimensions
now requires an extra argumentdepth
. You probably do not want to set this to 0.Tilemapbuilder::tile_dimensions
was renamed toTilemapBuilder::texture_dimensions
. Makes it more exact, especially since tile dimensions are coming in the next update which are totally different (sorry, not sorry. It was you that decided to use an experimental game engine with an experimental plugin :D.)TilemapBuilder::add_layer
now takes in the newTilemapLayer
. It does only have 1 field right now but this is expected to change at some point. Yay being ... prepared?- As with the above,
Tilemap::add_layer
also takes in the newTilemapLayer
. Tilemap::new
now requires a width and height of the texture.- Anywhere that was required to take in a
Point2
for a tile is now aPoint3
and while this technically is breaking, this shouldn't affect the API.
Tile::new
, all fields were made public instead. That goes with all the many terribly thought out constructor patterns that should've never existed.- Removed
render
module from public API. TilemapBuilder::auto_configure
was purged. It no longer is needed.
- Added bevy_log logging #88
- Auto configuration of optimal chunk sizes to texture size as well as checks
to ensure that the tiles are divisible into each other had been added. This can
be enabled in the
TilemapBuilder
withauto_configure
. - Auto chunk which will create new chunks automatically if you push a tile into
it. This can be enabled in the
TilemapBuilder
withauto_chunk
- Optional dimension 2D and 3D API.
TilemapDefaultPlugins
was added.point
anddimension
modules were moved tobevy_tilemap_types
crate but still accessible as normal and optional.- Example
stress_dwarves
has been added to benchmark and stress test. - Various hex orientations were added (thanks @jamadazi!).
- A hex example
random_world
was added to showcase one of the hex orientations. Tilemap::get_tile
method was added to get a reference to a tile.Tilemap::get_tile_mut
method was added to get a mutable reference to a tile. This should make it easier to do animations.Tilemap::tile_to_chunk_point
method is nowpoint_to_chunk_point
.tile:RawTile
is now public API but not included in the prelude as it is not meant to be constructed.- Examples for all tile orientations.
- Library is able to work with WASM.
- Default plugin for Tilemap was introduced.
- The whole project was mostly refactored.
ChunkTilesPlugin
is nowTilemap2DPlugin
.TilemapBuilder::build()
is nowTilemapBuilder::finish()
to be consistent.- Point module was now made optional.
- Changed the
random_dungeon
example to be more like an actual implementation. Tile
had all generics removed from it.Tilemap::new_chunk
is nowTilemap::insert_chunk
to reflect the storage internally.- It is now required to specify if chunks are to be auto created in the
TilemapBuilder
withauto_chunk
method. Tilemap::remove_tile
was renamed toclear_tile
. This makes more sense as it may be deleted if it is a sparse tile, else it is simply cleared if it is dense.Tilemap::contains_chunk
method was added to check if the tilemap contains a chunk or not already.TilemapComponents
renamed toTilemapBundle
to stay inline with Bevy API.ChunkComponents
renamed toChunkBundle
to stay inline with Bevy API.- All examples were updated for latest bevy.
Point2
andPoint3
deprecations were removed.
- Examples moved to its own library temporarily. This is a Bevy 0.4 issue where
you can not place
bevy
into the dev-dependencies of the Cargo.toml. - Hex Y-axis is not perfectly centred.
Tilemap::clear_tile
was added to easily clear a single tile.Tilemap::clear_tiles
likewise will clear an array of tiles.Point2
now implementsFrom<&Point2>
.Point3
now implementsFrom<&Point3>
.tilemap::Tilemap::set_tiles
now implementsIntoIterator<Item = ((i32, i32, i32), Tile)>
which had broken the previous compatibility.tile::Tile
had thenon_exhaustive
derive added it now that the fields are all public.tile::Tile
added methodswith_tint
andwith_tint_and_sprite_order
.chunk_update_system
was added internally to manage chunks and to get them to update if needed.
random_dungeon
example was updated to be interactive.Tilemap::set_tiles
was changed to take in aIntoIterator<Item = Tile<P, C>
, whereC
isInto<Color>
and P isInto<Point2>
, fromIntoIterator<Item = (i32, i32, i32), Tile>
.tile::Tile
was changed to includesprite_order
,sprite_index
, andpoint
. Fieldcolor
is nowtint
. All fields were made public.tile::Tile
methodsdefault
,new
updated.ChunkDimensions
was made private, it should never of been exposed but I also very much doubt anyone would have used it.map_system
was made private, it should never of been exposed.add_tile
was renamed toinsert_tile
.add_tiles
was renamed toinsert_tiles
.clear_tile
was renamed toremove_tile
.clear_tiles
was renamed toremove_tiles
.
Before
let sprite_order = 0;
let point = (1, 1, sprite_order)
let tile = Tile::new(0);
let tiles = vec![(point, tile)];
// defined elsewhere
tilemap.set_tiles(tiles).unwrap();
After
let point = (1, 1);
let sprite_order = 0;
let tiles = vec![Tile::new(point, sprite_order)];
// defined elsewhere
tilemap.set_tiles(tiles).unwrap();
Tilemap::set_tile
was changed to take inTile<P, C>
, whereP
isInto<Point2>
andC
isInto<Color>
. This replaces the previous argumentP
andT
whereT
wasInto<Tile>
.
Before
let point = (9, 3, 0);
let sprite_index = 3;
let tile = Tile::new(sprite_index);
// defined elsewhere
tilemap.set(point, tile).unwrap();
After
let point = (9, 3);
let sprite_index = 3;
let tile = Tile::new(point, sprite_index);
tilemap.set_tile(tile).unwrap();
tile::Tiles
was removed as it is no longer needed as all data as been set intoTile
to make everything easier.tile::Tiles
was removed fromprelude
.tile::Tile
methodsindex
andcolor
were removed as the fields are now public.tile::Tile
all<Into<Tile>>
implements were removed.
- Minimum supported rust version (MSRV) were noted to be 1.43.0 in documents.
- Coordinates were fixed so that 0,0 is now by default the center of the area, not the bottom left per chunk.
- Coordinates outside of a single chunk were fixed so that they do not cause a panic.
- Missing doc links were fixed.
Tilemap::set_tiles
now implementsIntoIterator<Item = ((i32, i32, i32), Tile)>
which had broken the previous compatibility.
Before
let mut tiles = Tiles::default();
for y in 0..31 {
for x in 0..31 {
tiles.insert((x, y, 0), 0.into());
}
}
// Constructed Tilemap
tilemap.set_tiles(&mut tiles);
After
let mut tiles = Tiles::default();
for y in 0..31 {
for x in 0..31 {
tiles.insert((x, y, 0), 0.into());
}
}
// Constructed tilemap
tilemap.set_tiles(tiles);
Point2
implAsRef<(i32, i32)>
andAsMut<(i32, i32)>
as it is not possible to deprecate it.
Point2
methods.x()
and.y()
were deprecated to be inline with glam crate.Point3
methods.x()
,.x()
, and.z()
were deprecated to be inline with glam crate.
Unfortunately some fairly big issues were released as more examples were being made. These were fairly critical as they absolutely hindered the goals of the library. These have now since been fixed. Thanks to all that pointed out the issues.
ChunkDimensions
component to help the renderer know the dimensions of a chunk.Layer
trait was added internally to implement the same methods on layers.DenseLayer
andSparseLayer
structs were added internally to provide different methods of storing tiles.LayerKind
enum was added to help specify what kind of layer needs to be created.LayerKindInner
enum was added internally to help wrapDenseLayer
andSparseLayer
.Chunk
struct was added internally to store its location and sprite layers.ChunkComponents
entity was added internally to help spawn chunks.TilemapComponents
entity was added to help spawn tilemaps.prelude
module was added versioned.ChunkMesh
was added to add meshes to rendered layers.point
module was added publicly withPoint2
andPoint3
structs which help with various operations to do with coordinates. They are not required to be used at all.- Render pipelines were added with GLSL shader files.
Tile
struct was added publicly which stores the index value of a texture in a texture atlas.Tiles
a type forHashmap<(i32, i32, i32), Tile>
was added publicly. Helps to set tiles in bulk.TilePoints
was added privately which is similar toTiles
but stores the newPoint3
s instead.dense_tiles_to_attributes
andsparse_tiles_to_attributes
were added to help turn layers into attributes for the renderer.Tilemap
was added with a variety of new public API to help construct new tilemaps.TilemapBuilder
factory was added to help construct newTilemap
s.- Chunks with odd dimensions can now be spawned. (Thanks @blamelessgames!)
- Updated
random_dungeon
example to use latest features. - Changed
serde
to be and optional feature. - Changed
Dimension2
andDimension3
into a struct and changed them extensively. They were also made into private API. - Changed
map_system
had been updated to accommodate for the newTilemap
.
Chunk
trait was made into a struct and vastly changed as well as made internal.WorldChunk
struct was removed entirely.WorldMap
struct was removed entirely.Tile
trait was removed and replaced with aTile
struct.coord
module was removed entirely.dimension
module was made internal.Dimension2
andDimension3
traits were made into structs and made internal.ChunkTilesPlugin
had all the generic traits removed, replaced with structs. This makes it easier for people to use the library and encourages others to help contribute instead of keeping all the sweet updates to themselves. In the future, generic traits will likely be brought back.DimesionError
andDimensionResult
were made private.MapError
was renamed toTilemapError
and made private.MapResult
was renamed toTilemapResult
and made private.MapEvent
was renamed toTilemapEvent
and made private.
The breakpocalypse is here... But with good reasons why!
This was the actual update that made tilemap into mostly what was intended to be on release however, due to the clear early need a naive version was pushed for v0.1.0. Before, everything was rendered from textures that were made by the CPU for use with the GPU. Through proper research, help from the Bevy community, and education on GLSL shaders, shaders were created to offload all the work onto the GPU.
The huge downside though is that pretty much 98% of the API had been broken entirely. So, extra time and effort was put in this time to ensure that the API will be stable from now on and going forward. Proper deprecation warnings and everything will be done from here on.
It was really considered to bring back all the API but, that would have been too much work from here and onwards. Plus, it was warned that the API will be broken between v0.1 and v0.2.
- No more CPU work, all on the GPU with GLSL shaders.
- Huge breaking API changes everywhere, oh my! (I warned it would happen :)...)
- All traits removed, replaced with structs for early day simplicity.
- Dense and sparse layers were added to cut down on data use and increase performance where necessary.
Thank you so much @alec-deason, @alexschrod and @superdump for all your feedback, suggestions and help understanding everything needed for this release.
- Rebranded from
bevy_chunk_tiles
tobevy_tilemap
. TileSetter
had apush_stack
method added to it which allows for a wholeVec<Tile>
. This is then rendered from index 0. For example, if you want to render a character sprite with a tile background you would push the tile in first then add in the character after. It is recommended to track if the floor tile in that previous example had something on top of it before or not to cut down on pushing the floor tile twice, which is wasteful.
- Initial release