Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 7. Physics > 7.1. Gravity

7.1. Gravity

Like light (which, although neutrinos may prove otherwise, sets the cosmic speed limit and can behave either as a wave or a particle) and water (the elixir of life and one of the few known substances that expands when it freezes), gravity is one of the most fascinating things in the universe. Unfathomably weaker than the tiny tug that you feel on a small magnet close to metal, gravity is weak weak weak. But without gravity, nothing as we know it would exist.

In the real world, anything that falls close to the earth accelerates at a rate of 9.81 m/s/s, or if you prefer, 32 ft/s/s. To simulate gravity in software, you just need to make falling sprites accelerate at that rate. It sounds easy, and for the most part, it is.

7.1.1. Falling


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial