Breakout Clone - Added Physics Engine and Sound - F# XNA

Sunday, May 3, 2009 by gradbot

I added the Farseer Physics Engine to my game along with XNA sound effects. I'm amazed by how easy it was to use this physics engine. Collisions are handled by Delegates which you create in F# by passing a function to the delegate constructor.


ball.Geometry.OnCollision <-
Geom.CollisionEventHandler(
fun geom1 geom2 contactList -> true)

My current plan is to add different shapes to the blocks, different masses, and maybe events such as an explosion.


Filed under , , , having  

0 comments: