Code Monkey home page Code Monkey logo

bevy-fast-tilemap's Introduction

Fast Tilemap for Bevy

Crates.io docs

Lightning fast tilemaps for bevy.

Features

  • Very high rendering performance (hundreds of fps, largely independent of map size)
  • Tilemaps can be very large or have many "layers"
  • Rectangular and isometric (axonometric) tile maps.
  • Tiles can overlap either by "dominance" rule or by perspective
  • Optional custom mesh for which the map serves as a texture

Screenshots

iso_perspective custom_mesh

Checkout screenshots/ for more.

How it works

The whole map is rendered as a single quad and a custom shader cares for rendering the correct tiles at the correct position.

Thus each map works with a material, constructed and maintained internally for storing for each tile position which tile index should be displayed there. And the other being a tile atlas that contains all the tiles. This one should be provided by you (see assets/ for atlas examples).

As of this writing, this should be (much) faster than most other bevy tilemap implementations out there.

Limitations

  • Only tested on Windows, no WASM support
  • No direct animation support, but you can easily update the tilemap in regular intervals to achieve the same (see Animation Example)
  • Currently no support for rotating or scaling the entity holding the map (it will not look like you'd expect). (You can of course still zoom/rotate the camera to achieve any such effect)

Related work

If you dont require all of bevy_fast_tilemaps performance and are looking for an approach that supports some more tile shapes and allows to treat each tile as a separate entity, take a look at bevy_ecs_tilemap which (among others) inspired this work.

Examples

Check out the examples/ folder to get an overview. You can run the examples like this:

cargo run --example animation
cargo run --example updates
cargo run --example layers
cargo run --example iso
cargo run --example iso2
cargo run --example bench
...

Bevy Compatibility

bevy bevy_fast_tilemap
0.10.1 0.1.0
0.10.1 0.2.0
0.10.1 0.3.0
0.10.1 0.4.0
0.11.0 0.5.0
0.12.0 0.6.0

bevy-fast-tilemap's People

Contributors

droggelbecher avatar msklosak avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.