[Coco] Saving and Restoring Cursor position in Basic09.
Rick Ulland
rickulland1 at gmail.com
Thu Jul 2 18:42:01 EDT 2020
Hi!
In my DECB game writing days I remember using the screen memory as both
display and data. So using the drawing commands line, fill, etc to draw
a map, then peeking pixel color @X,Y to detect status. Best one was a
128K golf game where the actual game was 100% played (mathed draw
commands) on the tiny overhead map display, and most of the screen
(golfer stance, mid terrain, background) was derived from the 16 pixel
colors in that overhead map. Which didn't look funny because palettes. I
think 8 of the 16 colors were green shades denoting slope and grass length.
That still kind of works on VDG screens, but, no. Basic09 needs 512K
anyway. Think of OS9 windows as display only and invent your own data
array. Modify that array and run a separate subroutine to display it.
You not only get portable code, you can run the logic loop faster than
the screen can be drawn, which makes you look smarter at times.
I think? you can use complex variables (B09 manual chap 6-12), as an
easy way to put scads of data into an X,Y array without getting into
some weird multi-matrix thing, but remember I wrote my last real B09
game in 97. So there's that.
-ricku
CoNect
On 7/2/20 2:05 PM, coco at jechar.ca wrote:
> Anyone
>
> I have a program where at one point I
> want to be able to detect my screen location
> so I can go back to that part of the screen
> later.
>
> Does anyone know how I would do this ?
> Ideally for any screen mode but if text
> mode only that's ok.
>
> Thanks
> Charlie
>
More information about the Coco
mailing list