Thanks! freesound.org is a great resource for sounds. Lots of things that would be perfect for a game, and all under the Creative Commons Sampling Plus 1.0 license.
I used this one while teaching my AP physics class today.
It was great visual to show wave reflection, superposition, damping and even resonance (the string has a findable resonant frequency)
Wonderful!
Did the sound work for you? I've uploaded and deleted this scenario multiple times trying to fix a sound issue, with no luck. Sound works on export to webpage, but not on export to Greenfoot Gallery. (Verified on multiple computers and two different operating systems)
I'm leaving it up for now and asking Greenfoot-Discuss about the problem.
Re: performance -- Yeah, this scenario works much more poorly on my home computer than on my computer at school. This is my first semester teaching with Greenfoot, and one thing I'm going to investigate is if it's my physics code that is slowing things down. I've tried to minimize the number of trigonometry calculations by having the moving actors store their delta-X and delta-Y when their direction is set/changed. This way, they only need to do any expensive Math.sin() or Math.cos() calculations when the direction actually changes.
All the asteroids do on an average act() is { X = X + dX; Y = Y + dY; setLocation((int)X, (int)Y); }
Still seems to go very slowly on older computers though. :( Maybe casting those doubles to int is what's slowing it down?
I'm not sure if it adversely affects the game, but in the sub(Vector other) method of the Vector class you've got a bug. It incorrectly calculates the length of the resultant vector:
this.length = Math.sqrt(dx*dx-dy*dy);
should be
this.length = Math.sqrt(dx*dx+dy*dy);
2009/3/6
Commando
2009/3/5
Wave-Lab
2009/3/5
Commando
2009/3/5
Commando
2009/3/4
Commando
2009/3/3
Commando
2009/3/2
Commando
2009/1/8
SonarWay