Sign in to follow this  

2D Level Loading and Storing

This topic is 2832 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm curious, what method do you typically use to store and load your 2D Levels or other game configuration data? I've typically used a simple .txt file with a bunch of coordinates and specs written out that my loader parses and builds the levels from. I've also used Java's Serializable interface to save fully loaded levels and objects. I'm currently experimenting with using a .xml file to store entries and attributes and loading the data through an xml parser. I know this is probably not the best way, but I'm experimenting. What does everyone think?

Share this post


Link to post
Share on other sites
I just use xml myself usually - it's not as space efficient as a custom binary format, but I find it copes better with format changes which occur as you add new features and functionality. Most of the time you can just add new elements and attributes and make your level loader substitute defaults if they're not found.

If you're really worried about file size and loading time then you can always convert the xml files into a custom binary one when your game is nearly finished (or support both and keep the binary export as part of your build process for actual releases).

Share this post


Link to post
Share on other sites
I'm developing a 3D gaming engine and I use XML as my file format for everything. I wrote a plug-in for MilkShape that exports all my geometry in XML. Sure I could do it in binary but there's nothing like being able to look at all your data if you need to. Using XML to hand code other types of information is very useful. Your really don't want to code data into your game. I may switch the geometry part over to binary in the future. But, at this point, speed is not an issue.

I wouldn't worry about file size. XML is a text file so it compresses well. Art and sound is what will fatten your game.

Share this post


Link to post
Share on other sites
Quote:
Original post by howie_007
You really don't want to code data into your game.

I got away from hard-coding data into the game rather quickly. The stuff is a nightmare to maintain and update.

I'm starting to like the xml method of storing data (even though I'm not even halfway done with the first game I'm building that uses it). It's tedious at first, but modular and easily altered, and file size was never an issue.

I was just wondered what methods other game programmers use.

Share this post


Link to post
Share on other sites
Quote:
Original post by joedono
I got away from hard-coding data into the game rather quickly...

...It's tedious at first, but modular and easily altered, and file size was never an issue.
That's what I like to hear.

Below is the output of a simple box from my MilkShape XML exporter

<?xml version="1.0" encoding="utf-8" ?>
<!-- Export: Left handed System -->
<mesh>

<vert_list count="8">
<vert x="-4.984375" y="5.015625" z="-5.015615" />
<vert x="-4.984375" y="-5.015625" z="-5.015615" />
<vert x="4.984375" y="5.015625" z="-5.015615" />
<vert x="4.984375" y="-5.015625" z="-5.015615" />
<vert x="4.984375" y="5.015625" z="5.015617" />
<vert x="4.984375" y="-5.015625" z="5.015617" />
<vert x="-4.984375" y="5.015625" z="5.015617" />
<vert x="-4.984375" y="-5.015625" z="5.015617" />
</vert_list>

<uv_list count="4">
<uv u="0.000000" v="0.000000"/>
<uv u="0.000000" v="1.000000"/>
<uv u="1.000000" v="0.000000"/>
<uv u="1.000000" v="1.000000"/>
</uv_list>

<vert_norm_list count="10">
<vn x="0.000000" y="0.000000" z="1.000000"/>
<vn x="1.000000" y="0.000000" z="0.000000"/>
<vn x="0.707107" y="0.707107" z="0.000000"/>
<vn x="0.707107" y="-0.707107" z="0.000000"/>
<vn x="0.000000" y="0.000000" z="-1.000000"/>
<vn x="-0.707107" y="0.707107" z="0.000000"/>
<vn x="-0.707107" y="-0.707107" z="0.000000"/>
<vn x="-1.000000" y="0.000000" z="0.000000"/>
<vn x="0.000000" y="1.000000" z="0.000000"/>
<vn x="0.000000" y="-1.000000" z="0.000000"/>
</vert_norm_list>

<face_group count="12">
<face_list count="12" mIndex="0">
<face v1="0" v2="2" v3="1" uv1="0" uv2="2" uv3="1" vn1="0" vn2="0" vn3="0"/>
<face v1="1" v2="2" v3="3" uv1="1" uv2="2" uv3="3" vn1="0" vn2="0" vn3="0"/>
<face v1="2" v2="4" v3="3" uv1="0" uv2="2" uv3="1" vn1="1" vn2="2" vn3="1"/>
<face v1="3" v2="4" v3="5" uv1="1" uv2="2" uv3="3" vn1="1" vn2="2" vn3="3"/>
<face v1="4" v2="6" v3="5" uv1="0" uv2="2" uv3="1" vn1="4" vn2="4" vn3="4"/>
<face v1="5" v2="6" v3="7" uv1="1" uv2="2" uv3="3" vn1="4" vn2="4" vn3="4"/>
<face v1="6" v2="0" v3="7" uv1="0" uv2="2" uv3="1" vn1="5" vn2="7" vn3="6"/>
<face v1="7" v2="0" v3="1" uv1="1" uv2="2" uv3="3" vn1="6" vn2="7" vn3="7"/>
<face v1="6" v2="4" v3="0" uv1="0" uv2="2" uv3="1" vn1="5" vn2="2" vn3="8"/>
<face v1="0" v2="4" v3="2" uv1="1" uv2="2" uv3="3" vn1="8" vn2="2" vn3="8"/>
<face v1="1" v2="3" v3="7" uv1="0" uv2="2" uv3="1" vn1="9" vn2="9" vn3="6"/>
<face v1="7" v2="3" v3="5" uv1="1" uv2="2" uv3="3" vn1="6" vn2="9" vn3="3"/>
</face_list>
</face_group>

<material_list count="1">
<material defuse="game_art/top.png" alpha=""/>
</material_list>

</mesh>



The xml is much more manageable when you make use the attribute's tags.

Below is a hand coded xml for loading my light information

<?xml version="1.0" encoding="utf-8" ?>
<lightList>

<light name="point" type="point" castShadow="yes">
<defuse r="0.6" g="0.6" b="0.6"/>
<specular r="0.0" g="0.0" b="0.0"/>
<ambient r="0.0" g="0.0" b="0.0"/>
<position x="-30.0" y="0.0" z="-25.0"/>
<direction x="0.0" y="0.0" z="0.0"/>
<properties range="500" falloff="0"/>
<attenuation attenuation0="1.2" attenuation1="0.0" attenuation2="0.0"/>
<spotlight theta="0" phi="0"/>
</light>

<light name="dir" type="directional" castShadow="no">
<defuse r="0.6" g="0.6" b="0.6"/>
<specular r="0.5" g="0.5" b="0.5"/>
<ambient r="0.0" g="0.0" b="0.0"/>
<position x="0.0" y="0.0" z="0.0"/>
<direction x="1.0" y="-1.0" z="1.0"/>
<properties range="300" falloff="150"/>
<attenuation attenuation0="1.5" attenuation1="0.0" attenuation2="0.0"/>
<spotlight theta="0" phi="0"/>
</light>

<light name="spot" type="spot" castShadow="no">
<defuse r="0.5" g="0.5" b="0.5"/>
<specular r="0.5" g="0.5" b="0.5"/>
<ambient r="0.3" g="0.3" b="0.3"/>
<position x="20.0" y="0.0" z="60.0"/>
<direction x="1.0" y="0.0" z="0.0"/>
<properties range="40.0" falloff="5.0"/>
<attenuation attenuation0="1.0" attenuation1="0.0" attenuation2="0.0"/>
<spotlight theta="1.0" phi="0.5"/>
</light>

</lightList>



Just to show you some examples.

[Edited by - howie_007 on March 10, 2010 11:44:47 AM]

Share this post


Link to post
Share on other sites
I moved from flat files to SQLite database files a while ago for everything and never looked back. It is fast, portable, easy to embed into just about any program (bindings to C/C++/C#, java, perl, ruby, php and more) and uses very little resources.

I would imagine it has some performance gains over an XML file for reading and writing in particular since it doesn't always have to rewrite the entire file when you add more data.

I use SQL daily at my job so this was an easy transition for me. I never liked traversing XML documents and a database just makes sense to me. It takes a little planning to get right (think of columns as attributes for a class/struct and rows as instances) but in the end it is worth it.

One argument I usually get for suggesting this is that it isn't a human readable format. I usually point them towards one of the many SQLite GUI apps such as SQLite Studio or SQLite Administrator that allow you to browse and modify the schema and data in a way that is much easier and safer than notepad and XML IMHO.

Share this post


Link to post
Share on other sites
Quote:
Original post by joedono
I'm curious, what method do you typically use to store and load your 2D Levels or other game configuration data?


My current project is heavily scripted in Lua (the gameplay portions anyhow) so for configuration data, i just use a lua file that looks something like the below:

--------------
--Graphics
--------------

ScreenWidth=1024
ScreenHeight=768

--------------
--Input
--------------

MouseSensitivity = 0.8

Believe it or not, my map files are also just lua files. I have an editor, and my game is a 3rd overhead view RPG, but to load a map file it executes the lua script, and to save a map file, it just loops through the objects of the world and writes out the lua commands to load them and set all their properties correctly. So a portion of my map files might look like this:

Music_Play("./Audio/Music/Intro.mp3");

ChairModel = Model_Load("./Art/Models/Furniture/Chair.ms3d");
Model_SetScale(ChairModel,0.5,0.5,0.5);
Model_SetPos(CharModel,100,200,50);
Model_SetRot(ChairModel,0,13,0);

etc (:

Share this post


Link to post
Share on other sites
In my current project I have a single interface for loading levels and animation data and my current implementation is a simple "plain text" loader. I have used XML previously and it works quite well even though it bumps the file sizes up a little bit.

If you want to have something that has structure (like XML) but less weight I'd suggest you look at using JSON. It's a little bit leaner than XML and can easily support name/value pairs as well as arrays.

Share this post


Link to post
Share on other sites
for level files I have a custom xml looking format


objectname
{
x = 123.0;
y = 300.0;
vel = {2.0,3.0};
varname2 = 4|[2,1,3,1];
varname3 = "Hello World";
}





so far it supports separate objects, nested objects, arrays of any type (from objects to strings to arrays of arrays), and strings without any character restriction, also C-style comments .
I prefer it over xml mainly because xml has certain restrictions about what characters may appear in a a string or other places, I can also create other types of data that the default parser wouldn't be able to parse as long as it's encased in a pair of matching < > (the custom parse function must return the offset of the > that ends the custom object/data, that way it can allow for ANYTHING to be stored inside without limitations) eg:


objectname
{
custom = < "this is a string":varname=var1:
var2><var1>>;//the parser function must return the offset of the > ending the custom data
};



Of course it has a limitation: the variable names aren't really used but are necessary, and are there only for the purpose of viewing. I use this only when testing the game. Later I move onto the binary format following the same rules but discarding all the unused information.

Share this post


Link to post
Share on other sites
Here's the file format for my 2D side scrolling game :
<world name="test" >
<level name="Level_1">
<size width="130" height="24" />
<blocksize width="16" height="16" />

<brush name="name1">
<size width="2" height="2" />
<row id="0">1 2 </row>
<row id="1">3 4 </row>
</brush>
<brush name="ezar">
<size width="3" height="1" />
<row id="0">292 293 294 </row>
</brush>

<spawnpoint name="player">
<location x="176" y="441" />
</spawnpoint>

<entity name="RocketMan3">
<location x="660" y="309" />
<model name="RocketMan" />
</entity>
<entity name="FlyingDude1">
<location x="2720" y="327" />
<model name="FlyingDude" />
</entity>
<entity name="FlyingDude2">
<location x="3787" y="290" />
<model name="FlyingDude" />
</entity>
<entity name="RocketMan4">
<location x="3045" y="403" />
<model name="RocketMan" />
</entity>
<entity name="FlyingDude3">
<location x="3404" y="139" />
<model name="FlyingDude" />
</entity>
<entity name="Player">
<location x="174" y="479" />
<model name="Ruff" />
</entity>
<entity name="RocketMan1">
<location x="1458" y="306" />
<model name="RocketMan" />
</entity>
<entity name="RocketMan2">
<location x="2466" y="466" />
<model name="RocketMan" />
</entity>
<entity name="FlyingDude4">
<location x="1922" y="278" />
<model name="FlyingDude" />
</entity>

<tiles>
<layer>
<texture name="level1_1.png" />
<alpha value="255" />
<row id="0">0 1 2 3 4 5 6 7 4 5 4 8 9 10 11 12 13 14 15 16 17 10 11 18 9 19 16 17 20 10 11 18 9 21 15 17 20 21 22 23 24 25 8 19 26 27 27 28 29 30 31 32 33 34 35 30 31 32 36 37 38 34 35 39 40 41 42 32 36 41 42 39 40 41 42 32 36 43 40 41 42 34 35 34 35 39 40 37 38 34 35 39 40 43 40 44 45 14 46 47 48 49 20 50 51 52 53 25 54 55 56 4 8 57 5 0 1 2 3 4 5 4 5 12 13 10 11 0 1 2 </row>
<row id="1">41 42 32 36 43 40 43 40 37 38 58 59 26 60 20 14 61 62 63 63 63 64 20 9 21 65 63 63 16 17 20 9 21 15 63 63 64 46 47 66 48 49 15 65 63 63 63 67 20 25 5 4 5 12 11 4 5 0 1 2 3 4 5 0 1 2 3 0 1 2 3 0 1 2 3 0 1 68 69 2 3 4 5 4 5 0 1 2 3 4 5 0 1 68 69 2 3 70 71 72 73 63 74 75 76 77 78 79 80 81 82 28 9 83 35 30 31 84 33 39 40 37 38 85 86 87 88 41 42 84 </row>
<row id="2">2 3 0 1 68 1 68 69 2 3 89 90 63 63 64 15 63 63 63 63 63 63 16 26 62 63 63 63 63 63 64 20 19 63 63 63 63 63 72 47 91 63 63 63 63 63 92 93 94 95 29 34 96 14 20 83 35 30 31 84 33 34 35 30 31 32 36 41 42 32 36 41 42 32 36 41 42 97 98 32 36 37 38 34 35 30 31 84 33 39 40 41 42 97 98 84 33 21 99 100 63 63 101 20 9 102 103 104 105 106 107 21 20 9 108 4 5 12 8 0 1 2 3 0 1 68 69 2 3 4 </row>
<row id="3">109 110 111 112 97 31 97 98 84 33 21 65 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 113 114 63 63 63 63 115 116 117 118 100 63 63 63 92 93 119 120 121 95 18 21 15 16 17 108 4 5 4 5 4 5 4 5 0 1 2 3 0 1 2 3 0 1 2 3 6 7 0 1 2 3 4 5 4 5 4 5 0 1 2 3 6 7 12 8 122 66 123 124 63 63 113 9 9 125 126 127 9 21 99 16 17 20 28 128 9 129 30 31 84 33 30 31 97 98 84 33 83 </row>
<row id="4">130 131 132 133 55 54 55 56 12 8 19 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 74 70 134 135 136 116 117 93 137 138 123 124 63 63 139 140 141 142 143 144 21 15 63 63 63 64 83 35 39 40 43 40 43 40 41 42 32 36 43 145 146 40 41 42 32 36 43 40 41 42 32 36 43 40 37 38 34 35 30 31 84 33 34 96 9 9 147 66 66 118 92 136 148 9 9 149 150 9 9 151 123 152 100 64 153 9 9 108 4 5 12 8 25 11 154 155 156 8 9 </row>
<row id="5">157 158 159 160 161 80 81 82 161 14 65 63 115 92 136 162 100 63 63 115 100 63 63 63 63 63 63 63 63 63 63 163 9 164 94 165 166 93 119 120 121 138 118 100 167 168 169 170 171 172 173 19 63 63 63 63 63 113 174 0 1 68 69 68 69 2 3 0 1 68 69 68 69 2 3 0 1 68 69 2 3 0 1 68 69 2 3 175 8 25 11 12 8 18 9 9 9 164 137 138 66 176 177 178 9 179 125 180 95 9 70 181 66 123 182 178 14 20 9 28 128 14 20 9 9 50 51 52 9 130 </row>
<row id="6">183 184 185 186 187 105 106 107 21 99 63 188 168 93 137 138 123 162 92 168 123 136 162 116 100 63 63 63 115 162 189 190 164 119 120 121 94 119 141 142 143 191 66 118 168 66 66 192 193 194 9 195 100 63 63 63 63 67 196 30 31 97 98 84 112 109 110 111 112 97 31 97 98 84 33 30 31 97 98 84 33 30 31 97 98 84 33 161 9 9 9 21 22 23 24 20 164 119 120 121 165 178 179 95 164 197 198 199 200 95 9 70 166 177 178 21 99 67 20 21 22 99 64 153 9 75 76 77 201 202 </row>
<row id="7">157 158 159 203 204 127 21 205 206 123 136 72 93 119 120 121 138 177 166 177 166 66 66 66 123 124 63 167 168 93 94 95 207 141 142 207 120 144 170 171 172 173 166 208 209 177 181 210 211 9 9 212 123 124 167 213 167 168 192 25 11 154 155 156 9 130 131 132 133 214 54 55 56 12 8 25 11 154 155 156 8 25 54 55 56 12 8 21 164 94 95 122 66 66 93 94 119 141 142 143 144 95 215 216 217 218 219 220 221 222 223 9 9 9 21 22 93 137 95 122 66 123 224 190 164 94 95 102 225 226 </row>
<row id="8">183 184 185 227 228 21 206 93 137 138 73 167 140 141 142 143 144 9 9 9 164 165 229 230 66 118 162 117 66 140 120 191 169 170 171 231 232 233 234 193 194 9 9 164 94 95 235 236 237 9 9 70 181 118 117 123 117 66 66 24 20 50 51 52 9 157 158 159 160 9 80 81 82 21 22 24 20 50 51 52 53 79 80 81 82 21 205 164 119 120 121 165 209 209 140 141 144 170 171 172 173 216 238 239 240 241 242 243 240 241 244 245 223 9 151 93 119 120 121 165 246 66 192 9 207 120 121 95 247 248 </row>
<row id="9">157 158 159 160 21 46 47 140 120 191 124 139 169 170 171 172 173 164 94 95 249 250 251 252 253 137 138 66 66 169 232 233 66 234 193 194 211 235 236 237 164 94 95 249 250 251 94 95 254 94 95 9 164 137 165 246 66 66 93 137 255 75 76 77 201 202 184 185 186 187 105 106 107 122 48 73 64 75 76 77 78 104 105 106 107 46 47 140 141 142 143 256 94 95 231 232 173 9 193 194 257 258 259 260 261 262 263 264 261 262 265 266 267 268 151 140 141 142 143 256 94 165 236 9 231 142 143 144 9 157 </row>
<row id="10">183 184 185 269 99 167 168 169 232 233 118 117 66 192 193 194 270 217 271 222 272 273 274 275 275 276 121 138 66 277 211 278 66 277 211 164 279 280 179 254 215 216 222 272 273 274 275 217 271 222 276 9 207 120 144 70 166 93 119 120 121 255 9 102 225 226 158 159 203 204 127 9 9 212 66 136 63 16 17 102 103 126 127 61 62 115 117 169 170 171 172 207 120 121 95 281 164 95 211 9 282 283 284 285 286 287 288 285 286 287 284 285 289 290 122 169 170 171 172 207 120 291 164 292 293 294 172 173 164 183 </row>
<row id="11">157 158 159 160 123 168 295 236 211 147 208 177 166 236 211 9 296 242 243 240 241 242 243 240 241 297 143 144 298 178 237 147 253 255 299 300 301 302 215 216 303 258 242 243 240 241 242 243 304 305 306 9 231 232 173 9 9 207 141 142 143 144 9 9 247 248 184 185 227 228 21 61 279 280 209 246 136 100 63 74 125 150 15 307 308 168 66 66 192 193 194 231 232 143 121 94 119 121 309 9 9 287 310 311 312 313 314 311 312 313 310 311 315 9 212 66 192 193 194 231 232 121 94 316 317 318 94 95 319 320 </row>
<row id="12">183 184 185 269 292 321 294 9 237 164 95 164 95 9 299 95 179 263 264 261 262 263 264 261 262 9 172 173 179 94 322 255 215 256 215 216 323 324 238 239 325 283 263 264 261 262 263 264 326 327 328 9 9 211 9 9 9 231 170 171 172 173 9 9 9 157 158 159 160 9 329 92 301 302 9 70 166 177 71 307 149 180 307 168 66 66 66 66 277 211 164 94 281 164 330 331 250 119 322 255 312 313 286 287 332 333 312 313 332 333 286 9 9 9 70 166 236 211 164 94 281 216 271 334 335 336 337 338 339 340 </row>
<row id="13">320 341 342 343 316 317 318 95 322 344 345 251 121 95 249 250 251 288 285 286 287 288 285 286 287 164 94 95 249 250 251 291 141 216 303 258 240 241 259 260 346 347 284 348 346 347 284 348 349 350 94 95 9 237 9 9 164 94 95 193 194 9 9 9 164 183 184 185 269 95 70 166 351 352 279 280 95 9 70 353 125 150 354 355 356 229 230 177 178 299 215 216 357 275 358 359 360 222 361 291 332 333 312 313 314 311 362 363 314 311 312 313 179 255 9 9 9 299 215 216 238 239 364 365 240 241 242 243 240 241 </row>
<row id="14">340 366 367 368 334 335 336 271 222 369 370 274 271 222 272 273 274 371 372 373 374 371 372 373 374 217 271 222 272 273 274 275 238 239 325 283 261 262 284 348 263 264 310 375 263 264 310 375 376 377 249 250 164 254 378 379 249 250 251 299 95 164 255 9 319 320 341 342 343 380 9 164 381 382 301 302 250 164 95 197 198 199 200 249 250 251 291 95 9 216 238 258 383 384 385 386 383 384 387 245 388 311 332 333 286 287 9 9 286 287 332 333 300 256 94 95 9 216 238 258 259 260 389 390 261 262 263 264 261 262 </row>
<row id="15">240 241 242 243 240 241 242 243 240 241 242 243 242 243 240 241 242 243 240 241 242 243 240 241 242 243 240 241 242 243 240 241 259 260 346 347 346 347 310 375 288 285 286 287 288 285 286 287 391 392 272 273 217 222 393 394 272 273 274 338 222 395 222 337 339 340 366 367 368 396 337 217 323 324 323 324 273 217 222 218 219 220 221 272 273 274 357 222 238 239 325 283 397 398 349 350 397 398 265 266 387 245 371 372 373 374 399 400 373 374 371 372 275 217 275 217 238 239 325 283 284 348 288 285 346 347 284 348 346 347 </row>
<row id="16">261 262 263 264 261 262 263 264 261 262 263 264 263 264 261 262 263 264 261 262 263 264 261 262 263 264 261 262 263 264 261 262 284 348 263 264 263 264 286 287 314 311 312 313 314 311 312 313 310 401 383 384 402 403 242 243 240 241 242 243 240 241 242 243 240 241 242 243 240 241 242 243 240 241 242 243 385 386 242 243 240 241 242 243 240 241 242 243 259 260 263 264 391 404 263 264 391 404 284 348 265 266 242 243 240 241 242 243 240 241 242 243 240 241 242 243 259 260 263 264 310 375 314 311 263 264 310 375 263 264 </row>
<row id="17">346 347 284 348 346 347 284 348 346 347 284 348 284 348 346 347 284 348 346 347 284 348 346 347 284 348 346 347 284 348 346 347 310 375 288 285 288 285 312 313 9 9 362 363 9 9 362 363 286 350 397 398 261 262 263 264 261 262 263 264 261 262 263 264 261 262 263 264 261 262 263 264 261 262 263 264 349 350 263 264 261 262 263 264 261 262 263 264 284 348 288 285 310 375 288 285 310 375 310 375 284 348 263 264 261 262 263 264 261 262 263 264 261 262 263 264 284 348 288 285 286 287 286 287 288 285 286 287 288 285 </row>
<row id="18">263 264 310 375 263 264 310 375 263 264 310 375 310 375 263 264 310 375 263 264 310 375 263 264 310 375 263 264 310 375 263 264 286 287 314 311 314 311 362 363 9 9 9 9 9 9 9 9 312 313 391 404 346 347 284 348 346 347 284 348 346 347 284 348 346 347 284 348 346 347 284 348 346 347 284 348 263 264 284 348 346 347 284 348 346 347 284 348 310 375 314 311 312 313 314 311 312 313 286 287 310 375 284 348 263 264 284 348 346 347 284 348 346 347 284 348 310 375 314 311 9 9 9 9 314 311 312 313 314 311 </row>
<row id="19">288 285 286 287 288 285 286 287 288 285 286 287 286 287 288 285 286 287 288 285 286 287 288 285 286 287 288 285 286 287 288 285 312 313 9 9 9 9 9 9 9 9 9 9 9 9 9 9 362 333 310 375 312 313 310 375 263 264 310 375 263 264 310 375 263 264 310 375 263 264 310 375 263 264 310 375 284 348 310 375 263 264 310 375 263 264 310 375 286 287 286 287 362 363 9 9 362 363 312 313 286 347 310 375 288 285 310 375 263 264 310 375 263 264 310 375 312 313 9 9 9 9 9 9 9 9 362 363 9 9 </row>
<row id="20">314 311 312 313 314 311 312 313 314 311 312 313 312 313 314 311 312 313 314 311 312 313 314 311 312 313 314 311 312 313 314 311 362 363 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 311 312 313 362 363 286 287 288 285 286 287 288 285 286 287 288 285 286 287 288 285 286 287 288 285 286 287 310 375 286 287 288 285 286 287 288 285 286 287 312 313 9 9 9 9 9 9 9 9 362 363 312 313 286 287 314 311 286 287 288 285 286 287 288 285 286 287 362 363 9 9 9 9 9 9 9 9 9 9 9 9 </row>
<row id="21">9 9 362 363 9 9 362 363 9 9 362 363 362 363 9 9 362 363 9 9 362 363 9 9 362 363 9 9 362 363 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 362 363 9 9 312 313 314 311 312 313 314 311 312 313 314 311 312 313 314 311 312 313 314 311 312 313 286 287 312 313 314 311 312 313 314 311 312 313 362 363 9 9 9 9 9 9 9 9 9 9 362 363 9 9 9 9 312 313 314 311 312 313 314 311 312 313 9 9 9 9 9 9 9 9 9 9 9 9 9 9 </row>
<row id="22">9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 362 363 9 9 362 363 9 9 362 363 9 9 362 363 9 9 362 363 9 9 362 363 9 9 362 363 9 9 362 363 9 9 362 363 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 362 363 9 9 362 363 9 9 362 363 9 9 9 9 9 9 9 9 9 9 9 9 9 9 </row>
<row id="23">9 9 9 9 9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1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 </row>
<row id="22">1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 </row>
<row id="23">1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 </row>
</layer>
</collision>
</level>
</world>


You can have a look at my sig for more informations.

Share this post


Link to post
Share on other sites
I also use XML for data, although I use Java properties files for really simple configuration. For XML, I wrote an XML exporter for Blender which has worked OK for me (and was really painless to write). My entity/component system is also set up using XML.

For the 2D game I am currently tinkering on, I want the level layout to be generated procedurally, so I don't have a particular external data format for it.

Share this post


Link to post
Share on other sites

This topic is 2832 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this