Sometimes it’s fun to just work like crazy on something for a day or two and try to get as much done as you can, without worrying too much about the result. I used to make demos when I was young (demos are small programs showing off graphical effects, with nice art and music to go with it) and me and the guys used to get fuelled up on Jolt Cola and coffe, and spend whole weekends getting stuff together.
So a while back, when a forum I sometimes visit arranged a small competition where the objective was to create (or at least attempt) an RPG in only 48 hours, I decided to join in to see what I came up with. It was a very welcome break from the more serious things I was doing at the time. Also, it’s a great learning experience, as you have to really make quick decisions and stand by them, getting them to work any way you can. I started with nothing but my Pixie Game Engine. I didn’t even have an idea of where to start or what the game would be about.
I started by browsing through some of the Poser stuff I have (Poser is the program I use to create most of my art, basically you can buy lots of pre-made 3d figures and put them together the way you want them), using the Poser Content Manager, which I now couldn’t live without I found stuff I could combine into the girl you see on the picture above, and decided to base my game on her. I named her Kassandra (actually, my mind drew a blank, so I browsed a mythology encyclopedia and picked a name I though sounded nice ) and put the cheesy "Amazing Adventures of" in front of it, and just took things from there.
I made the backgrounds by rendering some rocks in Poser, and then I assembled the screens in Photoshop. Basically, I created two fullscreen layers, one mud, the other grass, and then just used the eraser to "draw" the paths on the screen, and then just picking and placing some rocks on top of it.
I wanted a simple point-and-click interface for this, where the player can click anywhere on the screen, and the character should just walk there, automatically negotiating any obstacles. I wrote a simple A* pathfinder, and just paimted a grayscale image for each background, to use for determining where the player could move. The pure-white areas counts as blocked – the player won’t be able to move there (and the icon will change to indicate this), while the black area is the preferred route. The player can move onto the gray area if desired, but whenever possible, the character will try and stay to on the black path.
This makes for a nice system, where Kassandra will stay to the paths unless told otherwise.
I have a couple of enemies in the game too. They basically just move around at random, and if the player collides with an enemy, there will be a battle. I move the enemies by picking a random point on the screen, and then using the walk mask to determine if it is a valid location to move to, and then using the pathfinder to move the enemy there.
I didn’t really have much time left when I reached this point, so I did a quick and simple battle system, but which works fairly well… The player can choose to Attack or Retreat (though there’s always at least one round of Attack before the Retreat option is made available), and when you choose attack, the game will pick a random "Attack Modifier" value for the player and one for the enemy, which will be added to their Attack Values. The one with the highest attack score wins the round (draws favour the player) and deals his Damage Value to the other. It would have been nice to have had time to expand on this system, allowing the player to change weapons and use spells or items during battle, to affect the Total Attack Score of each round… but I ran out of time…
If you want to try it out, you can download The Amazing Adventures of Kassandra here.
As usual, the source code is available as well for those interested. It uses the Pixie Game Engine (included in the download) but it is somewhat messy, as I had to rush things for the deadline…
Download the source code (needs the game if you want to run it):
Kassandra Source Code – 938 KB