Displaying things

Now that we have our home ship moving about, we should test to see if it works. To do that, we need to decide how we're going to display everything that's going on, including the ship, enemies, and bullets. There are two main options:

Our first display routine goes in the main program:

PROGRAM:ASHMUP
:.SHMUP An awesome Game.
:prgmASHMUPD
:prgmASHMUPI
:Repeat getKey(15)
:prgmASHMUPK :ClrDraw
:.prgmASHMUPM
:Pt-On(X,Y,GDB0)
:DispGraph
:End
:Return
:.prgmASHMUPR

Notice that I've also commented the lines prgmASHMUPM and prgmASHMUPR, since we haven't actually made those programs yet.

Well, how does it look? Compile it and see for yourself.

It's a bit fast, but it works well enough for now. It will slow down after we add the enemies and bullets anyway, and that's what we're doing next.

+ Tweet