[futurebasic] Gworlds PRINT,and drawstring

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : February 2000 : Group Archive : Group : All Groups

From: Sean <mclaugh@...>
Date: Thu, 10 Feb 2000 21:12:20 +0000
Hi,

I'm adding some very final touches to my game. I have split the screen
into two halves -- one for the actual gameplay and one for a scoreboard.
The scoreboard will have statistics such as score, lines, level, time,
the next piece in line, and my logo.

I believe in working on problems in small steps -- and testing them as I
go. I never code a huge project (no matter how much organisation I did
beforehand) without running it every couple hours. So instead of setting
up my scoreboard with 6 pieces of information, I first set it up with
just one piece: "this is a scoreboard". I put this in my FN
prepareGraphics, which is my gworld initializer. It is called before I
even specify any ON DIALOGs, etc. Guess what I got? I got a screen which
said "this is a scoreboard". It worked.

Then, I made a function called updateScoreboard which, at the time, only
filled a box with the color of the next piece in the game. It worked. It
is called whenever one piece stops and a new piece starts. (for those
who didn't read a previous thread, my game is _sort of_ like tetris &
Dr. Mario)

Now, I am trying to print some of the actual statistics while in FN
updateScoreboard. Remember, this function works correctly for drawing a
colored box. Also, fn prepareGraphics works correctly when printing text
into the same gworld. However, FN updateScoreboard chokes when it tries
to use PRINT % (x%,y%) to the gworld. I even tried REMming out the "this
is a test" from FN prepareGraphics and putting it in FN
updateScoreboard. It still didn't work. However, when using a
combination of CALL MOVETO and CALL DRAWSTRING, I could print text.

Is there a known issue (in FB2) between gworlds and the PRINT statement?

Regards,
Sean