Jump to content
IGNORED

Multiple game screens


Recommended Posts

I was just wondering about the best way to draw "multiple screens" in your games (such as splash screens or different game screen that can not use the same kernel)

 

For instance, a game might require the following game states:

 

1. Splash screen

2. Main game screen with 1/2 second "get ready" pause"

3. Running main game screen

4. Switch screen to game element #2 with 1/2 second "get ready" pause

5. Running game element #2

6. Game over with enemies still moving

 

As I am adding more pieces to my game, such as end-of-levels etc, my code is getting more spaghetti like - In higher level languages I'd just have a "state" variable and do a switch statement like

switch(GameState){

case STATE_SPLASH: drawSplash();

case STATE_RUNNING: drawLevel(CurrentLevel);

...

}

 

Kind of thing. How do you organise your game screens and levels nicely for the 2600? At the moment I am drawing a standalone kernel (with vblanks, and overscans) for the Splash screen and then another kernel (with vblanks and overscan) for the "main game". But as I go to add another screen, it's starting to get ugly - especially as I want it to draw one frame of the new screen, pause for 1/2 second, then continue.

 

Any suggestions on handling these types of game elements?!

Link to comment
Share on other sites

I was just wondering about the best way to draw "multiple screens" in your games (such as splash screens or different game screen that can not use the same kernel)

 

For instance, a game might require the following game states:

 

1. Splash screen

2. Main game screen with 1/2 second "get ready" pause"

3. Running main game screen

4. Switch screen to game element #2 with 1/2 second "get ready" pause

5. Running game element #2

6. Game over with enemies still moving

 

As I am adding more pieces to my game, such as end-of-levels etc, my code is getting more spaghetti like - In higher level languages I'd just have a "state" variable and do a switch statement like

switch(GameState){

case STATE_SPLASH: drawSplash();

case STATE_RUNNING: drawLevel(CurrentLevel);

...

}

 

Kind of thing. How do you organise your game screens and levels nicely for the 2600? At the moment I am drawing a standalone kernel (with vblanks, and overscans) for the Splash screen and then another kernel (with vblanks and overscan) for the "main game". But as I go to add another screen, it's starting to get ugly - especially as I want it to draw one frame of the new screen, pause for 1/2 second, then continue.

 

Any suggestions on handling these types of game elements?!

 

You could try grouping similar screens together, so you could use one kernel for one group of similar screens, a second kernel for a second group of similar screens, etc.

 

Or you could try using just one main kernel that does all the things that will be common to all of the screens (like overscan, vsync, and vblank, including things like checking the console switches and game controllers), then branch or jmp or jsr to different kernel sections based on the specific screen or type of screen that's currently active.

 

Michael Rideout

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...