Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 first submission, and post
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
outsource




PostPosted: 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.


christmas shootout-1.t
 Description:
Game

Download
 Filename:  christmas shootout-1.t
 Filesize:  5.25 KB
 Downloaded:  127 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
ZeroPaladn




PostPosted: Wed Nov 30, 2005 9:56 am   Post subject: (No 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.
Tony




PostPosted: Wed Nov 30, 2005 10:14 am   Post subject: (No 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
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
outsource




PostPosted: Wed Nov 30, 2005 3:48 pm   Post subject: (No 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.


christmas shootout-1.t
 Description:
NEW EDIT

Download
 Filename:  christmas shootout-1.t
 Filesize:  5.22 KB
 Downloaded:  108 Time(s)

Tony




PostPosted: Wed Nov 30, 2005 5:07 pm   Post subject: (No 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
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
outsource




PostPosted: Wed Nov 30, 2005 5:08 pm   Post subject: (No 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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: