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

tkiesel's Comments

Back to tkiesel's profile

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!
Smaller sound files makes for a quicker download now. Also trimmed off a few accidentally long-tailed sounds that were in there.
That fixed it! Bravo Builderboy2005! I'm going to go through Audacity and reduce all of those files down to mono to trim the download down to size.
Source now included with student approval. :)
Thanks Builderboy2005! It's great to see someone else confirm this bug. :)
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);