Jump to content
IGNORED

My other 7800 Basic Demos


SlidellMan

Recommended Posts

  • 2 weeks later...

Your title screen doesn't stay on because you are calling it with a gosub and then immediately returning once it's been displayed once. That's why it seems to just flash up and then go.

 

[edit]

titlescreen
    characterset platformer_test_fontCS
    alphachars '0123456789 .,?!:;`abcdefghijklmnopqrstuvwxyz@#$%^&*()/-_=+'
    plotchars 'platformer demo by' 0 38 2
    plotchars 'shane skekel.' 0 48 4
    plotchars 'press fire!' 1 56 8
    savescreen
    drawscreen
    return

titlescreenloop
    restorescreen
    if switchreset then reboot
    if joy0fire then clearscreen : savescreen : goto main 
    if !joy0fire then button1_Debounce=0 : button2_Debounce=0
    goto titlescreenloop
  ;    return

"titlescreen" sets up the title screen but then right after the drawscreen there is a return - that will take you right out of your title, back to where you made the call so titlescreenloop never gets called.

 

Removing the first return will stop that from happening and allow your loop (titlescreenloop) to be executed.

 

I'd suggest not using a gosub to call your titlepage, and just "goto" it at the start. (Think of it as a standalone chunk of code or a platform from which to launch other bits of code, not as a subroutine).

 

The structure is struggling a bit with the gosubs at the start, it doesn't flow correctly.

 

Fixed listing attached.

 

[edit2]

You might want to also rethink how you leave the titlepage. i've added a bit of flow at the start so leaving the title screen will take you back to those gosubs you are calling to set the game initialisation.

 

 

 

 

 

platformer_demo_v01_titlefixed.78b

Edited by Muddyfunster
  • Thanks 1
Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...
  • 2 weeks later...
  • 2 months later...
  • 4 months later...
  • 2 months later...
  • 4 months later...

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...