Don't hit Bob
Author |
Message |
upthescale
|
Posted: Wed Apr 12, 2006 10:16 pm Post subject: Don't hit Bob |
|
|
It's late and I sm going to bed, so the ending is messed up when you win, but try and get to fifty! |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Delos
|
Posted: Thu Apr 13, 2006 3:23 pm Post subject: (No subject) |
|
|
code: |
locate (2, 3)
put "Score ", score
locate (3, 3)
put "Lives ", life
|
Change to:
code: |
locate (2, 3)
put "Score ", score..
locate (3, 3)
put "Lives ", life..
|
Will solve your problem of having the top block temporarily hidden.
Now, haven't I told you before to use arrays? Seriously, your programme will be so much more efficient with them. Go read the Arrays tut if you still don't know what I'm talking about.
code: |
proc bob
Pic.ScreenLoad ("bob.jpg", 225, 225, picCopy)
end bob
|
Why Pic.ScreenLoad()? That's a little slow isn't it? Create a pic stream (you'll need Pic.FileNew()), then use Pic.Draw(). What could be easier?
code: |
randint (x, -20, 20)
|
In line with the wtd philosophy - if you're able to use a fcn instead of a proc for any task, then do so. The use of this will become apparent when you're trying to create an initialize complex sets of variables...or just when you're trying to edit them later on.
code: |
x := Rand.Int (-20, 20)
|
Why are you drawing each box individually, inserting a delay, then moving on? Draw them altogether (you'll obviously use an array now that you know about them) then update all at once.
You obviously know how to use View.Update(), so implement it into your main programme.
We appreciate submissions - but if you keep up with your bad habits you're really going to start getting flamed. More than usual at least. |
|
|
|
|
|
|
|