This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

TheGoldenProof
TheGoldenProof presents ...

2018/8/26

Snow

If this takes a really long time to load or runs slow, open it in greenfoot. If its still slow, in the Background class change the number in the brackets [] where it says new PointVector[]. That tells it how many snowflakes to make. The more, the more real it is, the longer it takes to load.

2210 views / 9 in the last 7 days

Tags: simulation physics demo with-source winter snow calming

open in greenfoot
Your browser is ignoring the <APPLET> tag.
danpostdanpost

2018/8/26

Much can be done to make this run a lot quicker. (1) convert PointVector class to a Flake class (which is already what it really is -- with the imaging and acting) (2) resetting a flake (to be a new flake) instead of removing and adding a new flake. The second part can be done in the act method of the actor class, thus eliminating the need to iterate through all flakes in the world act method.
The reason it was PointVector was because it was a class that i have saved that just has some usefull things but i just modified it and didn't bother changing the name. I thought about doing the second part but it was getting really late at night and i was just doing what was simplest, I probably will change the name and the resetting.
danpostdanpost

2018/8/28

Not really useful unless you use it properly. Notice how your slower moving flakes only go horizontally and vertically and slightly faster ones might go diagonally (along multiples of 45 degrees). This is caused by hardware constraints (pixel locations on the screen). Better use of the class would allow any angle at any speed.
DeleriumzDeleriumz

2018/11/25

is it possible if you could contact me via email dan? to discuss some of ur games imp4ck420@gmail.com thanks

Want to leave a comment? You must first log in.

Who likes this?

No votes yet.