imSimReal

imSimReal is a framework designed to provide physics capabilities for games and simulations. The algorithms used are based on Physics for Game Programmers.

Since much of my use of this library is on the iPhone, Apple rules do not allow frameworks on the iPhone, I will primarily use the source code as part of my projects. I am releasing the code under an MIT open source license.

First I am developing a IMSRGravity class that will allow the use of gravity for various bodies. Initially those bodies include Earth, Moon and Jupiter. I am using a plist to hold the gravity values which get loaded into an NSDictionary during object initialization. The object will also hold a NSString that contains the name of the body that this object represents.

The naming convention, which includes prepending all imSimReal classes with IMSR is the Objective-C convention for namespaces. Most modern object oriented languages provide some form of scope limiting, such as namespaces in C++ or packages in Java. Objective-C provides none of those, so we are left with funky naming conventions that obscure the name of the class to prevent name collisions.

I am using OCUnit for unit tests in this project. It is part of the family of tools that comes with XCode 3, so it integrates nicely. Following the setup instructions on the Apple developer site, (search for OCUnit), the tests will execute as part of building and the build will fail if the tests fail. This is a good thing.

This entry was posted in Apple, Health, imSimReal, iPhone, OS X. Bookmark the permalink.

Comments are closed.