Posted by r1ckparker,
20 January 2012 -
I've not updated for a while, but I've been hard at work. I've added character stats and a character sheet, I've added keys and locked doors, icons for items, I've made a start on the combat and put some monsters in, it's coming along great now and starting to look like a proper game.
Now I know how many and what type of graphics I need, and I can start replacing my scratch graphics with finals. I downloaded a royalty free model and wrote a quick display program which shows the model and exports it to a bitmap. I then loaded these into Photoshop, tweaked them slightly, added shadows etc. I am going to have 16 frames of animation for each monster -
1 standing still
3 walking towards the player
3 walking left (flipped for walking right)
3 walking away
I could, of course, have loaded the model straight into the game but there's a couple of reasons why I'm sticking to the flat 2d graphics. One is aesthetic, the game is a throwback to the old dungeon crawlers so I want it to have a semi-retro feel (even though it's in full 3d). The second reason is the target devices, the main goal is to be able to play this on a netbook which aren't the most powerful machines. If it gets ported to mobile devices there may be even less processing power.
Had a horrible bug which destroyed my maze, took me a while to hunt it down and fix it. Turns out it was just 1 character in my code which was in the wrong place. I also took this opportunity to tidy things up a bit, do some more optimisation etc.
I stumbled across this interesting article about tutorials, my first level is a tutorial which explains how the game works and I am definitely going to pick up some pointers from this article. I had actually made some of the mistakes mentioned in the article without realising it so it was definitely worth a read.
As development continues, I've been forced to think about all the stuff as a gamer you don't usually think too much about, like UI graphics, icons, title screens, music, sound effects etc.
I've done some music for the title screen, which you can listen to below. I wanted to to be synth-y and slightly industrial. It's quite long and repetitive 'cos I figured that you would only hear the first few bars then you'd be pressing 'Start'. It gives a good indication as to the direction and feel of the game. Hope you like!
This is just a reminder and some advice to all you developers, make sure you backup your data. Stop for a minute and think - what would happen if you lost your hard drive? If you were flooded? Shark attack:? OK maybe not but you get the idea. Something dramatic happens and your computer is trashed. Would you be able to start again? Would you have the motivation to start from scratch? It doesn't take much to protect yourself from the worst, and believe me, you will thank me one day.
1) buy a cheap 1gb memory stick and write on it 'Backup'. Don't use it for anything else.
2) Make sure you backup regularly. Once a week, once a month. Whenever. Just get into the routine of doing it.
3) Store your backup away from your computer. Put it in a different room in a safe place.
Thats it! You may be asking, why is he telling us this? Has something happened? Well no. But it could, and that's the point. You never know.
Last week I did a bit of work on lighting and applying normals to my walls. This gives the impression that they are made up of more than just a flat polygon. However because the viewpoint is so fixed (at 90 degrees and no vertical movement) it's really difficult to tell that the normals are even there! I might take them out at some point in the future, or put in a switch so I can turn them off if necessary.
So with the pathfinding in place, my engine is just about complete. I've implemented -
Procedural level generation Mapped level generation Movement with collision detection Item management, with equipment/inventory screen Interactive objects (doors etc) Wandering monsters Combat Heat management Automapping
wow, there's a lot of work gone into that lot! My next step is to start putting in the game elements and making it fun. The first step is to design a 'tutorial' level which introduces the elements of the game, tells you how to play, what are the goals etc. When I was playtesting other dungeon games, I found this was a big let down for some of them, there was no help at all so you didn't know how to play the game, what keys to press, what the goals were etc. I'm a big fan of in-built help systems and I think they are especially useful in an RPG game.
So I have started programming the first level, it is mapped rather than generated so it will be the same every time. I have a portrait graphic and a script which runs and gives you the basics from your Mission Controller, 'Theora'.
By the way I found this wonderful site, really useful if you are struggling for art assets.
I could have downloaded a library but I thought it would be better to do it myself. Also I couldn't drop it straight into the game, because it would be a nightmare to debug in first person! I therefore programmed it as a separate function and I can just drop it in now. It's my own version of the algorithm called 'A+' because you can't travel in diagonals, just on the x and y axis. This is because the game is grid based (like Dungeon Master or Eye of the Beholder for example).
Here is a demo video, the starting point is the green square and the finishing point is the red square. Purple squares are checked (on the open list) and the blue line is the final path.
So all I need to do is replace the green square with the monsters x,y and the red square with the players x,y and it should work...
It was surprisingly easy to get the monsters in and animated, and facing the correct direction in relation to the player. Basically the player has one of 4 directions (0, 1, 2 and 3) and the monster has 1 of 4 directions (0, 1, 2 and 3) and you subtract the monsters direction from the players direction to give you which sprite to plot. If the result is less than 0 you add 4.
E.g. if player is facing East (1) and enemy facing South (2)
Have made a start on the combat today, I have populated the maze with a random amount of monsters and when you bump into one, the combat routine is called.
Currently it's realtime and you have to manage your heat compared to how much damage you can do. I am going to add a 'block' function and I also still need to put some weapons in, but the basics are there. I will also need to add a 'run away' option, in case things are getting bad!
I am also going to have to source some proper monster graphics, I'm just using googled images at the moment (I think the zombie monster is from Left for Dead!)