I more or less finished one of the first powerups that you’ll encounter in the game: the toaster. When you pick it up, it appears in the item box at the top right. You can then tap a point on the screen, and your cart will fire two rapidly spinning slices of crispy brown toast in that direction. If a slice hits an opponent, they’ll drop $1 worth of items (currently, one orange). But if both slices hit the same opponent, the second one will do triple damage, for a total of $4. Therefore, good aim and timing are beneficial (though not essential).
Although games vary wildly in appearance and mechanics, the structure of the underlying classes and objects is often similar. There is a “world” object, which contains everything else; there are multiple “entities” representing stuff in the world, there’s a “renderer” which tells each object to draw itself, etcetera. My game is no different, but still contains some interesting aspects that I would like to highlight.
After a week partly filled with lots of food and other Christmas celebrations, I’m back on track. I’ve done some polishing to make the game more game-like.
In Android, generally speaking, each different screen presented to the user is called an ‘activity’. Until recently, the only activity in the game has been the game itself. I’d already added a few menu screens this week, like you saw before, and have now been working on putting it all together.
Like last week’s, this post is a day behind schedule as well. Since I’m working on my part-time side job on Tuesdays and Wednesdays, it was a silly schedule anyway – changing to Thursdays to accommodate.
Sorry, no screenshots or videos this time. Instead, I’ve worked on the overarching structure of the game, the bits that should make you keep coming back. I have coded some menu screens too, but they don’t yet show the correct data and most of them don’t even fully work yet.
Recently, I’ve become mildly addicted to the old-school top-down combat racing game Death Rally. Now, I’m not really prone to addiction, nor am I particularly good at racing games, so I found this quite interesting. What is it that makes Death Rally so compelling? What got me hooked, and kept me hooked? Most importantly: which of these elements can I use in my own game? Here’s a somewhat nostalgic, entirely subjective, and utterly unscientific analysis.
The manager is the third and final part of the game’s AI. He is responsible for the high-level strategic decisions.
The core of the manager is very simple. He searches the surroundings for potential objectives, divides the benefit of each objective by the cost, then instructs the Navigator to head for the best objective.
The Navigator is the part of the AI that is responsible for pathfinding. Actually, his algorithm is fairly straightforward. Given an objective by the Manager, the Navigator determines the shortest path through a series of waypoints that are defined in the level file, then hands each waypoint in turn to the Driver.
The new AI is making good progress; I’d say it’s about 90% finished. (The other 90% remains to be done.) After writing the code, it cleanly fell apart into three largely independent modules. I like to name my classes after corresponding real-world things, so these are called the Driver, the Navigator and the Manager.
It’s difficult to do a screen-cast of an Android game. You have to root the device to even take a screenshot, and with the game taking up most of the CPU, a live video is out of the question. The emulator that ships with the SDK is too slow to make the game run smoothly, and multitouch cannot be used on an emulated device. It would be possible to record a game session, then play it back at a slower speed while recording, but it would be hard to get sound, and it’s a lot of work anyway. It seems that the only viable option is to point a camera at the phone and live with the bad video quality. Oh well. Here it is.
After deciding in which direction to take the game, the last few days have been a matter of implementing this. Due to various circumstances I haven’t been able to get as much done as I would’ve liked to, which is why this post is relatively short and fragmented.
Due to other activities, I haven’t gotten round to much coding in the last few days. However, a lot of thinking happened that is equally, if not more important.
There was a permission problem that sometimes caused comments to be refused with a 500 Internal Server Error. This has now (hopefully) been resolved.
I also added clickable links to the Atom feed for the blog, because some browsers (Chrome, and Firefox 4 beta, but strangely not Firefox 3) do not show the feed icon in the address bar.
After seeing the last few posts, someone asked me why I’d gone from the original item-gathering concept to a more customary around-the-track racing game with more customary controls. This is a very good question, so in this post I’ll address some of the design decisions I made along the way.
Well then, since last Monday, the Frozen Fractal website is unofficially up. And since today, it’s official, because now there’s a blog post announcing it!
There are a handful of racing games that let you race purely against your own best time, but the majority of them let you race against others. It adds an element of competition that you don’t get when racing alone. The solitary racer is someone who spends hours trying to figure out the optimal way to tackle that sharp corner, just to shave a tenth of a second off his best time. Not the kind of audience I’m targeting with a somewhat (albeit not completely) casual mobile racing game. Long story short, I need opponents.
My brother probably expected the cart to make a turn if it was pushed on one side. Instead, it would spin around its axis, but keep moving in more or less the same direction! […] I will need to consider carefully whether this is going to be a real problem, though.
No updates last weekend, because I’ve been busy with the Rails Rumble: an annual contest to build a Ruby on Rails web application in 48 hours. Three friends and I built ChordWise, an online ear training and score reading practice application for musicians. Although there are some bugs to be ironed out (sound doesn’t work in Chrome, probably nothing works in IE), I’m very satisfied with the what we’ve accomplished in just two days. It’s a promising start, and we might continue to develop this into a full-fledged product and try to make some money out of it, if there turns out to be enough demand for something like this.
Although I’d previously determined that the controls of the cart worked nicely on a touch screen, they were nowhere near perfect yet. This is one of these aspects that can make or break a game, so it’s important to address it as early as possible.