Saturday, October 25, 2008

Ghosts Ghouls and Goblins, oh my!

In leiu of Halloween I decided to make a simple two-day game about trick or treating.  Once again I used Gosu, but for this I stuck with Ruby as the language.  For Windows users who don't feel like figuring out how to get Ruby on their system I packaged the whole deal using RubyScript2exe which works fairly well.  

The game is pretty basic, you are a ghost going from house to house collecting candy.  However, other trick or treaters will "attack" you.  You can jump over them or throw candy to stun them and get by, but don't throw all of your candy!  Controls are just arrow keys and space bar.  You win by just lasting through to the end of the night (moon goes down).

Get package here  

Monday, April 28, 2008

Hamsterball Galaxy

This project began my use of Julian Raschke's Gosu minimalist 2D game library and Erin Catto's Box2D physics library. This is intended to be a simple and polished game. For myself, it is a project to solidify my knowledge of C++.

The concept is simple: you are stuck inside of a ball and must move about each level collecting keys to get out. In each level you are pushed to master your prison even further by learning how to use the environment.

What this means is that we have a physics based game where the environment has certain effects on your movement. There are 5 types of walls;
  • Normal - no effect
  • Bounce - propels you away
  • Push - invisible barrier
  • Magnet - pulls you
  • Sticky - nullifies your movement

Using these you can work your way through each level. Your overall progress is measured by a timer and is recorded to a high scores screen. When you fall off the timer adds 10 seconds, but you are allowed to respawn as many times as necessary.

Windows exe | Mac app (currently broken)

Tuesday, March 4, 2008

Cardboard Land

Last semester I began work on an adventure/puzzler game where you, a man composed of cardboard boxes, must venture away from the protection of your humble village to locate necessary supplies to sustain your family and friends. This is developed using the Torque Game Engine Advanced for my engine as well as using Maya and Photoshop for content creation.

Many components of it are broken down in my development blog. I plan on continuing this project when my free time is again realized. There are a number of things that I wish to complete before I can consider this "done".

  • destructible character
  • use of HDR and bloom
  • blended animation
  • simple state based reflex agent AI
  • hover vehicle (boat)
  • sketch able map


As a whole, I believe that this game has evolved fairly well. I did not sit down and plan much, I just garnered ideas and ran with them, adapting them to what I believe is interesting game play as best as I could. There are many things that I must work over and expand upon before it will be a game that I myself would find fun and worthy of playing. However, it has potential and isn't out of reach.

Download (Windows only, sorry)

Monday, October 22, 2007

DS Homebrew

Using the PAlib I have begun work on two medium sized game projects. One was developed for a semester project with two other people, Mike Daly and Rick Naik. The other is not in active development yet. There are several, and will be many more DS homebrews cooked up as time passes, since this medium is versatile and quick to develop for.

Physics Simulation

The first project is to be a 2D physics simulation using primitive shapes, player drawn shapes and sprite objects. It will allow the player to draw primitives (circles, rectangles, and triangles) and place sprite based objects then run the physics simulation to play out endless scenarios. It is somewhat similar to games such as The Incredible Machine, but with the ability to draw your own objects and toy with more realistic physics. The source and build of this can be found here. These can be run using an emulator such as No$GBA, or hardware such as a SuperCard.

To accomplish this, I researched game physics (as it has been several years since I took physics as a class, and cannot effectively read my notes any more) and sorted through 3D implementations to work out how to accomplish the same ideas in 2D. I ended up using some simple velocity calculations from the impact vector (splitting into direct and tangential impacts) and then just cheating for rotation (no rotational inertia). For the collision detection, I am simply using circles to test if there may be a collision, then brutishly checking if any vertex of one shape is inside the other. This is straighforward, as each shape is convex. I'm taking the dot product of each edge on shape A, and testing it against each vertex on shape B, so if any of these values is negative, the shapes are not colliding. This way, a collision is our worst case scenario, which may or may not be the best method, it just seemed simple enough to get me going.

Pirate RPG

Although little progress has been made with this project, there are some interesting plans for it. So far, I have an 8 direction ship sprite sheet, a test tiled map, and a stern image for steering hooked into a simple moving ship thing. So, basically right now you can move the ship, while using the stylus to steer on the bottom screen, and run into the land (basic tile checking for wall detection). Nothing fancy, yet.

Small projects

Just for fun, I wrote an obj parser to render 3D models on the DS using openGL calls. As you may notice, the default shaders are not available through the libraries, so I just made up some crappy colorization to differentiate the geometry. If I hadn't lost the code for this, I would chock up some lambertian or phong, but it was lost in some HD changes. Maybe I'll get around to rewriting it and adding these things.

MMOG Development

Not long after getting the Internet in 2001, I found an online MMOG based originally on ALttP ( ). Not long after, a built in editor was discovered so I started playing with the proprietary scripting engine. Some of my more notable accomplishments are described below.

A* Pathfinding

One of the things that brought myself fame in the game's community is this A* implementation. While not optimised for large areas, it was well suited for single level traversal. It used the tiles in the game as nodes and several arrays for the F and G costs, aswell as for the Parent relationships. It was built to add cost for water, swamp, and other rough terrrain. In the pictures, the blue Xs are visited nodes and the green Xs are open nodes.

As I grew more knowledgable of abstract data types (binary heaps etc) and dynamic memory management, implementations of A* grew more powerful and useable in more demanding settings.

Mini Games

I built several mini games, some of which allowed you to play other people. As you can see above, I recreated the popular DS game Polarium (although never got around to adding versus play). Also, I scripted a Dots game (drawing squares on paper versus others), Connect Four, and a single player Tic-Tac-Toe (using a Minimax implementation limited by the game engine's script restraints). Since pixel graphics are not my specialty (or most graphics), all of these make heavy use of the polygon drawing functions within the scripting language. This caused me to find many ways to optimise drawing using vectors and arrays.

3D rendering

The second picture here is an early attempt at a simple 3d engine. It uses some complex trigonometric equations to solve for rotating the points (very slow). The first and third are both from the same script (different from first picture) that uses 3d transformation matricies to rotate the points with some very basic culling and lighting (just the cosine between the veiwing angle and face normal).

This is a simulation of rope using relatively simple vector normalisation and inertia calculations. The 3D effect is created by doubling the draw of each segment to perpendicular rectangles (knowledge of 3D rotations was not a part of my toolkit at this point).


The first picture is of a vector drawing script that allows the player to draw lines and shapes with the selected color. This was all done using the aforementioned polygon drawing functions. The second is just an experiment with the built in particle system (adopted from the Torque engine, which the MMOG began to use) as well as a custom built shadow script that would rotate based on time of day. The third is a custom built particle effect that would simulate an exploding spray of sparks. The flag image is actually a procedural animation that would chop up an image and disply vertical portions of it in a way to simulate a wave effect. The version shown is actually using an array of color values instead of an image.

The above is one of a few string/rope simulations made using simple vector calculations based on Euclidian distance. One of the more advanced versions of this calculated the string for 3 dimensions and used screen aligned quads to keep the rope at a consistant width. In this version, the line used simple physics relations for projectile motion to cast and land in the water.

This is a simple fractal algorithm that would take an array of vectors, then extrude the edges of a square using the vectors.