Stories about writing books, code, and symphonies. (Sometimes all three at once.)
Basic Game Physics (Velocity and Acceleration)
This site spends a lot of time focusing on the graphical side of game programming, but what about the underlying math that drives game engines? After an evening of being inspired by the marvelous Havok physics engine, I decided to bust out some old code and use it to demo classical mechanical physics.
The demo has a pretty simple premise – use the arrow keys to fly a spaceship (taken from the classic game Raptor) in all 4 directions and use spacebar to fire two “lasers.” As always, the included VB6 source code is very carefully organized and commented.
Also, for any VB-haters out there, it’s worth noting that if the demo’s frame rate limitation box is unchecked, the code will easily run 500+ FPS on any modern machine. Still think VB6 isn’t a viable choice for game programming?
As a bonus, the demo also includes the code for drawing an animated star field.
DISCLAIMER: These download files are regularly scanned to ensure they remain free from malicious content. Unfortunately, some virus scanners will flag these .zip files as suspicious simply because they contain source code and/or executable files. I have submitted my projects to a number of companies in an attempt to rectify these false-positives. Some have been cooperative. Others have not. If your virus scanner alerts you regarding these files, please allow the file to be submitted for further analysis (if your program allows for that). This should help ensure that any false-positive warnings gradually disappear for all users.
This site - and its many free downloads - are 100% funded by donations. Please consider a small contribution to fund server costs and to help me support my family. Even $1.00 helps. Thank you!