Problem and Question.....

Hi....I have one problem and one question that i hope you can answer.


Problem:

I am trying to make a little game. It is the same style as atomic bomberman (a man walking around the screen and is shooting). The problem is, that when the man reaches the top of the screen (lets say the top 10 lines) he just disappears. What i am doing is:


1. writing background to virtual screen 1

2. flipping virtual screen 1 to screen

3. drawing sprites to screen

4. Wait vertical retrace

5. repeat from 2


And then of course a lot more like reading the keys....

if i insert two wait vertical retrace instead of one i can see the man (not a nice look, but he is there)

Write if you need more details....


Question:

In atomic bomberman there is lots of walls/blocks and you cant go thru them. But what exactly is the computer doing to detect the walls/blocks.

Does it store them in an array or what????


Thank you.....






Comments

  • : I am trying to make a little game. It is the same style as atomic bomberman (a man walking around the screen and is shooting). The problem is, that when the man reaches the top of the screen (lets say the top 10 lines) he just disappears. What i am doing is:


    : 1. writing background to virtual screen 1

    : 2. flipping virtual screen 1 to screen

    : 3. drawing sprites to screen

    : 4. Wait vertical retrace

    : 5. repeat from 2


    There are some problems with this top level approach. Something that you really never want to do is to draw to the visible screen. It sounds like the monitor's light gun is already about 10 lines into drawing the background when you start drawing the sprites, so anything above line 10 will not be shown. Your basic loop should look like this:


    1: Write background to active/virtual screen

    2: draw sprites to active screen

    3: Wait for retrace

    4: Flip video pages

    5: Rinse and Repeat


    That should fix the problem.


    Rock


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories