Here’s my game for February: Galaxy Run. It’s a simple ascii space shooter. Go fly around and blow stuff up!
November’s game is done. I’ve had a version of it for over a month now and was holding out to get things at bit more polished. The theme for November was Night and Day, so I made a night time survival zombie game. Here it is: Survive Until Dawn. Download it, install it, and play it!
Last week my brother was trying to use an xbox 360 controller on his PC. There are several great programs for its buttons, such as JoyToKey. However, none of these programs seemed to handle actual mouse movement well. The best I could get out of these was mouse movement similar to an arcade: 8 directions and constant speed no matter how far the analog stick is pushed. After realizing these limitations I thought “Hey, I could make something that fixes this problem.” And so I did.
I made a small program that will map an analog stick to mouse movement. I think this the movement this program produces is as smooth and natural as any can possibly get. It’s sensitive to the amount and real direction the analog stick is pushed, which works great for controlling the mouse. It works with mouse-look in the games that I tested. It lacks any button mapping, but is fully compatible with other mapping programs like JoyToKey. Go download it and give a try: 360-to-mouse.
Oh, and be sure to leave a comment if you found this helpful.
Here’s a project that I did a couple years ago. I’ve had the videos posted for a while but never had a good write up. I was taking an artificial life course at the time and was given the chance to come up with my own project. My idea was to evolve a walking animation for an artificial creature. So given a physical model for a creature and some set of constraints I wanted to see an organic looking walk evolve. To make things interesting I chose to model my creature after a spider since it would have many legs and many degrees of freedom for its movement. In the end it was fairly successful:
However, getting to this result took some time.
Initially I made a spider with a high center of gravity and lots of joints. I implemented a very simple genetic algorithm that fed target joint velocities to PhysX. Each animation was scored based on how far the spider traveled. Many animations were tested in each generation and the best survived to be the basis for the next generation. I gave the animation about a day to evolve and came back to find some unexpected results:
There were many things wrong this, probably the most important being the design of the spider itself–it was top heavy and stiff. I tweaked the spider a bit and gave it another go. The result was that the spider did indeed move forward now:
Although, this was mostly due to it twisting around. Something fundamental was clearly wrong. I went back to the drawing board and simplified the spider. I removed some of the mid-leg joints to make the animation simpler. I also noticed that real spiders tend to have a low center of gravity. I did my best to replicate this by lowering the body. In addition, I changed how the motion controller worked. Instead of maintaining a table of joint velocities I evolved a Fourier series for them and gave each leg its own amplitude and domain offset. The result was a spider that looked nice (well, nicer at least) and wanted to walk. It couldn’t walk far, but it certainly wanted to:
I gave a bit more weight to the feet after this and let the joints exert more force. After a few hours of simulation, the result was something that moved significantly further forward than anything before:
The animation was doing exactly what I asked “move as far forward as fast as you can”. Clearly I had to better state what I wanted. I refined the animation’s objective to be “move as far forward as fast as you can without letting your main body touch the ground”. Now I was getting there:
The spider had a nice awkward walk at this point. It would eventually drift off course though, so it had to be corrected. I made a few minor tweaks to the body and let it evolve for a week. The end result was far from life like, but it worked and could continue walking indefinitely.
If I had to do this project over again I would keep two things in mind: 1) a good animation only comes from a good model. Get the model right the first time and you won’t waste much time. 2) describe precisely what you want the animation to do in your objective function. In this case I realized that moving forward is not the same as walking forward.
For anyone that’s interested here’s what the final spider looks like without any animation forces applied:
So the new school year has started and between classes, research, and TA duties I’ve had little time to work on my main game. However, I have signed myself up to make a bunch of smaller games. By the end of this month I should have the first one posted. Every calendar month after this I’ll be posting a new game. I’ll be following along with themes over at The Experimental Gameplay Project. Stay tuned!