Browse Search Popular Register Upload Rules User list Login:
Search:
Snow Cannon

Image:
screenshot of the scene

Author: KarateBrot

Group: Default

Filesize: 26.23 kB

Date added: 2010-02-15

Rating: 7.5

Downloads: 2671

Views: 3987

Comments: 15

Ratings: 14

Times favored: 2

Made with: Algodoo

Tags:

Scene tag

I made this snow cannon to test a function that creates random numbers. It can be found here.
Primarily look at the way the snow gets shot out. The snow particles randomly get spawned between a range of 0.4m with random velocity between 5m/s and 15m/s.

Objective:
Cover the area below your snow cannon with snow.

Controls:
[↑] - rotate up
[↓] - rotate down
[ENTER] - activate cannon

If it starts lagging press [SHIFT] to erase the snow particles.


NEW:
Phun scene:

http://www.algodoo.com/al … p?id=38148
Last edited at 2010/02/20 14:11:21 by KarateBrot
Please log in to rate this scene
edit
Similar scenes
Title: Snow cannon (read description!!!)
Rating: 5
Filesize: 132.45 kB
Downloads: 417
Comments: 0
Ratings: 1
Date added: 2011/03/20 20:37:07
Made with: Algodoo
Rating: rated 5
download
Title: bobs epic snow fort battle. read description
Rating: 5.6667
Filesize: 445.03 kB
Downloads: 466
Comments: 2
Ratings: 3
Date added: 2010/06/15 16:00:39
Made with: Phun
Rating: rated 5.7
download
Title: Alien_angriff_mission 9.0
Rating: 7.5
Filesize: 300.63 kB
Downloads: 32
Comments: 0
Ratings: 2
Date added: 2008/12/16 19:34:35
Made with: Phun
no image found for this scene
Rating: rated 7.5
download
Title: Snow Blower
Rating: 5
Filesize: 51.02 kB
Downloads: 289
Comments: 0
Ratings: 1
Date added: 2010/10/18 17:05:05
Made with: Algodoo
Rating: rated 5
download
Title: Alien_angriff_mission 9.0
Rating: 5
Filesize: 414.68 kB
Downloads: 29
Comments: 0
Ratings: 3
Date added: 2008/12/16 19:20:13
Made with: Phun
no image found for this scene
Rating: rated 5
download
Title: 2 out 3 of my Weather simulato
Rating: 2.5
Filesize: 214.58 kB
Downloads: 248
Comments: 1
Ratings: 2
Date added: 2008/11/09 23:22:42
Made with: Phun
Rating: rated 2.5
download
Fine quality. I like it.
nice:tup:
doesn't work on phun:( :( :tdown: :x :o :| :tdown: :tdown: :tdown: :tdown: :tdown: :tdown: :tdown: :tdown: :tdown: :tdown: :tdown: :tdown: :tdown: :tdown: :tdown: :tdown: :tdown: :tdown: :tdown: :tdown: :tdown: :tdown: :tdown: :tdown: SMILEY SPAM!!!
Sorry for that. But you can make it work in phun, too.

1)
Go to the scripting menu of the grey box that's hidden behind the cannon.

2)
Copy this code into its onCollide:
Scene.addCircle({ color := [1.0, 1.0, 1.0, 0.8]; buttonDestroy = "shift"; onCollide := (e)=>{density = +inf}; drawBorder := false; drawCake := false; airFrictionMult := 10; radius := 0.06; heterocollide := true; zdepth := 0; pos := e.pos + scene.my.random(-0.2, 0.2) * scene.my.ort(e.normal); vel := e.normal * scene.my.random(5, 15) })

3)
Make something collide with the grey box very fast. For example a spinning circle with 4 smaller circles on the edges so when the big circle is spinning very fast the small ones collide with the grey box.

4)
Make the colliding pieces collide with collision group B
add this to the spawned circle's oncollide:=heterocollide=false.

Then the snow piles up.
Very cool! I like this setting:
(e)=>{
Scene.addCircle({ color := [1.0, 1.0, 1.0, 0.8]; restitution := 0.1; buttonDestroy = "shift"; density := 0.2; drawBorder := false; drawCake := false; airFrictionMult := 1.5; radius := 0.06; heterocollide := false; zdepth := 0; pos := e.pos + scene.my.random(-0.2, 0.2) * scene.my.ort(e.normal); vel := e.normal * scene.my.random(5, 20) }) }
can u plz make a phun version idk how to script
Okay I'll make it tomorrow:)
u pwn i did what u said (i have phun) EASY i used to be like that i didnt know how to script but now so fun!!!

10/10 like how it sticks
i didnt even know u could go to infinite kg and mass.

cool still....:P

put a box in the middle not stuck to anything. then turn on ....when the snow hits the box it sticks in the air
yeah you can set everything up to +inf values. +inf friction is sometimes also very useful but not realistic.
I know the circles stick to the position where they collide with something but that's no problem. you could also make them stick only after they had a few collisions.
done. you can find the phun version of this scene in the description:)
:D :D :D :D cool
can you plz make it phunlet safe and its awsome
:tup:
I've found that in the spawned circles' onCollide, I like to set heteroCollide to false and airFrictionMult to 1000 instead of density to +inf. This way, the snow does pile up, but doesn't stick rigidly in place, so it moves, but slowly. This way, it piles up more realistically.

To make it phunlet-friendly, you could add this to the beginning of the code in the gray box, before the Scene.addCircle({ but after the (e)=>{ :

{controllerAcc == 11} ? {
controllerAcc = 0;
scene.my.memory = 17;
scene.my.random = (min, max)=>{
x := scene.my.memory;
m := 1249 * 373;
x = x ^ 2 % m;
scene.my.memory = x + sim.time;
x <= 1 ? {scene.my.memory = scene.my.memory + 17} : {};
x * (max - min) / (1249 * 373.00000000000000) + min
};
scene.my.ort = (x)=>{[x(1), - x(0)]}
} : {};

Interesting concept, by the way.