Jump to content
ChilePepper

Blue Screen of Death

Recommended Posts

I ask you guys a lot of questions, and I am grateful for all of your help. Sometimes when I'm giving the game I'm working on a test run, after playing around for a bit, the screen turns blue and it flickers a bunch with random chunks of black lines flying everywhere. I was just wondering what this means, am I using up to much RAM? Or something else? Thanks.

Share this post


Link to post
Share on other sites

Do you want to keep the code a secret or can you post it? After what is wrong is figured out, I'll put the problem and the fix for it on the bB page in the troubleshooting section.

Share this post


Link to post
Share on other sites

This has nothing to do with your problem, but before I look deeper, you have this:

 

 temp1 = temp2 + rand
 temp2 = (rand/16) + (rand&15) + (rand/4) + (rand&31) + (rand&15) + (rand/64) + 12

 

It seems temp2 has no value on the first line. Did you mean to have "temp1 = temp2 + rand" after "temp2 = (rand/16) . . ." like this:

 

   temp2 = (rand/16) + (rand&15) + (rand/4) + (rand&31) + (rand&15) + (rand/64) + 12
   temp1 = temp2 + rand


 

Share this post


Link to post
Share on other sites

Another thing I see is "if ballx > 240 then goto random". That's too big of a number. You might end up using something like 155. And " if ballx < 0 then goto random" should probably be something like 5 instead of 0.

 

You can find the numbers you need by running this program:

 

https://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#find_border_coordinates

 

Seems like you're also using the same code over and over when you don't have to. If Karl G doesn't post something, I'll see what I can do.

Share this post


Link to post
Share on other sites

After playing with it for a while, I noticed that the numbers used in the if-thens didn't catch all of the possibilities, so I fixed the problem and made other changes:

 

chilepepper_2020y_04m_29d_2040t.bas

 

Every random screen also has _BK_Color for the background color and _PF_Color for the playfield color. You can change those values to whatever you want and that will change the colors in the main loop.

Share this post


Link to post
Share on other sites

IIRC to keep in mind the temp variables are obliterated everytime you call drawscreen (not 100% sure about the standard kernels) as sometimes it depends on what temp variables are used. For single frame calculations i find them useful however personally for random number generation or values i want to read id rather store that value so i can read it and or increment it every frame. I look at it like Russian roulette, it's all about when you pull that trigger it's luck of the draw as to what it lands on.

 

In some cases rand doesn't even need to be used especially when it's not a timed event. rand can be cycle intensive and sometimes the least amount of calculations can make for the better experience. Keep at it and experiment, you will stumble onto what you're looking for 👍

  • Like 1

Share this post


Link to post
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.

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