Computer Science Canada Orbiting dots |
Author: | Lapsus Antepedis [ Sun Jul 03, 2005 3:03 pm ] | ||
Post subject: | Orbiting dots | ||
This is a small program that I created in about 10 minutes, It was inspired by one of the screensavers included with some common linux distros... I am aware of it's problems with flickering, but I do not really want to rewrite the code again...
Any thoughts? |
Author: | Delos [ Sun Jul 03, 2005 3:13 pm ] |
Post subject: | |
Processes! Noooooo!!! Ok, they're not that bad, but almost. I would suggest you take all those parameters you've got, and turn them into a record-type instead. Now, you'll be able to create a pretty array of these balls, which you will be able to manipulate in a procedure, as opposed to a process. There've been a number of similar submissions over the last while. One that (naturally) stands out was Catalyst's a while back. His was more a gravity oriented type thing anyway, but it did show the vectors graphically as well. See if you can find it, it'd could be useful. I tried it out without the clearing of the balls, and the resulting shape oddly reminded me of certain protein structures one finds... |
Author: | [Gandalf] [ Sun Jul 03, 2005 4:51 pm ] |
Post subject: | |
Well, at least you used them for their purpose ![]() Yeah, without the clearing it sometimes looks pretty good, but sometimes it just looks like a pile of crap - literally. I don't know, it turns out differently. To reduce the flickering you either reduce the delay you have greatly, or you just add "offscreenonly" and "View.Update" after following Delos' advice. |
Author: | Laetus Constituo [ Tue Jul 12, 2005 12:16 pm ] |
Post subject: | NEW Orbiting Dots |
Hi! It's me, Laetus, Lapsus' friend! *waves* We've been working on the dots program, and pretty well redone everything, as well as added COLISION! Now the dots can slam into each other, and grow! yay! And Delos, no processes! |
Author: | Laetus Constituo [ Tue Jul 12, 2005 12:21 pm ] | ||
Post subject: | |||
Hey...what the....that's weird, so let's try again! Sorry bout the length, tried to upload it, but something didn't work.. Oh well
|
Author: | Delos [ Tue Jul 12, 2005 12:43 pm ] | ||
Post subject: | |||
Couple things: You should use 'offscreenonly' to clear the dots instead of drawing dots over the old dots:
Also, you don't need the 'exiter' process. Having an 'exit when hasch' condition at the end of your loop will do exactly the same thing. I like it so far, now try to change it around a bit - allow for bounces between particles instead of merges. Even better yet, try turn this into a class! + bits |
Author: | Laetus Constituo [ Wed Jul 13, 2005 8:04 am ] |
Post subject: | |
You're right, I should've used an 'exit when' statement instead of a process. As for offscreenonly, it doesn't seem to work with the older versions of Turing, which is what i'm using, Turing 3.0.1A. But thanks for the advice! |
Author: | Delos [ Wed Jul 13, 2005 12:52 pm ] |
Post subject: | |
You're still running that! Yes, yes, please do update. If you have contact with your teacher, you should be able to ask them for the update. |