Re: [stella] New 2600 programmer

Subject: Re: [stella] New 2600 programmer
From: emooney@xxxxxxxxxxxxxxxx (Erik Mooney)
Date: Wed, 30 Apr 1997 17:14:34 GMT
>5 - kernel: draw 192 lines of playfield.
>Please note that it's not absolutely necessary to do a 0-191 loop (thought
>that could be useful in your first attempts), it is important that you have
>_in mind_ exactly how many lines you've already drawn and how many are still
>to be drawn!
>For example, my latest demo doesn't do a 0-191 loop, but a 0-9 loop drawing
>16 lines for each iteration; then 192-(16x10) blank lines are drawn to
>complete the screen.

And most reasonably complex games will have many different regions
during those 192 lines.. my game, for example, does 15 lines of score
display, one blank line, six lines of saucer, two blank lines during
which the players are repositioned to draw the shields, X lines of
checking the player's missile (where X is the distance from the saucer
to the top line of the invaders formation), 12*Y lines of invaders
(where Y is the number of rows of invaders remaining), 74-X+(5-Y)*12
lines of checking the player's missile and the invaders' bombs, eight
lines of shields, eight more lines of missiles and bombs, (or if the
invaders are low enough, do 90-X+(5-Y)*12 lines of missiles and bombs
and skip the shields), two blank lines during which the players are
repositioned, six lines of drawing the players, two lines of "box"
during which the players are repositioned again for displaying the
lives, six lines of displaying the players' lives, and two more lines
of box.  And that always equals 192 lines total. :)

Sounds more complex than it is.. it's not that difficult to just start
with the invader formation and add components from there.  I keep a
variable called Scanline that keeps track of what line we're on, so I
can just compare that with 174 to see if it's time to draw the players
instead of calculating 90-X+(5-Y)*12 lines.

>6 - draw 30 blank lines for overscan and go to 2.

Game calculations can of course be done here too.. I process the
results (collisions) of the just-drawn frame here.

Archives available at
E-mail UNSUBSCRIBE in the body to stella-request@xxxxxxxxxxx to be removed.

Current Thread