XML.. whats better..

Monkey Targets Forums/Android/XML.. whats better..

Paul - Taiphoz(Posted 2013) [#1]
Whats better for levels with XML, a single file per level, or all your level data in a massive single file. ?


bruZard(Posted 2013) [#2]
a single file (imho)

level1.xml

currentLevelXML:String = "level" + String(currentLevelID) + ".xml"



rIKmAN(Posted 2013) [#3]
I'd go with a single file per level as well.

Would save having to parse through the file and use minimal memory when loading/changing levels - every little helps especially on mobiles.


Paul - Taiphoz(Posted 2013) [#4]
Single file it is, thanks guys. that changes the need to seek the file I guess so yeah.

/me walks off to change his code. :)


therevills(Posted 2013) [#5]
Totally agree with the guys, single file levels are the way to go.

1. Smaller file = faster loading / parsing
2. Easier to alter levels
3. Easier to load