Developers Diary The making of the world's greatest Computer Role Playing Game (RPG) (fingers crossed!) The story so far - by Graham Raven (Game Developer). (Also with bits by Michael Raven, the actual monkey who does the programming!) In the beginning. Pre-1999 I played 'Mordor' (RPG) a lot (i.e. for three years! It's supposed to last 200 hours!) Suddenly around 4am one morning it dawns on me that I'm seriously into RPG's and hey, why don't I create the 'best' RPG in the world ... as according to my own definition of 'best' of course. (yes, I was playing at the time!) Problem: I can't program. Solution: Get someone else to do that bit for me! (Can you guess who? Go on, can ya? - Michael) Following two years. Plan, imagine, discus, play RPGs and steal the best ideas (this is of course is very much an 'on going' exercise!) The discussions are still very much a highly favoured pastime and frequently take place at a village pub whilst we check up on the quality of the local ale. 2000AD. Actually start work on the world's best RPG! Basic aims. Version one of the game should be 2D tile based - we can worry about full 3D later (confident or what!?). Fellow game consultant and programmer (My son Mike) agreed from the start that 'Conversation' is sadly lacking in current RPGs. A unanimous vote agreed on the prioritisation of the Conversation Engine and another round of drinks was ordered! Even though we couldn't initially do exactly what we wanted with a database, we were able to plan. Little by little we would overcome the problems. It had to be a database of course, it was the only way to handle the mass of information we wanted to work with (three to five hundred characters all with their own story to tell!) Also we established the excellent strategy of beg, borrow and stealing whatever ideas, resources etc that we could in order to smooth the progress of the game. There's a lot of free stuff out there on the net, and surprisingly there's a lot of people who are happy to help you with your project - you just have to hunt them down. A few of you (like Sue for one) already know of my epic RPG aspirations that started many years ago. I've always played RPGs a lot, they are my favourite game (they are the ONLY game!), and yet no matter which RPG I played I always had feelings about "Well, that bit's wrong!" or "I could do that better!" Initially what were vague thoughts and attitudes about 'how such and such a game ought to be run', gradually crystallised into our current game project. As Mike's programming knowledge increased year by year (he's doing a graduate degree in business IT), it became increasingly apparent that we actually could do the seemingly impossible - we could really make our own game! Now a great many people 'out there' would love to make their own RPG. Many try, and many fail. I'm happy to say that so far we haven't failed yet and after a good three years are still enjoying ourselves enormously, and aren't half-way through all the local pubs yet which we need to evaluate as potential 'meetings' venues. I'm quietly confident that we've got the approach just about right for this project, enjoy ourselves right from the start and if we're still working at it in ten years time well we'll still be enjoying ourselves! By the by, we are occasionally asked, "Who are you making this game for?" The answer is easy, "For us!" When eventually the game is up and running it will be put on the net, free for anyone who cares to download it, but it only has to satisfy us! As I often admit, my own programming skills are virtually non- existent and when we were starting out Mike was sore put out that I couldn't understand even elementary programming, and so he determined to teach me the basics. With some effort I grasped the idea of pseudo code - spiting out in words exactly what it is you want the program to do - step by step - display such and such an image - run fight program when a bad guy appears - show picture of peaceful sky when you are dead, play music, display text message "Oh Dear!" - etc. (One day he will attend and complete a course in Visual Basic! - Mike) Amazingly enough with Mike's persistence, I was forced to grasp the strange relationship between the meaningless hieroglyphics which are Visual Basic code and the simple map editor which we had created. I was so pleased when it worked! Basically the editor made a grid which you could move about on and place numbers in the different locations. Mike said that if we could place numbers in different locations then we could do the same thing with graphics such as bitmap tiles. (representing grass, water, woodland etc) Suddenly we could make a map! 'Numbers' became squares of colour and squares of colour evolved into textures and images of the landscape. Now at a pinch I can write pseudo code, and with extreme badgering more or less follow some simple VB code - this represent a huge advance! So I largely rely on Mike to do the clever stuff as far as the program is concerned and I have embraced the official position of 'Game Developer' in our team of two. I was later to learn that this 'job title' not only embraces thinking beautiful thoughts and play-testing games, but also making hundreds of graphic tiles and writing the game's huge gossip files plus the conversation elements of every NPC in the game! I also tend to sample more ale than Mike at our planning sessions; it's a tough job but someone has to do it! Of course the simple map editor was improved enormously over many months, and inevitably we 'improved it' one day to the point where it didn't work at all! It was bound to happen - This is an occupational hazard I'm told! Thankfully on my surfing the net some six months ago I came across the Harry Riggs project; people who are very much into the kind of thing that Mike and I want to do, only these are professional software consultants! (Brains the size of Southampton!) Regardless of our differing abilities we share the same passion for game development and have often shared ideas with each other. The only difference between their efforts and ours of course is that they are simply brilliant. Having looked at our code for five minutes my friend at 'Harry Riggs' said "Ah, just change that bit!" and after that everything has worked fine. As I've already said, one thing we have always agreed upon is that conversation ought to be at the very heart of our game. We knew that we couldn't make state of the art graphics, nor did we really want to. Characters can become very convincing and believable even in a storybook, so graphics aren't always essential to bring a 'world' to life, but good conversations and stories and characters are! I find it irritating that modern 'state of the art games' are still being made that have NPCs with idiot conversations (no names mentioned) Whilst it is very difficult to have truly convincing conversations with a computer program (i.e. so good that you aren't sure whether it's a machine or another human that you're talking to!) we still feel that this is one area of game play that can be improved upon an awful lot. We also believe that it's not a question of very clever programming being needed, but simply effort and 'sheer grind' on the programmer's part. If there was one problem we aimed to crack, this was it! So as I often do, I searched the net, this time looking for 'conversation techniques' and lo and behold up came a number of articles at the Gamedev site - exactly what I had been looking for! After a lot of research and several pints in various locations we plumped for the old tried and tested 'keyword and response' technique. A crude prototype database was created and it nearly worked at the first attempt! (it's scary when that happens!) You enter a keyword and the NPC responds with a given response. If you 'befriend' the NPC (by basically talking to him a number of times) she/he takes a liking to you and starts to tell you more. i.e. You meet Fred and say hello. Fred recognises 'hello' as a keyword and makes 'his' chosen response. What that response might be depends of what sort of character Fred is. He might say "Hello", he might run away, he might attack you on sight (it takes all sorts to make a world!) So far, so good. We knew this technique has its limitations but we believed that it could be developed a lot further. The conversation engine was based on an Access database and as usual, we gained help and expertise anywhere we could. It's surprising how many people will help you if you ask them nicely! One good friend by the name of Yvonne knew not a fig about programming but did know the practical side of using/setting up databases inside out - linking tables and all sorts of weird stuff like that; a very useful friend to know in the early days! The original conversation engine has progressed in fits and starts for over two years now and currently manages several hundred NPCs all of whom have multiple Friendship Ratings (FRs), full natural statistics and alignment plus the possibility of Artificial Emotion which is generated from the stats and alignment. We still need unique images for all the characters, but we'll worry about that at a later date. The general ideas are something like this - You chat to a game character and assuming they don't attack you on sight, they will gradually get to know you a bit. Little by little your FR will improve with that character (though to what extent, you won't know until you try!) and they will be willing to tell you a little more than they did when they first met you. Will they have anything of interest or value to tell you? Who knows? You can only find out by getting to know them. FR is improved in a number of ways; simply talking to a character often will invariably improve your friendship with them, to some extent at least. Sharing a drink or several with them may help - depending on the character - as may giving them gold. Performing some heroic act is also pretty good at making friends, though it doesn't always work! At first they will tell you very little, but as you befriend them increasingly, you get to learn more and more information. Not everyone has great secrets to share with you, but you'll have to be their friend in order to find out! Then we got thinking about just what information an NPC would have to share with the player should they meet in the game world. Obviously their name and background, their job and such personal information as 'likes and dislikes'. Hmm, and then there's 'Gossip'. In this context 'gossip' covers news of any kind, and all gossip will be stored in the games 'massive' gossip files. Gossip will include events and occurrences of all kinds, from outbreaks of plague and earthquakes (very rare) to drunken fights in the local pub (very common!) Even some characters dreams will occasionally turn up in the gossip files. All events in the guilds such as who's reached a certain rank this week (and who failed!) are also 'gossip' (and who'd been robbed, lost their cat, fallen ill - you name it!). We dislike the notion of predetermination as far as future events are concerned, so there will be no fixed date for such things as outbreaks of plague, rather just a low chance of them occurring. Some things will of course, always happen on a regular basis and will follow a script eg. there will always be a harvest at about the same time of year, though whether it will be a good one or not again is subject to chance (and the weather). In order to try and give the NPCs more individual conversations we aimed to use their natural stats, guild, race and alignment to govern which parts of the gossip file a given character can access. Thus an Elf will know more about elves in general than say an Ogre, and a Warrior will know far more about 'Warriors' Guild gossip' than a Sorcerer would. A barmaid, if she's the friendly type, will know a great deal about local gossip though little concerning scholarly matters - for the latter, find yourself a scholar (scholars are very knowledgeable about certain subjects, such as puzzles for instance, though often sadly ignorant concerning common gossip). We also plan for different races to use different dialects in order to build an impression of 'character'. Ogres are more likely to say "I'm sayin nuffin" where as an elf might reply "one's thoughts are one's own" This will involve a lot of effort in writing characters responses but could work very well. We have yet to implement all of these features into the conversation engine, but are confident that we can do it. I must say I'm persistently envious though that the Harry Riggs NPCs can exchange information with other NPCs in their game - something I haven't quite got my head round yet, but I'm sure we will - it's just another aspect of which NPC can access which part of the gossip file. (Hmm, mental note - whatever the player 'does' - change guild rank, who he/she fights, hmm other things - must also go into the gossip files! This needs some work!) Then we thought about movement and NPCs. I have played games where the characters apparently move about entirely at random, or occasionally stay in the same location all the time. Hey we're trying to simulate reality here (well, sort of!) Most NPCs will tend to stay in the same village, town, dungeon etc though move about within their area - they have lives to lead after all, so that includes going home to bed, eating etc. We aim to make certain that the barmaid ISN'T behind the bar in the middle of the night! So Mike devised a system of 'drives' for the NPCs. A character will want to feed, sleep, and work (usually!) There are specific locations associated with sleeping and working, possibly feeding too, for each NPC, and the characters will follow general routes to their place of work (place of rest etc). Most of the population will be pretty darned regular in their habits, as if following some invisible internal clock, but we think this is still a better model that having them just stay in one place. This programming needs some development if we're going to avoid characters falling asleep half way home or eating whilst they are asleep, but we are halfway there. A few characters will be 'wanderers' and will turn up all over the place. I suspect that they will have individual coding to govern their movements. Meanwhile by way of a break, we have concentrated on getting the map up and running - we thought that being able to travel across the landscape might inspire us in other areas of the project. So far over six hundred 32x32 pixel tiles have been created to date, covering most aspects of landscape. We still need to work on tiles for 'indoors', dungeons, etc. We've often played games where there simply wasn't enough variety of tiles used to generate a decent landscape - fingers crossed we've managed to do a half-decent job here! (Ahem, I just have to tell you all about the size 32 x 32 - this is the third size we've had so far! First 37x37, then 16x16, now 32x32. Hopefully this will be the last change! - Mike) This is the current state of our project. Another hundred or so tiles (I hope it's only a hundred or so) and I can start placing characters in various locations. That should help to inspire new (potential) scenarios and events, plus we'll probably need another hundred or several characters sketching (not to mention visiting 'The Monk's Walk' in a nearby town, and 'The Gnu' in North Newbald looks very promising) . any budding artists out there who'd be interested in helping out? We're looking at straight forward monochrome line drawings! The great work continues ... C.G.RAVEN - Game Developer (Quality control beer sampler, etc) Places to visit: www.gamedev.net - for all your programming needs www.planetsourcecode.com - when you can't think of how to do it http://www.theharryriggsproject.inuk.com/ - to see how to do it properly! - o -