Computer Science Canada Random programs  | 
  
| Author: | JakeP [ Mon Dec 11, 2006 9:13 am ] | 
| Post subject: | Random programs | 
A bunch of programs that I've made on my spare. Just fooling around in Turing (funny language)  | 
	|
| Author: | JakeP [ Mon Dec 11, 2006 3:52 pm ] | 
| Post subject: | |
Whoops, particles2.exe isn't the right file, it just crashes when it's opened. I'll put up the code tomorrow.  | 
	|
| Author: | JakeP [ Tue Dec 12, 2006 8:32 am ] | 
| Post subject: | |
here we go  | 
	|
| Author: | ericfourfour [ Tue Dec 12, 2006 3:36 pm ] | 
| Post subject: | |
For the particle system, I tried changing the maximum amount of particles and it wouldn't change. I found a variable called life or something in the class was also affecting it so I had to change that as well. I also noticed you are searching for dead particles when you want to make a new one. I like to have a list of dead particles and simply grab one from there to improve performance.  | 
	|
| Author: | JakeP [ Tue Dec 12, 2006 11:16 pm ] | 
| Post subject: | |
Maximum stops it from creating balls at a certain point, there was another demo that had multiple sources of particles (for blood, lol) and it would get slow after a certain amount. Theres a variable for life or something which would indicate when a particle is dead and can be replaced (sometimes i set elasticity to 1 and a vert short life time, turn off gravity etc so checking for it standing still on the ground isnt great) Yeah, a list would be much better, good idea. Ripples uses a search too, but I could care less about its speed (its damn fast as it is) A cool thing to do with the particles thing is put sound (ball.x*10, 1) (or whatever variable) where it bounces off the ground. And by cool, I mean annoying.  | 
	|