I am looking for the best way to manage objects within the canvas context. For my first project I am looking to do the following:
- Draw the ground.
- Drop a circle onto the ground with collision detection and elasticity.
- Have the circle “explode” subtracting the ground below it(Explosion that alters the ground giving a crater like look).
So basically what is the best way to track objects that then get altered by other objects. I’m guessing you could track all of the changes to an object in an array, but I was curious if there are any good frameworks for something like this. Thanks!
what you need is the Javascript 2D Game Engine
which can be found here
http://www.lukewallin.co.uk/?go=engine
Here’s a demo:
http://www.lukewallin.co.uk/singleplayer_games/sandbox4/sandbox.php?id=21
It even has explosions 🙂