Jump to content

Increase optimization of my Tiled Map rendering


visgotti
 Share

Recommended Posts

Here's my current logic

split up the tileset image into an array of 64 x 64 textures (the index correlates to the tile id)

split up the map into sections max size of each section is 640 x 640 and create a container for that section. 

create a sprite for each tile in that section, and add it to the section's container

check if the section container is visible to the player based on the current screen size, if it is then set that section's container visible to true, otherwise set it to false.

I'm getting terrible performance doing it this way, if I make the screen small my fps is fine, but once I maximize the screen or make it a little larger the fps drops significantly.

 

Does anyone see the flaw in my system as to why I'd be getting terrible performance doing it this way?

 

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...