A quick demo of dynamic shadows in 2D running in our new engine for the iPhone. The game has not yet been announced, but stay tuned. Physics are provided by our own Chipmunk Physics engine.
Thanks to some nice tricks we came up with, this runs at nearly a solid 60fps on even a first generation iPod Touch with 5 lights and all the physics objects on the screen at once.
Very cool!
I'm very interested in how you achieved the shadowing with multiple lights.
Buxxy21 4 months ago
@Buxxy21 Basically you add all the lights together into a buffer. Before compositing each light into the buffer you generate a shadow mask for it. The tricky part is to make sure that you cut the drawing down to only the pixels that you need to draw as it uses a TON of fillrate.
slembcke 4 months ago