|
diordna
Nuclear Nova Regular
Joined: Fri Feb 07, 2003 7:44 pm Posts: 46 Location: Cincinnati, Ohio
|
 Code Skeleton
'Preprocessing
numLevels = 1 : 'This will eventually read from a data file
gosub LoadBackground
gosub LoadSprites
'Intro
gosub MainScreen
if newGame = 1 then gosub ShowIntro
'Main loop
'Diordna
for thisLevel = 1 to numLevels
passLevel = thisLevel
gosub LoadLevel
repeat
gosub CheckKeys
gosub CheckCollisions
gosub MovePlayer
gosub MoveEnemies
gosub RenderAll
until keymap bit(55) and keymap key("q")
next thisLevel
gosub YouWin
gosub MainScreen
end
MainScreen:
'Macboy
'This should be a menu that lets you load a game, view the
' about box, view the high score list, and start a new game.
'If it's a new game and not a loaded game, set newGame to 1.
return
ShowIntro:
'13Jaguar
'Should display a slideshow of images
return
CheckKeys:
'13Jaguar
'Should check the keyboard for the necessary keys and then
' call the necessary subroutines
'if inkey$ = weaponKey$ then gosub FireWeapons
return
CheckCollisions:
'Joseph
'Should see if the player is colliding with anything on the screen
' and take appropriate action, such as bouncing, lowering
' shields, etc.
'Actually, writing the following loop would be Macfixation's job
'for a = 1 to numPowerupsOnScreen
' if sprite collides(main,powerup[a]) then
' select case powerType$[a]
' case "shields"
' shields = shields + 1
' end select
' end if
'next a
'This should be done for enemies, powerups, (Macfixation),
' walls, and anything else you or anyone else thinks of
return
MovePlayer:
'Joseph
'Should use "set sprite(main,mainx,mainy)" so ship can be rendered
'See forum for ideas on how to do this
'13Jaguar is making all ships in 36-frame rotations
'if inkey$ = thrustKey$ then
' I sure hope you know how to do this, because I don't
'end if
return
MoveEnemies:
'Macboy
'Every ship has 36 frames for rotations
'for a = 1 to numEnemy1
' e1x[a] = e1x[a] + 1
'next a
return
RenderAll:
'Diordna
render sprites
gosub InGameHelp
'then do other stuff that I can't write until a few people
do their parts
return
FireWeapons:
'Joseph
'Should check what number weapon the player has, draw it,
'and then check to see if it hit anything.
return
ChangeKeys:
'13Jaguar
'Should set all key strings
return
SaveGame:
'Jake
'Should save only player's score, level, powerups, and
' enabled weapons
return
LoadGame:
'Jake
'Should set necessary variables for enabled weapons/powerups
' and should also set level and score
return
InGameHelp:
'Jake
'Should display text read line by line at the bottom of the screen
'Text should by cycled through by pressing return
'Text should be white
return
YouWin:
'Macboy
'Should let player input name if high score
'Should also sort high scores list
return
LoadLevel:
'Diordna
'Should load specified level from a file
'If first level (passLevel = 1) then kill all sprites
'Reset all level-specific variables
'Set all level-specific variables
'Reload all sprites
'Draw a new background
return
_________________ Cats:
How are you gentlemen.
All your bass are belong to us.
You have no chance to survive make your sushi.
Captain:
What you say !!
I hate sushi !!
|
|
diordna
Nuclear Nova Regular
Joined: Fri Feb 07, 2003 7:44 pm Posts: 46 Location: Cincinnati, Ohio
|
Will fix. For now, "Jake" means "whoever finishes their normal jobs first" 
_________________ Cats:
How are you gentlemen.
All your bass are belong to us.
You have no chance to survive make your sushi.
Captain:
What you say !!
I hate sushi !!
|