Hello Guest

Author Topic: Saving/Loading Tile Map for dynamic levels.  (Read 3973 times)

GameDragon

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 11
    • View Profile
Saving/Loading Tile Map for dynamic levels.
« on: June 01, 2013, 08:26:11 am »
Right now I'm working on creating a Random Dungeon Generator using preset rooms and corridors. The rooms are drawn in a small Tile Map on one scene, iterated through, and saved to a file.
The larger Tile Map parses the files, then draws and builds accordingly.

So far this is working for me fine, but while it's still early, I would like to know if this is the best method to go about this, or is there something simpler or faster I'm missing? I'm thinking that it might get a bit performance heavy if I start adding too many layers.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Saving/Loading Tile Map for dynamic levels.
« Reply #1 on: June 01, 2013, 10:24:10 am »
That is fine. It takes a bit of time to build at startup but that's it really. If necessary you can modify the Build function to run as a coroutine - effectively doing it over a few frames.

Layers don't add significant a performance hit, but you should be careful not to draw many transparent objects stacked on top of each other. This will reduce perf in a big way if you did it. Don't think youre missing anything else - you can do what you're doing - no problem.

GameDragon

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Saving/Loading Tile Map for dynamic levels.
« Reply #2 on: June 01, 2013, 10:36:51 am »
Great. Thank you for the clarification. :D