Sign in to follow this  
Sean_Seanston

Levels/Enemies for a Top-Down Shooter

Recommended Posts

I'm making a top-down 2D shooter in C++ and I stopped working on it a while ago because I got stuck with how to do this and haven't come back to it til now. It's a top-down shooter like any old one from the genre where you play as some guy walking along killing other guys. Basically, I need a way of creating, saving and loading different levels with relative ease and as little tedium as possible. A level's info will consist of the amount and type of tiles as well as the various enemies, items etc. that populate that level. XML seems pretty great for this so far in that it'd be good to set up where the enemies in a level are and what kind of enemy they are etc. However, would XML work just as well for creating a 2D tile map? I obviously don't want to have to type in how each tile is going to look in an XML file. That was alright for Pac-man in a txt file but this is more complicated. I know how to make a basic graphical level editor (more or less, I saw how on that JNRDev site) but would it be pretty easy to transfer that concept to XML? Or would I be better just using some kind of text file or binary file? The levels will be longish vertical scrolling rectangles and being able to just "paint" the terrain in with a level editor and have it save properly into an XML file would be great. So, 1 XML file for enemy info, 1 for items, 1 for the map. Sound good? How might I save the map in an XML file? It's been too long since I coded last and I probably can't quite think as well as I should ¬_¬ Thanks.

Share this post


Link to post
Share on other sites
Your main problem, as I understand, involves saving map tiles into XML file. You also don't know how to approach creating a graphical map editor.

Fortunately, there is a solution for both of your problems. There is a 2D tilemap editor called "Tiled" (http://mapeditor.org/index.html). It saves its maps in XML format (although not with .xml extension). I don't know the level of support it has for saving entities with custom data (like enemies or items), but you can look it up in their docs. The tiles themselves it saves in a binary-encoded format within the XML file - the reason this is possible is because it encodes everything into a string, and strings are quite valid in XML.

You can also lookup "Mappy", which is another graphical 2D tilemap editor. On their page, they also list other 2D map editors (of which Tiled is one).

Share this post


Link to post
Share on other sites
In a 2d platform test I did once I tried an approach that I liked.

With a little work in the platform engine I added some functions to do hit testing with the mouse and a little user interface. Then when I was playing the platform I could in any time stop the game, enter the editing mode and change the tiles on the fly.
Then I resumed the game and continued to play.
To save I did just a fwrite of the map as a binary file.

Share this post


Link to post
Share on other sites
Alright cool, I think I'll use XML for enemies and stuff and fwrite on a binary for the maps then.

Just a bit of clarification though on how to do it exactly...

Let's say I want to make a 50x100 map. Tiles have a position, type and height.
Do I just do a for loop writing tiles[0][0] - tiles[49][99] by using fwrite on the type and height, then reading them in in the same order? So I just plop down [0][0]'s type & height then [0][1]'s type and height etc.

We actually did some very similar things with Java in college last year on binary files but damnit your brain goes to mush when you haven't been coding for weeks or months :(

Share this post


Link to post
Share on other sites
Quote:
Original post by Sean_Seanston
Just a bit of clarification though on how to do it exactly...

Let's say I want to make a 50x100 map. Tiles have a position, type and height.
Do I just do a for loop writing tiles[0][0] - tiles[49][99] by using fwrite on the type and height, then reading them in in the same order? So I just plop down [0][0]'s type & height then [0][1]'s type and height etc.


Sure you can do in this way.

Or you can also just do a single fread/fwrite.
Like this:


struct sTile
{
float m_vPosX;
float m_vPosY;
float m_fHeight;
DWORD m_dwType;
};

struct sLevel
{
sTile m_sTiles[50][100];
};

[...]

sLevel Level;
FILE* f;

// write example
f = fopen("c:\\level.x", "wb");
// write header here
fwrite(Level.m_sTiles, 1, sizeof(sLevel), f);
[...]

// read example
f = fopen("c:\\level.x", "rb");
// read header here
fread(Level.m_sTiles, 1, sizeof(sLevel), f);
[...]




Since you probably will add other data in the future (for example you could do multiple planes of tiles or new cool things) remember to add an header with the version in this binary file.
By checking the version you can load old map files without problems.

Share this post


Link to post
Share on other sites
Hi

Here's my map file format in xml :

<?xml version="1.0" encoding="us-ascii" standalone="yes"?>
<bank>
<level name="Level1_1">
<collisionlayer name="collision" />
<layer name="tiles">
<visibility value="True" />
<zindex value="0" />
<alpha value="255" />
<script name="Level1_1" />
<spawnpoint name="player1">
<position x="164" y="387" />
</spawnpoint>
<entity name="RocketMan3">
<position x="616" y="293" />
<model name="RocketMan" />
</entity>
<entity name="FlyingDude1">
<position x="2720" y="327" />
<model name="FlyingDude" />
</entity>
<entity name="FlyingDude2">
<position x="3766" y="203" />
<model name="FlyingDude" />
</entity>
<entity name="RocketMan4">
<position x="3022" y="388" />
<model name="RocketMan" />
</entity>
<entity name="FlyingDude3">
<position x="3404" y="139" />
<model name="FlyingDude" />
</entity>
<entity name="Player">
<position x="162" y="418" />
<model name="Ruff" />
</entity>
<entity name="RocketMan1">
<position x="1457" y="292" />
<model name="RocketMan" />
</entity>
<entity name="RocketMan2">
<position x="2446" y="451" />
<model name="RocketMan" />
</entity>
<entity name="FlyingDude4">
<position x="1763" y="155" />
<model name="FlyingDude" />
</entity>
<tiles width="130" height="24" texture="Level1_1" blockwidth="16" blockheight="16">
<zoom width="2" height="2" />
<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 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 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 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 </row>
</tiles>
</layer>
<layer name="collision">
<visibility value="False" />
<zindex value="0" />
<alpha value="169" />
<tiles width="130" height="24" texture="Collision" blockwidth="16" blockheight="16">
<zoom width="2" height="2" />
<row id="0">0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </row>
<row id="1">0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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Have a look at my engine for more informations

Share this post


Link to post
Share on other sites
Ok cool, thanks everyone, I think I have a good idea of what to do now.

One last thing though: I have different game states for the title screen, menu, intro screen etc. If I'm making levels with XML or binary files, should I just make a single GamePlay state or something like that which reads in a level and then based on what level it is does blah blah blah ?

Yeah, that seems to make sense. It's just hard to know sometimes >_>

Share this post


Link to post
Share on other sites

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