[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 8 bit 3-d game
>But for a simple map in a game that uses another kind of display
>technology most of the time (3d, for example) its overkill, imho. And
>AFAIK its GS-only, too.
Lucas S's GTE is GS specific, but I began to bug him in email,
asking how it could be done with the IIe. He wrote a small bit of
code that will move pre-shifted tiles to the screen, in a grid
type format... The result is SuperMario Brothers type background
that can scroll left/right on the screen.
The code increments the position in the level, looks at the level
data :
column, also time-------------->
row1 00000000000000000
row2 01000001234000000
row3 02000001000000000
row4 02000002222000000 --------->
row5 03000000003000000
row6 01234004123000000
row7 00000000000000000
and updates the screen with the appropriate preshifted
tiles. The level description above will show a super-mario
type background with a big L and a big S in block letters
made out of tiles (Lucas S)
I'm close to having the other project completed, so next
is to get the tile-engine to run, and see how smoot/fast
it is.
One neat part about his code is that the screen is drawn
row1, column1 to viewscreenwidth
to speed the drawing, he PHA's the address's of the code
to draw each tile for a row:
lda row1,col1
pha
lda row1,col2
pha
(except he pushes the address of the routine to draw
that tile)
then RTS after the PHA's, and RTS at the end of each
tile-drawing routine.
so you RTS after doing the PHA's, and the processor
RTS's to the next tile drawing routine! after the last
tile drawing routine, the program RTS's to the code
that JSR'd the row drawing routine.
very cool... calculations are seperated from the drawing
routine, and the drawing routine is very fast because no
calculations have to be made during the draw routine
(or between drawing routines, like fetching the address
for the next tile to be drawn)
Rich