If you're talking about a shoot-em up side-scroller, then, one common solution for "levels" is to create your "levels" details when and where objects/enemies appear on your screen. Typical space shoot-em ups, the main ship is always moving (right, for side scrolling, up for vertical), so you just plug in when to make an object appear.
I did this long ago (2001 or so, I was still learning) for an old game, and my "levels" looked like this:
(The 1st number is the time in Milliseconds after the level starts.
E: stands for Enemy, B: stands for Background, M: stands for Music, S: for sound
Most of my objects had default X, Y, speeds, etc/ but I could change them here too. If I did it now, I would've probably used xml)
# The format for the stage is like follows, it must be in order!
# Time enemy (or Background object) should appear since start (in mS)
# Enemy (or BackGround object) Name
# Flags (should be 0)
# Any other enemy attribute you want to change from default
# start music
250
M:stage1.wav
# Back Grounds
2500
B:Moon
0
500
B:Hills
0
65000
B:Moon
0
# Flags 131078 = SPECIAL_ENEMY | WEAPON_UPGRADE | WEAP_PLASMA
#1100
#E:Special
#0
#Flags: 131078
# Enemies/Objects
1500
E:Orb
0
2000
E:Orb
0
2500
E:Orb
0
3000
E:Orb
0
3500
E:Orb
0
5000
E:Special
0
10000
E:Fighter
0
15000
E:Special
0
LocationXY: 640 80
SpeedXY: -134 -134
20000
E:Skimmer
0
LocationXY: 640 10
20000
E:Fighter
0
23500
E:Orb
0
24000
E:Orb
0
25500
E:Orb
0
LocationXY: 640 400
26000
E:Orb
0
LocationXY: 640 400
28000
E:EMP
0
LocationXY: 640 50
31000
E:Orb
0
31500
E:Orb
0
32000
E:Orb
0
32500
E:Orb
0
33000
E:Orb
0
31000
E:Orb
0
LocationXY: 640 400
31500
E:Orb
0
LocationXY: 640 400
32000
E:Orb
0
LocationXY: 640 400
32500
E:Orb
0
LocationXY: 640 400
33000
E:Orb
0
LocationXY: 640 400
# Flags 10 = SPECIAL_ENEMY | NEW_OPTION
33000
E:Special
0
Flags: 10
34100
E:Fighter
0
35000
E:Orb
0
35500
E:Orb
0
36000
E:Orb
0
35000
E:GunTower
0
LocationXY: 640 446
41000
E:Skimmer
0
LocationXY: 40 400
SpeedXY: 268 0