About: This project has been written in C++, using OpenGL for the graphics, and compiled in Microsoft Visual Studio C++ 6.0. The physics engine is object oriented, contains 14 mathematics and physics related classes, and over 10,000 lines of code. Some classes have been written despite the fact they exist (in some form) in the Standard Template Library. This was not my attempt at being a nonconformist; the purpose of the project is for me to utilize object oriented programming to the best of my knowledge, and creating my own classes was a major part of that. The purpose of this project was to create an interface in which the programmer could use physical elements (rigid bodies, springs, particles) to create simulations in an easy and controlled manner. The engine is not meant to be used on large games or applications because it is not fast or accurate enough. But, it was meant to be used to test physics simulations to approximate the outcome, use on small games, and just have fun with. The engine is entirely 2D but the program is run in a 3D environment in order for the user to see things from every angle. The viewing system is controlled with my Camera class; once again I am not dismissing the inherent functions of OpenGL but simply learning how to write my own before I choose to use the obviously better method. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Features:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
OpenGL: I have used Nehe's Basecode II to initialize OpenGL in my applications. Since all the applications were very small the code on Nehe's site was perfect. It is very easy to use, and nicely comments the functions where your code should go. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Classes, Namespaces,
Enumerations, and Structs: This is a brief list of all the classes, namespaces, enumerations, and structs used in the engine.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Screenshots
and Demos: Here is a list of some sample simulations I have made with the engine. Each system took no more than fifteen lines of code using the library. To navigate the demos use W, A, S, and D to move the camera forward and to the sides, Q and Z to move up and down along the z-axis, and use the mouse to rotate the camera. The demos usually run faster when in fullscreen mode, but sometimes they go a little too fast. You may want to check out the affects in both fullscreen and windowed mode.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
To Do: Because of the time constraints I was under to show some progress the physics engine is grossly unfinished. Fortunately, it is also apart of my assignment to finish and update the project as the year goes on (by the end of May). Here is a list of what seems to be implemented but isn't, what needs to be fixed, current bugs, and what will be implemented in the future. The files will be updated soon and I will keep a file history log.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Source Code: The source is free to use or abuse under no restrictions. This was merely a school project and I have no intention of using this every again, as I hope to never take a computer science class again. I do not think my name appears anywhere on any of the sources either, so do not worry about using it. It may be a little hard to use it in one of your own projects, but if you do it will not bother me in the least. Download Source Code (63 kb) |