Tilemap Script
version 1.0 /w autotiles
What’s this?
This is another recreation of the hidden tilemap script. Different is maybe that this script runs as fast on a 500×500 map as on a 50×50 map. I took a new way into producing the graphics and threw in some time consuming functions to save cpu for bigger maps. So, what does that mean?
– Works with other Resolutions
– Works with animated autotiles
– Works with priorities
– Completely Commented :bunny:
What’s next?
What am I doing now? I am updating this script at the moment to:
– Incorporate Flash Data (and flashing as one or many sprites)
– Enable the use of the Three SingleXXX constants. Meaning less sprites thus more fps.
You can do it yourself, if you want, but let me release it – it feels like a milestone to get.
What’s new?
Ok, this script differs from others by creating a bitmap of the size BitmapRect which is in the script. By default this will be the WindowRect (viewport) size plus a buffer size, where 1 tile each way is recommended (Set by BitmapWindowOffset).
Why all this shit you might ask – well I can tell you: What I did was only drawing those tiles visible and redrawing it every step. Whoaha, but that is time consuming? Yes, therefor I only draw the NEW tiles! It saves a LOT of FPS.
Only the priority tiles and autotiles are drawn separately.
– AutotileLength determines the number of frames before an autotile get updated.
– KillOutScreenSprite kills any tile sprite outside the bitmap rect is set to true.
– EnableFlashingData enables updating the flashing data, but the methods are missing in this script
And I am working on SingleFlashingSprite, SinglePrioritySprite and SingleAutotileSprite which create one single sprite layer rather then many different. This will save CPU if you have alot of autotiles on screen or lot of priority tiles on screen. But if you don’t use a lot of [i]Animated[/i] autotiles you are better of setting this to false in the next version.
What can I do?
You can test the script, throw in the other tilemap scripts and evaluate the results. I would like to know when one is faster then the other.
Script
http://www.rmxp.org/forums/index.php?topic=58168.0
Credits
Me™ obviously and I used the autotile index array from poccil’s script – not sure who it was that created it in the first place…