Jump to content
IGNORED

cannot get playfield to work


Rudy

Recommended Posts

It's on another computer but I'll try to get it with a thumb drive. Just a minute.

 

rem test maze game aug 4 2014
rem set smartbranching on
COLUBK = $0E
COLUPF = $00

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

drawscreen
end

Edited by Rudy
Link to comment
Share on other sites

SeaGtGruff already posted what is wrong, but here it is in a .bas file:

 

rudy_test_2014y_08m_04d_2349t.bas

 

 

There are a bunch of example program links on the right side of the bB page that might be helpful:

 

randomterrain.com/atari-2600-memories-batari-basic-commands.html#example_programs

Link to comment
Share on other sites

The drawscreen command tells the 2600 to draw the sprites, playfield, ball and missiles. After everything is drawn you can determine whether a collision happened or not. Another tricky thing is that some graphical attributes get wiped after a drawscreen. For instance, if your player0 was bright pink (NTSC) you must set COLUP0 = $4E again!

Link to comment
Share on other sites

Just to elaborate a little bit

The television wants a frame every
1/60 of a second and displays the
picture/frame a line at a time going
from left to right, top to bottom
The processor (roughly speaking) creates
the picture in realtime a line at a time
as it's displayed.

When it's done drawing the screen there's
little bit of time left over before the
processor needs to start drawing the next
frame.

That's when your program runs.

So you call drawscreen and the processor
waits for the starting time of the next
frame and then draws the screen and when it's
done drawing the screen it returns from
drawscreen and goes on with your code.

So normally you run a loop to call drawscreen
(approximately) periodically, before the start
of the next frame but it doesn't actually have
be a (simple) loop or a loop with just one drawscreen.
you just have to make sure you call drawscreen
before the next frame should start.

So for example you could make a program that
was just a long list of drawscreens with out
looping and it would display a picture until
you ran out of drawscreens. (say 600 drawscreens/
2k * 1/60 of second/drawscreen = about 10 seconds
so with 2k you could display for 10 seconds
before you ran out but you wouldn't be able to do
anything else)

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