Jump to content
IGNORED

Black screen glitch


gHan2000

Recommended Posts

I finally got my batari Basic working, so now I started coding.

 

For some reason, when I compiled and tested my game, it just got a pure black screen.

 

I coded this out:

 

playfield:

…............................

…............................

…............................

…............................

…............................

…............................

…............................

…............................

…............................

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

 

COLUBK = 20$

COLUPF = 212

player0x=50player0y=50

player1x=20player1y=20

player0:

%01111110

%01000010

%01000010

%01111110

001000

011100

001000

010100

end

 

player1:

%11111111

%10000001

%10000001

%10000001

%10000001

%10000001

%10000001

%11111111

end

 

draw_loop

drawscreen

goto draw_loop

 

Do you see any errors in it?

Link to comment
Share on other sites

It's hard to check to see if you have any indenting errors, because the forum tends to eat indents. Its easier next time to attach the file.

 

The first thing that jumps out at me is the lines in the form "player0x=50player0y=50". You need a colon between two commands if you want them on the same line. "player0x=50:player0y=50" would work.

Link to comment
Share on other sites

Ok, let me help you. Lots of things...

 

1. playfield needs and "end" command;

2. COLUBK = 20$ should be COLUBK = $20;

2. As RevEng noticed, you need a colon ":" inbetween player0x and player0y;

3. player0 needs % and two more binaries on the last 4 lines;

4. plus, the indent.

 

Something like this:

 

 playfield:
................................
................................
................................
................................
................................
................................
................................
................................
................................
................................
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
end

COLUBK = $20
COLUPF = 212

player0x=50 : player0y=50
player1x=20 : player1y=20

player0:
%01111110
%01000010
%01000010
%01111110
100000
%01110000
100000
%01010000
end

player1:
%11111111
%10000001
%10000001
%10000001
%10000001
%10000001
%10000001
%11111111
end

draw_loop
drawscreen
goto draw_loop

 

Attached you will find .bas and .bin as examples. As always, go to Random Terrain.

 

Something weird I noticed while doing this post is that when using "Insert code snippet", when you dial "percent symbol zero zero" with no blank spaces in there the three digits are just ignored. I am using Google Chrome... is that normal? :? ...that's why you will find player0 to look weird in the above code.

default.bas

default.bas.bin

Link to comment
Share on other sites

The forum likes to eat the characters "%00". I think it's a misguided security thing.

 

I noticed that you can add them back in if you edit the post in the non-full post editor, or you can also type in two percent characters and four zeros, and that works too. (though they get stripped if you preview the post)

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