Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Tilemap Crash

Hi,

Does anyone has experimented with multiple tilemaps ? I'm currently working on a project using more than one "map" on the screen, and changing maps (ie resetting the spriteset -> creating a new Tilemap) would sometime crash the game with a nasty error message :
http://i66.photobucket.com/albums/h251/ ... /crash.jpg[/IMG]

It happens exactly within the Tilemap.update function.
However, using only one Tilemap (with the same conditions) prevent this.

I'm planning on using Seph's rewritten tilemap (and hope for trebor777 to do his C rewrite) to solve this, but would appreciate if someone had an idea on how to prevent those crashes.
 
Hmmm... Pretty odd error (and pretty odd seeing you post a help topic).

Not sure what the error is. If you are just using the default Tilemap class, who knows since it is hidden from us to view. I really have no idea.
 
Using Seph's rewrite, I get a "bitmap disposed" error, so I guess I made a mistake before.

But now at least we know what happens when you update a disposed tilemap :p

Edit : it's actually stranger than that... It seems to be a case of disposal in one spriteset while the other is still running.

Edit2 :
Code:
          begin #Rataime's edit. Don't know why it crashes here, but it does.
          next unless @autotiles[id / 48 - 1].width / 96 > 1 if id < 384
          rescue
          end
at line 495 of Seph's script solve the problem...
 
I think it's something on your end because I've already worked with up to 4 tilemap at once and (except the lag) I never encountered any problems?
Are you using the same or different viewport(s) for your tilemaps?

Also, what are the specs of your comp? If you've loaded too much data into the RAM then that might be the problem.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top