Talk:Village/@comment-13406752-20130801024052/@comment-9531161-20130802214254

Well, you know how many enemies there are on the screen when it starts right? Just initialize the variable to that number.

There's nothing special about counting frames. Look around in the program for VSYNC. This tells the DS to sync frames, which lets it run at a certain fps. Just before you sync frames, you could add 1 to a variable that will be the frame counter. Then somewhere near, add the code for testing the frame counter to see if it's 60. It'll look something like this (but you'll have to add more to it):

COUNTER=COUNTER+1

IF COUNTER==60 THEN COUNTER=0:SECONDS=SECONDS+1

IF SECONDS==(whatever) THEN GOSUB @LEVELCOMPLETE (or something)

VSYNC 1

If you still can't figure out how to make levels after I explained it twice, I can't really do much more other than give you all the code (which I don't think is a good idea). I'm really sorry. You have to think about:

-What you want "going to the next level" to actually mean (in this case, it sounds like enemies start shooting at you faster and faster).

-What will trigger the next level

-What will you need to do to set up the next level/exit the current level

-How will being in the next level affect the current code