SlingShot is a fun
iPhone program featuring a basic physical simulation and user
interaction. Basically, it has a rubberband created by two-point
multi-touch on the screen and a bunch of projectiles. They are
displayed in real-time using OpenGL ES, and make some sound effect
using the Synthesis
Toolkit (STK) for iPhone. It is based on MoPho API. This was a homework
for the course Music256b
at Stanford.
It has interesting features like:
Plucked string sound with pitch
determined by length, which is synthesized using the plucked
module of STK.
Projectile with direction and
velocity determined by shot angle and how far pulled the band is.
Collision detection and simulation against the wall and
other projectiles using a basic collision model, which surely
includes energy loss due to collision.
Star wars theme using texture mapping, which has
lightsaber for string, and beam shot and Darth Vader's Tie fighters for
projectile.
It has some controllable settings on the preferences. You can access it by touching 'i' button.
Themes: it provides star wars theme for all objects on the screen.
Gravity: it introduces gravity using the accelerometer.
Clear by shaking: you can remove all on the screen by shaking.
String Tension: you can change the tension of the rubber band.
Damping by wall: you can control energy loss due to collision against the wall.
Damping by Space: you can control the amount of damping of projectiles, which make them slow down in the space.
Reverb Time: it means the amount of reverb effect.
Shoot Bullets: new projectile will be made and shot when plucking the string without loading a projectile.
Show rubber band ... : when
it's turned off, the rubber band will stay alive even if you release
your touches. you can pluck the string with just one finger!!
Screenshot
Videoshot
Download
You'd need a developer account
to create your provisions for the iPhone. I haven't tested it on the iPhone simulator, but I think it won't work on that.
Please email me for
any questions and suggestions on this program. =)