Its been a couple of busy and frustrating days since I updated this. Friday and into the wee hours of Saturday were spent finishing my game and prevented me from updating. Then came the internet failure. Until this morning the only access I had to the internet was my cellphone, so I was unable to post a link to it.
but that’s the past and here’s the link:
There it is, the first (non-TI-83) game I’ve ever finished. And its glorious, or atleast playable.
20 levels of corpse-eating, attack-spewing action.
In all seriousness though, I consider it a huge success.
I wrote the entire system myself, though it came up a little short of what I had wanted. Right now it generates nethack style rooms connected by hallways. This was originally supposed to be only one of four types of floors. There would have been:
1) outdoors; mostly open with objects generated to segment off parts of the map
2) dungeons; what is in the game now
3) mazes; labyrinthine floors of winding hallways
4) monster vaults; if you’ve ever played shiren you know what these are and either find them extremely exciting or terribly cheap;
Additionally, I did not put the final touches on the nethack- dungeon style maps that I wanted. I wanted to make the walls more jagged and place more unpasable spaces in the middle of the room. In the current algorithm, the screen is separated into a random number (5-7) of sections and then one of four room shapes ( box, elbow, entrance hall, and tri-overlapped box) is randomly picked, scaled and placed onto the map. Two doorways are selected for each room, and after all the rooms have been made, the doors are connected by hallways.
I had wanted to design several different layouts for each of these room shapes and have them randomly assigned. for example: the entrance hall room shape would have a series of pillars extending back from the doorway in, or a box room would have an island separated in the middle of it.
Finally, I had wanted to include different floor types. Currently it is just open floor and walls. I had wanted water tiles, tree tiles, chasms, acid puddles, etc. and the traversing of these tiles would be limited to what skills you had acquired. The time cost of implementing the skills and figuring out how to verify that each level is finish able made these changes unreasonable.
Line of Sight / Field of Vision
I decided to program everything myself. I decided to not even read about it and just see how far I could get. And here’s where that bit me in the ass the hardest. I went through about 4 major revisions to my line of sight algorithm. Like through everything out and start again revisions. But my final one was about as good as I could hope for, and seeing it in action is the most rewarding thing about this whole project. I would try and explain it here but it require a series of diagrams I don’t have, and add quite a bit to what already a really long post. Just let me know if you find any weird quirks.
This part was exciting. I studied AI in college and it was exciting to get to put all the pieces together for the first time. Enemy AI is three tiered. First, they wander. They pick a direction and move in it. Once they’ve gone that way for a while they pick a new direction. Easy stuff. Second: The player leaves behind a scent as you move through the dungeon. Every turn this scent is reduced and dispersed through out the level. Enemies have different levels at which they can perceive this smell. Once they perceive it they follow the trail. Still pretty easy stuff, but it works well and looks cool.
you may ask: How does it look at all, much less how does it look cool? The answer is in the game. Play it right and you may notice somewhere around floor 5 – 7.
The last tier is that when an enemy can see the player they approach an attack. This creates a gradient of movement costs where the enemy is always moving to the space with the lowest movement cost, plotting an optimal path that should keeps them from running into walls etc.
Unfortunately the AI is the buggiest part of the game. I know that with the right balancing of number the smell tracking system can smooth out any pointless wandering you do, and give the enemy a better path to you. But right know they will follow every little turn you took. Or they’ve move the opposite way. Its weird but not entirely unexpected. AI takes a lot of time to tune, and you don’t get that much time to do in a week long contest. Especially if you don’t start programming the AI until day 5.
Combat and Progression
This is getting long so I’ll make this quick. I like the feel of my game. i thought it would be slow and methodical, but it actually plays pretty fast. The eat/digest/spit mechanics work even better than I hoped for, and with more content and refinement I think it could make for a very good full game. I may be wrong and I’d like to hear other people’s opinions about it.
I was going to discuss my future plans for this game, but this is already too long. That post should come sometime in the next couple of days.