Computer Science Canada

first submission, and post

Author:  outsource [ Tue Nov 29, 2005 4:18 pm ]
Post subject:  first submission, and post

its a W.I.P, for my computer science class, any tips and comments are greatly appreciated. especially with why it wont draw the circles as seperate circles it just shootst big laser looking things.

Author:  ZeroPaladn [ Wed Nov 30, 2005 9:56 am ]
Post subject: 

wow. nice game, a few pointers though.

i like the game, but with the way you have the game set up, your View.Update isnt working properly. Im still tryin to figure out how to fix it Smile

keep at it, expect a great mark from your teacher.

Author:  Tony [ Wed Nov 30, 2005 10:14 am ]
Post subject: 

the problem with drawing is in 2 parts.

1 - processes and View.Update don't mix, unless you explicitly wait for both processes to finish.

2 - what is
code:

        setscreen ("offscreenonly")
        View.Update
        Draw.FillBox (0, 0, maxx, maxy, 255)
        Draw.FillOval (ringx, ringy, 20, 20, brightred)
        Draw.FillOval (ring1x, ring1y, 20, 20, brightgreen)
        setscreen ("nocursor")

??
That would View.Update everything since setscreen("offscreenonly")

taking out that "nocursor", and putting setscreen ("offscreenonly") outside of the loop improves the display.

So then just change your processes into procedures and you're set Wink

Author:  outsource [ Wed Nov 30, 2005 3:48 pm ]
Post subject: 

ok i changed the processes to procedures, and now the text doesnt flash everywhere which is a big plus. But now every time green moves it takes down health, and it shoots a solid line across the screen. Also i took out the no cursor and took the offscreenonly out of the loop. Heres the new code, im at a loss as to why changing these things would cause these new glitches, any help is greatly appreciated.

Author:  Tony [ Wed Nov 30, 2005 5:07 pm ]
Post subject: 

because you have
code:

 for decreasing a : ringx .. 0

inside of your procedures.

so the procedure will run until a (I'm assuming that to be your ball's position, though I can't be sure) is all the way to the other side.

what you need to do is move just one step, exit the procedure, and then when you come back, start from where you left off.

processes kind of do just that, though they act like that for every single command, and cause many glitches. you should stay away from processes unless you can explain what's going on inside Wink

Author:  outsource [ Wed Nov 30, 2005 5:08 pm ]
Post subject: 

ok so how do i do that? lol, sorry im a noob.

and yes that is ball position

edit : i made only the part within the "if move (ctrl / "d") " a process and forked it into their respective procedures. So now basically im back to where it was originally at, without text flashing madly everywhere, possibly causeing bodily harm to epileptics the world over Laughing , but i still dont get why it isnt shooting individual balls instead of big laser beams. thanks for the help thusfar.


: