Thursday, February 18, 2010

Games

Well now that you've seen some of my personal stuff, how about my team stuff? Well first I had a freshman text based rogue game, but I don't feel like digging it up and making a video of it at the moment. Instead, I'll just start with my sophomore game.



My sophomore game, Barrel Bros, was my first attempt at making a physics engine. I started out trying to be "fancy" by doing what was more or less a continuous engine, although I had no idea that's what it was at the time. At the end of the first semester, I had realized how bad of an idea this was. I'm not saying that continuous engines are bad, just a lot more complicated than they're worth most of the time. So over the break I converted this to a discrete engine that worked with impulses. Even though I had started down a better path at this point, I still had a very simplistic engine. Most notably, I had no rotation. So all of the barrel "rolling" was faked with game logic. The one cool thing that I had in this game though was "curves" for the barrels to roll on. I say "curves" because they were really just line segments being approximated as curves, but they achieved a good enough affect.

At the end of the year I decided to start work on my 3D engine for Junior year. This time though, I had a good idea of where to start and how to do things. I even decided to tackle the challenge of rotation...which isn't that bad. Here's a small video of our Alpha build:



Now this is me once again using my trial version of fraps to record this. Once we get to the later stages I'm sure we'll get a more official video, until then this will have to do.

So the first task I took on was collision detection. So I first set up the basics, sphere sphere. I then set up impulses to get those resolving correctly without friction. From there I decided to be extra adventurous and implement a new collision detection scheme I had heard about, MPR. MPR, or Minkowski Portal Refinement, is a collision detection algorithm that works on arbitrary convex polygons. It took me most of summer to get this working, but the results were quite nice. Unfortunately, MPR has some issues with long thin objects, and I also wanted better speed. So about 1 month ago I replaced most cases with specialized SAT tests. So at the moment MPR is not being used anywhere...But after that I had decided to do stacking which took a large amount of time.

Skipping forward to now, the main tasks I have left for this game in physics is to get raycasting to work efficiently for picking of objects and to write some swept collision tests since our player moves so fast. At the same time I'm working on constraints for my Physics class project. Hopefully I'll be able to get that running in the near future so I can get some videos of that up.

No comments:

Post a Comment