Jump to content

Drawing Tiles in a Tilemap


DubiousDillan
 Share

Recommended Posts

I like the look of this library but all the abstractions confuse me. In fact, I remember finding pure WebGL simpler to work with than this.

I have a spritesheet of tiles. I'd like to be able to group these tiles into meshes and as far as I understand, that involves just adding them as Sprite objects to a Container or ParticleContainer.

I could create a Sprite object for every single instance of a tile but it seems like a terrible waste.

(I store the tile IDs in an array, not that this should matter.)

What's an efficient way of rendering a tile map? Thanks!

Link to comment
Share on other sites

use pixi-tilemap. if you have only one atlas of tiles, it will be the most faster thing. theres also dev-multitexture branch of it used by RPGmakerMV, supports up to 16 atlases of 1024 size

 

basically, you clear the mesh every time on scrolling or animation. there is built-in animation of simple stuff in shader, thats faster :) in any case you have to study examples and sources. start from master branch, then look in multitexture

Link to comment
Share on other sites

2 hours ago, ivan.popelyshev said:

use pixi-tilemap. if you have only one atlas of tiles, it will be the most faster thing. theres also dev-multitexture branch of it used by RPGmakerMV, supports up to 16 atlases of 1024 size

 

basically, you clear the mesh every time on scrolling or animation. there is built-in animation of simple stuff in shader, thats faster :) in any case you have to study examples and sources. start from master branch, then look in multitexture

Aha, thanks! I spent a while looking at it ^_^

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...