Jump to content
IGNORED

Getting a flicker when I use Screen data


Recommended Posts

Hey,

 

I am using the tecnique from the game Monkey Moon in the Programming for Intellivision book. I set up my const variables and write them to the screen using data to make my playfield.

 

problem is that when I add anything using the Backtab command or Print command, it shows up flickering.

 

Is there somthing I am missing?

 

 

const oo = 0
const gb = $0804 + 1 * 8 'green bush
const rb = $0802 + 1 * 8 'red bush
const ex = $0803 + 3 * 8 'exit room

 

screen room_1

print at 0 color 2, <>lives

 

room_1:
data oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo
data oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo
data oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo
data oo,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,oo
data oo,gb,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,ex,oo
data oo,gb,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,ex,oo
data oo,gb,oo,rb,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,ex,oo
data oo,gb,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,gb,oo
data oo,gb,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,gb,oo
data oo,gb,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,gb,oo
data oo,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,oo
data oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo

Link to comment
Share on other sites

Not sure I can replicate. I tried this code that in theory should illustrate your problem:

const oo = 0
const gb = $0804 + 1 * 8 'green bush
const rb = $0802 + 1 * 8 'red bush
const ex = $0803 + 3 * 8 'exit room

lives = 3

DEFINE 0,4,gfx:WAIT

screen room_1

i = 20
#ch = $0810

loop:
print at 0 color 2, <>lives

#BACKTAB(i) = #ch + 7 : WAIT
i=i+1:IF i>39 THEN #ch = #ch XOR $800 : i=20

goto loop

room_1:
data oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo
data oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo
data oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo
data oo,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,oo
data oo,gb,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,ex,oo
data oo,gb,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,ex,oo
data oo,gb,oo,rb,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,ex,oo
data oo,gb,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,gb,oo
data oo,gb,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,gb,oo
data oo,gb,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,gb,oo
data oo,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,gb,oo
data oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo,oo

gfx:
    BITMAP "..o..o.."
    BITMAP ".oooooo."
    BITMAP "oo....oo"
    BITMAP ".o....o."
    BITMAP ".o....o."
    BITMAP "oo....oo"
    BITMAP ".oooooo."
    BITMAP "..o..o.."

    BITMAP "........"
    BITMAP "....oo.."
    BITMAP ".o.oo..."
    BITMAP "..ooo.o."
    BITMAP "..ooooo."
    BITMAP ".oooooo."
    BITMAP "..oooo.."
    BITMAP "........"

    BITMAP "........"
    BITMAP ".o.oo.o."
    BITMAP "...oo..."
    BITMAP ".oooooo."
    BITMAP ".oooooo."
    BITMAP "...oo..."
    BITMAP ".o.oo.o."
    BITMAP "........"

    BITMAP "oooooooo"
    BITMAP "o...o..o"
    BITMAP "o...oo.o"
    BITMAP "oooooooo"
    BITMAP "o...oo.o"
    BITMAP "o...o..o"
    BITMAP "oooooooo"
    BITMAP "........"

 

Perhaps there is important information left out that I missed when trying to recreate it.

Edited by carlsson
Link to comment
Share on other sites

10 hours ago, Brian's Man Cave said:

dZ....Yes you were right.. I was redrawing the screen in the game loop. I changed it to only draw the screen once and that fixed it!

Thanks :)

That'll do it!  We've all been there.  It's those pesky subtle bugs that hurt the most. :)

 

     -dZ.

  • Like 2
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...