# How should I approach architecting a data-driven shoot-em-up?

I'm venturing into Mobile/Tablet based development coming from the world of Web Applications.

I want to write a game similar to 1942/43 video game from the 80's:

...similar in the sense that I have a plane/spaceship that flies vertically "up" the screen and stuff comes down to attack it (otherwise nothing that would violate copyright).

I'm familiar with collision detection, sprites, object pooling, etc. but what I'm spinning my wheels on is how to layout all the code for this game. e.g. it doesn't fit my normal MVC pattern, I don't have a DB, and the user input will likely be limited to touch based movement around the screen with "auto-fire" on all the time.

What I'm blanking out on is how to do all the "levels" and sequence "waves" of attackers within a level.

Should I just have a "level" file for each level, that queue's up attack waves? if so, based on time? based on some event? based on a position passed by the player?

e.g.

<level id="1">
<event timeoffset="500" type="attack" name="vConfiguration" position="50"/>
<event timeoffset="1250" type="attack" name="jConfiguration" position="75"/>
...
</level>


Part of me thinks this would be really easy to setup levels this way, then read in the file to queue up the events for the attacks/bonus/? to occur (where each named "attack" is a bit of configured code to position "N" enemies and start their flight sequences)

The other part of me thinks - whoa! before you even dream of implementing this - determine how others would approach it - no need to re-invent the wheel or create a monster.

• Not quite the same, that other question presumes that this question is answered and is curious about the best way to use such an engine while this question is more about whether such an organization is even viable for what he wants to do. Plus, Frank is totally new to game loops and the flow is hugely different from web work so simpler answers should be expected. – Patrick Hughes Aug 21 '11 at 20:06
• Oh, OK.. I see.. – pek Aug 21 '11 at 20:11
• asahi-net.or.jp/~cs8k-cyu/bulletml/index_e.html can trivially generate 1943-style waves and barrages, if you're rather have a pre-made playback engine. – user744 Aug 21 '11 at 20:51