Jump to content

Best file format for loading level data?


Ross
 Share

Recommended Posts

Hey all,

 

     I'm wondering what is the best way to load level data into a game.  I'm considering, XML, JSON, comma delineated files, or anything else.  I've seen some of the examples for loading data, but I'm wondering if anyone has any real world experience with it.  What I'm trying to accomplish is to feed a game level some parameters and using them to randomly create a new level. I'd like the technique to work for a mobile version of the game as well (using Cocoon, or something similar).

 

Thanks,

Ross

Link to comment
Share on other sites

I'm not sure what either of you mean by "best". "Best" by what measure? I don't think the level format loading time makes much difference compared to loading assets, or, in Phaser's case, actually constructing the tilemap. I'm pretty sure you're safe using whatever format the tool you like generates that Phaser can read.

 

Ross: If you need to dynamically modify the map at runtime, I would use JSON since, in JS, it's just an object.

Link to comment
Share on other sites

Thanks drhayes!  I think my use of "best" was probably the wrong way to phrase the question.  I thought I read somewhere that Cocoon does not support XML, or JSON, or another format.  I should have asked what is the "best practice" for loading data into Phaser if I plan on using Cocoon.  thanks again.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...