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

Username:   Password: 
 RegisterRegister   
 Process Trouble
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
jr.ranger.33




PostPosted: Sat Nov 04, 2006 4:50 pm   Post subject: Process Trouble

I'v created a snake game which uses the process command to draw the snake, and for some reason the snake goes faster and faster the longer the program runs. Is this just a side effect to using the process command or is more likely that it is something else in my source creating this problem?
Sponsor
Sponsor
Sponsor
sponsor
ericfourfour




PostPosted: Sat Nov 04, 2006 7:07 pm   Post subject: (No subject)

I figured out what was wrong just by reading the first 10 words (not including the title). You are using processes!

I still wonder how people figure out how to use processes when there is more information and tutorials on procedures and functions.

You should avoid processes at all costs. If you want to do more than one thing at a time simple have more than one variable and more than one action in a single main loop.

eg.
code:

loop
     update snake variables
     update obstacle variables
     draw snake
     draw obsticles
end loop


Never use processes. Turing has a bad implementation of processes and I'm sure more people can tell you more about why you shouldn't use them.

By the way, this should be in Turing Help. Not Turing Source Code.
[Gandalf]




PostPosted: Sat Nov 04, 2006 10:48 pm   Post subject: Re: Process Trouble

jr.ranger.33 wrote:
Is this just a side effect to using the process command or is more likely that it is something else in my source creating this problem?

Yes, most likely. Processes eliminate almost any possibility of controlling the execution speed of your program.
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  [ 3 Posts ]
Jump to:   


Style:  
Search: