You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 13, 2021. It is now read-only.
TileInstance was originally setup so that we could try to take advantage of Rust's ownership system when moving tiles around with the hope of avoiding bugs that could result from accidentally duplicating a tile. However, in practice a lot of communication around tiles is based around TileId. This is especially common around client/server communication, where we always send a TileId rather than a full TileInstance in order to minimize bandwidth usage. With the addition of tile::by_id() it's now possible to look up the value of a tile with just its ID, making TileInstance effectively pointless.
At this point we should remove TileInstance and just use TileId everywhere, using tile::by_id() to lookup the value of the tile in the cases where it is needed. In practice it may still be convenient to keep TileInstance so that we can have a concept of a combine (ID + value) pair when referring to a tile, but we should largely remove from the public APIs of the different components of the game.
The text was updated successfully, but these errors were encountered:
TileInstance
was originally setup so that we could try to take advantage of Rust's ownership system when moving tiles around with the hope of avoiding bugs that could result from accidentally duplicating a tile. However, in practice a lot of communication around tiles is based aroundTileId
. This is especially common around client/server communication, where we always send aTileId
rather than a fullTileInstance
in order to minimize bandwidth usage. With the addition oftile::by_id()
it's now possible to look up the value of a tile with just its ID, makingTileInstance
effectively pointless.At this point we should remove
TileInstance
and just useTileId
everywhere, usingtile::by_id()
to lookup the value of the tile in the cases where it is needed. In practice it may still be convenient to keepTileInstance
so that we can have a concept of a combine(ID + value)
pair when referring to a tile, but we should largely remove from the public APIs of the different components of the game.The text was updated successfully, but these errors were encountered: