I tried to put what I learned since this post to create this, but I could not.
What' I'm trying to do is whenever the player moves over 8 pixels floor(scrollx/8) that it destroys the tileset objects outside of a preset range. The tiles are 8x8 large
and I've made some events that may reflect that.
<img src="http://i.imgur.com/1GzFGrD.png" border="0" />
Only problem is that it seems to generate duplicate tiles, and not properly delete them, along with taking too long to calculate everything.
At the moment I have 683 objects total spawned on my layout, and it's a medium sized layout. I expect to reach 1000+ on a real level and I am worried if that might affect gameplay. In the spirit of optimizing what the game does, I want to see if there is a way to only create/use the tiles within a boundry (+/- 12) on the tilemap array efficiently. There has to be a way