Overview: Physical had its genesis in my work writing Physical War, which in turn began as a remake of Sopwith IV with better physics. When I sat down to program Physical War, I remembered the complexities of writing the flight dynamics for the airplanes in Sopwith IV and feared a similar undertaking. However, I discovered to my joy that applying a small number of forces (thrust, lift, drag) to a physically simulated object gave it all the properties of an aircraft, without having to account for the devilish details (such as how is turning affected when a plane is stalling or on the ground, how to handle mid-air collisions, and so on) which instead were handled automatically as part of the physics engine. It didn't stop there - adding cars was as easy as creating an object and then applying a sideways force: they would roll across the terrain, slowing down as they went up hills and speeding up as they came racing down, all with a single line of code. The more I programmed with a physics engine, including later with N.A.P.S., the more I realized that using a physics engine as the base of your project made game development vastly easier - and more intuitive.

I became convinced that game development was ready for a new paradigm. This would be a paradigm in which things would behave as you would expect: if you dropped a ball, it would fall. If it hit another ball, it would bounce. It it were crushed, it would break. In this system game developers would became the crafters of worlds: rather than coding in terms of variables, equations, and routines, going to great lengths to create at best semi-realistic effects, they would be gods of their own universes. They would build environments and fill them with objects they had designed and imbued with physical properties, and then apply forces and let the interactions play out. Physical is an attempt to make that approach to game design a reality.

More prosaically, Physical is a game programming library that is built upon the foundations of a 2D physics engine. It handles the basics of window creation, graphics, and keyboard and mouse handling, and it automates game flow. It provides a framework that allows for a direct mapping from game design to game programming. By virtue of its basis in a universal physics engine, it features interchangeable and reusable parts, to the extent that interactive elements such as an airplane or a gun from one game can be placed in another game entirely - maintaining not just the model and image files but the actual dynamics that make the plane fly or the gun shoot. It also includes a physical object editor that makes it a cinch to create objects from image files and give them physical properties. Finally, it uses a physics engine of a totally unique kind that allows for objects and materials that collide, bend, flow and, most importantly for game developers, break realistically.

Physical is largely complete at this stage, and represents many months of intense work as well as years spent developing predecessor projects that built up to it. It has a large basis of pre-built classes to help get new users up to speed and a 50 page help file with a tutorial and reference manual of every class and function. Current development is focused on refining the core engine, adding new rendering features, and increasing physics engine speed. It is currently being used to develop a game by a student in the Game Design Initiative at Cornell (a research class in which I am also a student), and may be used as soon as next semester as one of the basic engines for students in the CIS 300 Introduction to Computer Game Design course at Cornell.


Download: Manual  / Entire Library

Source: Included with the library.

Demos of Physical


Overview: In the process of making Physical I have created several minigames, both to show off the capabilities of the engine and to test it out. At this point most consist solely of a gameplay mechanic and a test level, but they may be developed further in the future. I have also put together a demo showing off Physical's ability to handle fluid dynamics, and the downloads section below includes a demo written for Physical War that, while not using Physical itself, demonstrates the capabilities of the physics engine that both projects used.

Download: Minigames Pack / Water Demo / General Physics Engine Demo

Source: Included with the games.


Return to main projects page