HTML and CSS Reference
In-Depth Information
Simple Gravity, Elasticity, and Friction
Adding simulated gravity, elasticity, and friction to your objects adds a sense of realism that
otherwise would not exist in 2D. These properties are major forces in nature that people feel
andunderstandatnearlyeverymomentoftheirlives.Thismeansthatpeoplewhoplaygames
expect objects to act in a particular way when these properties are applied. Our job is to sim-
ulate those effects as closely as possible, while minimizing the processing power necessary to
create them. While there are some very complicated physics equations we could use to create
these effects, we will use simplified versions that work well with the limited resources avail-
able to HTML5 Canvas in a web browser.
Search WWH ::




Custom Search