Jump to content
IGNORED

Playfield is incorrectly shown at startup


Primordial Ooze

Recommended Posts

I am working on my next game in Batari Basic. The last one i did was 3 years ago so i must be doing something wrong since i'm quite rusty with bB programming. Anyways when my game is loaded up the first time the gameover playfield is shown briefly and then the actual level playfield is shown. In my code there is a check which checks if the score is 0 or greater then 500000 due to the fact that that score is unobtainable through legal means, but at the beginning when a game is started it sets the score to 3000 so none of those if statements should be triggering yet. There aren't any possible leaks in my code that will have the code jump to that point for no reason. I can't seem to figure it out and wonder of any bB guru's can try to see what's going on. I have attached the latest version of my source code for reference. Any assistance would be greatly appreciated.

 

Sincerely,

 

Primordial Ooze

Link to comment
Share on other sites

I think you might be misinterpreting what you are seeing. Run your program with Stella and hit Ctrl + R, let go of both keys and repeat over and over again. All you'll see are random playfield pixels on the screen because you are using drawscreen before the screen has been cleared. A gosub to Level1Data in the StartNewGame section would probably clear that up.

  • Like 1
Link to comment
Share on other sites

I think you might be misinterpreting what you are seeing. Run your program with Stella and hit Ctrl + R, let go of both keys and repeat over and over again. All you'll see are random playfield pixels on the screen because you are using drawscreen before the screen has been cleared. A gosub to Level1Data in the StartNewGame section would probably clear that up.

Thanks, i managed to get it working by moving my drawscreen code to the end of the game loop. This resulted in the same effect as what you stated above minus the extra overhead required for a gosub.

 

Sincerely,

 

Primordial Ooze

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