Computer Science Canada Santa Drunk program, need help to fix this |
Author: | universalswag [ Wed Jan 16, 2013 2:44 pm ] | ||
Post subject: | Santa Drunk program, need help to fix this | ||
What is it you are trying to achieve? So our assignment is to make a christmas scene. I made a scene where everything is messed up, and put the caption "Go home Santa, You're drunk". However, when i try to put the snow ( Which i do not take credit for, teacher told us to take off internet), it does not sync with my stuff. Everything goes white. What is the problem you are having? I cannot get the snow to work in conjunction with my program. I have no idea. Project due soon. Any input is appreciated. Describe what you have tried to solve this problem I was tried putting snow in different paarts of my program. Tried cls, and View.Update. Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Please specify what version of Turing you are using im Using the latest version of turing |
Author: | Tony [ Wed Jan 16, 2013 3:48 pm ] | ||
Post subject: | Re: Santa Drunk program, need help to fix this | ||
no kidding. You have 4~5 processes, all with their own View.Update going off randomly. What are the chances of them all happening at the right time?
|
Author: | universalswag [ Wed Jan 16, 2013 4:27 pm ] |
Post subject: | Re: Santa Drunk program, need help to fix this |
so just one view.update, but where in the program should i be putting it? EDIT:I changed it so that the snow is the only thing that is view.update. However, my program works but everything in a process is flashing, but not showing |
Author: | Tony [ Wed Jan 16, 2013 6:56 pm ] |
Post subject: | RE:Santa Drunk program, need help to fix this |
That is the expected behavior of using processes. What you are doing is drawing random bits of your scene across all of those processes, and then pushing this random configuration to screen via View.Update. How much of each process has finished when View.Update gets called? There is no way to tell. The unanimous suggestion here is to simply not use processes for drawing anything. There is no need for that. |
Author: | universalswag [ Wed Jan 16, 2013 7:03 pm ] |
Post subject: | Re: Santa Drunk program, need help to fix this |
Thanks a lot for being so responsive Tony. I think that not using processes would be cool. I'm gonna try it out. -Thanks |
Author: | universalswag [ Wed Jan 16, 2013 7:18 pm ] |
Post subject: | Re: Santa Drunk program, need help to fix this |
Once again. Another problem has arisen. When i try to make it without processes( all in one loop) the program doesnt work with two for statements in the same loop. How would i fix. Once again thanks :3. Not trying to make you do my homework, my homework is more or less done. |
Author: | Tony [ Wed Jan 16, 2013 7:22 pm ] | ||
Post subject: | RE:Santa Drunk program, need help to fix this | ||
for-loops are type of loops... one would wait another the previous to finish. The ideal approach is to think of animation as drawing frames. For-loops do just that -- count the step/frame number of the animation.
the tricky part is mapping the global frame/step number to where inside of each individual for-loops it would have been. This is most easily accomplished with using mod |
Author: | universalswag [ Wed Jan 16, 2013 7:30 pm ] |
Post subject: | Re: Santa Drunk program, need help to fix this |
probably a question a nooblord would ask but is it absolutely impossible to do with my processes? As an amateur, I really cant do things as fast, and redoing an assignment that was almost finished seems like a waste of time. -thanks |
Author: | Tony [ Wed Jan 16, 2013 8:01 pm ] |
Post subject: | RE:Santa Drunk program, need help to fix this |
You could try to synchronize the processes so that they would wait for each other to finish, before doing the next step. Though that's arguably much more difficult and introduces all kinds of new challenges. Common example is a deadlock -- where all of the processes wait on each other to finish in a circle, so nothing happens. |