Pacman diary by Tony Brice. 30th April 1993. -------------------------------------------- Day 1: 30/4/93. --------------- Yes, I know it`s been done squillions of times before but who`s counting? Besides you couldn`t ask for a better introduction into the Amos language than something like Pacman. Besides, this one will be special. At least that is my intention. Gathering what knowledge I gained from my first stab at programing in Amos - Ping Pong no less - I am aproaching this one with a little more thought. The pen and paper came out prior to any coding at all, and I have set myself up with a few rough notes on what the game will actually look like when it is done, and, having done this (and much easier it was to), I set up some sprites after deciding what colours should be in the game and using the same palette for both the icons - which will be used to display the map - and the sprites to be moved - such as the monsters and pacman himself. nd backgrounds in different colours and seeing the problems it creates later on when it comes to displaying them. Now the graphics are finished already - for now. Well, how many sprites did I really need to define - and I can move on. Some notes were made to keep track of all the definitions as well as a list of all the colours and their numbers. This will solve one of my greatest pitfalls when writing something, namely the lack of colours I use, due to me using my Amiga with a black/white telly for many months. And, after writing the code to display my sample screen, it looks blinding, and the colours are totally right after a couple of botched atempts on the sprite designer for not thinking and utilising the colours properly. I have yet to see the sprites in action but I don`t forsee any problems there, providing Amal is feeling cooperative. Quiet a productive start and it didn`t end there. I used my Dpaint disk for the first time today and, after getting to grips with the functions, I put together a simple little title screen, with some text in many different fonts (and colours of course), and a little piccy of the hero of the game. It looks very good for half an hours work, and is now functioning as the title screen. This picture, after a set amount of time flips to another screen which shows up the top five scores as well, so, for now, this is the front-end complete. I`ll go back to it after the game is finished so that I can make some nice little special effects in there. Who knows, what title screen can be complete without a scrolly, and I think I know how to do one now. Not to mention some bouncing screen effects as well. I stuck in a little bit of music which can be toggled on or off with a quick tap of the M key. I like the sound of True Faith by New Order as much as anyone, but when you`re listening to it a million times over while checking the game for bugs and glitches it can be a bit tiresome. Still, I hope you like it. The sonix2,1 program on the Amos disk converted the tune for me and all I had to do was stick it in a bank and save it out with the main program. I am getting to grips with Banks as well now, and it is certainly making life a lot easier. Now if only I could find a way of saving out my title picture out into one, then I wouldn`t need to load it in each time the game is run. But at least it only needs to be done once, as I can keep it on it`s own screen. And boy does Amos make this easy. I almost feel guilty. I said almost. I have had some teething problems before it all came together. So there we have it. A title screen, music and graphics, as well as the code to display the map all on the first day. Could be a record time on for completing this one. And it will be one hell of a boost for morale when I put all the routines onto paper, and then dive straight in with the player control bit. Then I can see my lovely sprites in action. And, time permiting - I have a living to earn as well - I get the meanies and inteligence bit in as well. That done it should be plain sailing. By the way, I hope you aren`t expecting an easy game because I have four nicely coloured ghosties who are gonna prove otherwise. I can`t wait to see them zapping round the maze. Time to hit the sack now, so that has to wait till tomorow. After all, it is 4.12am. Day 2: 6th May 1993. -------------------- As usual I have proved to myself yet again that nothing is ever as easy as I think it is going to be. Problem number one: I can`t seem to get to grips with the sprites no matter how hard I try. I have given this up for a more fortuos route - that`s a big word for 12:35am - and have stuck all the sprite definitions into bobs instead; these I can manipulate and at last I am getting somewhere. I think my problems could lie with the automatic sprite update functions etc, which I am looking into so that I can update them all myself. Bobs will be just as good for this game anyway and I can keep trying to get sprites and Amal to show a little coperation. I have also got serious problems with the colours. My bobs wont use their true pallete unless I use the Get sprite Palette command, and, for some totally stupid reason, this changes the colours of my Icons that display the map. I wouldn`t mind but I designed both sets with the same Palette so this shouldn`t happen. I think it is time to redo the graphics, this time making sure I get it right. I need some more sprites for the score when you kill ghosts etc. I have finally - after much tweaking with the control methods etc - got mr. Pacman esq` up and moving properly around his little maze. He doesn`t eat the pills or anything yet but the collision checks are all there to make sure he can`t walk through walls etc. This made me feel a lot better once I had it up and running. I should be able to use the same routines to move the ghosts as well so that is one major headache out of the way. Speaking of which, I am developing one hell of one right now. That`s what comes from using the computer all day. Had an interesting idea for a clever graphic effect today. I want to have two screens over each over on the display, one with the main picture and another totally black with a big hole in the centre that moves around displaying whatever is underneath the hole only. I don`t know where to use this yet, but I saw the effect on the telly and thought: I can do that in Amos and there you go. I have got to use it somewhere. More thought on this later. Maybe I`ll do a better picture for the title screen too. And to wrap off, I had a fiddle with Stereo master today as well. I think I have a few samples I can use for sound-effects, providing I can find a way to import them into Amos. Should be fun. I have the game roughly on paper now, which will make life a lot easier once I get into the flow. Still no problems with speed and hopefully I can keep it this way when the baddies are up and running as well. Next time I hope to get the score screen up. We`ll see. Day 3: 10th May 1993. --------------------- Spent all day updating my Amos system yet again. I now use three drives with disks in to hold all the data and utilities I should need for development. A lot of fiddling was called for here as I had to make sure that Sid was used properly, ie: all the menus and buttons were set correctly, so that Df1: is not used to save anything to as it does not write to that drive for some dumb reason. The drive probably does not work properly, still I got it for nothing so I wont complain. All done now anyway, and Graphic converters, a desk top calculator, sid and Deluxe paint are all ready for instant access. I just love having everything I need to hand by building my own custom system, but now I probably wont use half of it. Still its there and that is good enough for me. Further progress in the Music conversion process today. The reason I could not convert some of my Cover-disk music files to Amos banks was because some were crunched with Powerpacker and I had not realised. Some serious slaps to my forehead, and a little fiddling, resulted in more music available to use, and some in-depth knowledge on using the trackplay commands in Amos. My music problems are now most definetly solved, and I am totally spoilt for choice as to what music I can use in the game. Maybe I will stick to true faith after all. It kind of grows on me. Sampled sounds are being worked on now, and I do not see any problems in that department in the near future. I have a program with Amos to build a sample bank and load it in with the main code so that any sound I like can be played in any way I choose. All I have to do now is find some suitable effects as I dont have access to a sampler so that I can create my own. I think I will be having a lot of fun getting some together. It is just a matter of deciding where I need them. Tomorow, if I ever wake up, is my day off, so I hope to get the main sprite moving about and eating dots etc, as well as the score screen up and updating smoothly. Then it is time for the meanies, and the tricky problem of keeping the speed right. Definetly one for the compiler once I have finished as I have just about had enough of Amal. Once I am in buisness there, I will have to go back to the graphics and start over. No great sacrifice as the last were not to brilliant and I need extra definitions anyway. I wonder just how fast Amos can paste icons anyway. Hey, hang on, worry about that tommorow. It is time to hit the sack. Later. Day 4: 11th May 1993. --------------------- Now how do I describe today? Well, the weather was nice. What do you mean never mind that, how about the game? Well, I did what I wanted to. Not very helpfull, eh? Well, I`m getting to it. The movement for the pacman is working and he does eat the dots now, and the score display is up and running, but, and here is the big but, it doesn`t work that well. The character moves too fast when he isn`t gobbling dots, and to slow when he is. The main problem is animating the character smoothly: it is going to need to be rewritten. I have already done it from scratch four times and none of them were efficient enough. I need the speed to be balanced wether he is eating or not and I have to keep the same speed even when I put in the ghosts moving. There is no real way to check this without having them moving as well but I am just putting in a rough delay loop for how much processing the enemy move routine will take. Not very accurate but it will have to suffice as I want to have the player movement totally right before I get into that part as the main code will be much bigger by then so I will have to convert routines into procedures and fold them up when I no longer need to edit them. Anyway, back to the point, I don`t want the player to move in block jumps, ie: moving 16 pixels per move to keep in line with the maze blocks, so I have to freeze input from the joystick while I move the character a pixel at a time until it has reached its destination, but I have to update all the other stuff in even movements regardless of wether the player is moving or not. It is all a matter of synchronisation, and my code is just not acceptable at the present time. Next time I am going to strip & rewrite it yet again. And again if I have to, as I want it to feel good as well as making sure the game is not sluggish. If I have to do a major rethink then so be it. If I think this game is worth doing (which I think it is) then there is no point in compromising. The person playing it will just delete the disk or throw it in the bin, if they don`t feel comfortable with the game, despite how good it looks or sounds. Then the whole effort would have been wasted. I`ve seen too many unplayable games to get away with poor control myself. Okay, enough of the concience crap. What else got done? Not a lot actually. This part has to be right, which is why I am spending so much time on it. I`ve stripped the code a bit and rearranged the routines to gain that little extra speed that will probably be needed later, and I have made the game loop back to the title screen each time Pacman eats all the dots. I have got the game sorted out so that it needs to only go to disk to load the title screen IFF once, and just hide the screen while in game. No annoying disk access here. Well, how could you get away with it in something as simple as Pacman, I ask you. And just to really ruin my day, printing the score really slows things up, even if I only do it when it needs updating. What a pain. That is something else to look into. Day 5: 22nd May 1993. --------------------- Wow, ten days since I last did any work on the program. I guess today I ought to achieve a lot so that I keep interested. I put in a lot of effort on the sprite designer today, and came up with the brilliant idea of having the icons (the bits that build the screen) as sprites and just displaying them by using the paste bob functions. This gives an added bonus of just one Palette ored. Everything is now displayed in the colours I want them to be. So if you don`t like the colour scheme then I can`t blame Amos. The new sprites look a lot better now that I have redifined them, and I think I will have another crack at them at a later date, as even I can do better than I have already done, and I am no artist. They are functional at the moment though, so the other tasks are more important. Finally got pacman eating the dots today. I had to change the clear character routine, as I couldn`t paste an empty floor icon over something which needed to be erased as it would just draw over the top of it. I could not define an empty square over it either as it just would not show anything. I solved the problem with some clever use of the locate function, which would draw a box of four spaces underneath the pacman sprite in black. Crude, but effective although I might alter it later. I would have got onto the new player-movement routine today but for ght as it is my sisters engagement and I have to get ready. And Two: I have recently quit smoking & I don`t have the concentration prowess without nicoteen at the moment to get into some heavy coding that will be nescesary to get it right. Until next time then. Day 6: 23rd May 1993. --------------------- A definite plus day today. Still of the fags, but I have a full pack just sitting in front of me as an exercize in will power, so we`ll see how long I can last. Concentration is not all it could be, but perseverance reaped its own rewards and I now have the pacman moving at an equal speed wether he is eating dots or not. The drawing a few spaces underneath the pacman to clear that bit of the screen was just to crude and slow so that had to go. A shame as it took me over an hour and mucho fiddling to get it in and working how I wanted it. Still, never happy, that`s me. I now have a different background colour behind the dots so that I can paste a blank icon over the space when er and it means I have some spare speed for when the meanies go in (soon now I promise) and then I can synchronise it all for the final time so that the speed of the game remains constant no matter what is happening. A little more work was spent with the sprite designer again today. Still not totally happy but things are looking better. I think once the meanies are in I can look over the whole thing again and see how to do improvements. I designed the monsters ages ago and have yet to have them up and moving so that I know if they are alright. A new title screen picture will have to be drawn. I want to lose some of the text (that is basically what the old one is. loads of text in as many different fonts as I could cram in.) and have an actual picture with a big square box in the centre for displaying high scores and things like that. A session with Deluxe paint is called for in the near future but first I have to get the enemy sprites on screen and moving. That`s next. Day 7: 24th May 1993. --------------------- Yesterday I finally put the enemy monsters in and got them moving. Much hassle as I expected, but finally they moved around without cheating by climbing over the walls, and, surprisingly even to me, the speed was still top notch. Definetly room to fiddle about with the inteligence. The dummy routine I have at the moment is just useless as they don`t even move unless they get a clear path to the pacman then wham bang and they are on top of you in no time, even if you do get three moves to their one. They also have the annoying habit of all ocupying the same square so you never know how many their are as they all move over one another. Just what I need. Monsters that prefer to go for each other rather than the player. Some working on the inteligence is the object of the day for today. I am thinking on the lines of them having a set path, and not changing direction until they reach a wall then they can have a rethink based on where the pacman is at that time, and this will be hell to implement, though I think this is how the original games inteligence actually worked. Also, if I can keep the speed up, then there will have to be four monsters - not three like I have at the moment - and I hope to actually have them moving in pixels, not blocks like I was forced to make the pacman do due to the screen layout changing as he moved. The synchronisation should be pretty easy to do once they move properly and I don`t forsee too much problems with speed. Not that I have had any so far apart from when the score is being displayed with the action. Still have to come up with a way of solving that little problem. If I can get a better inteligence routine - I have the whole day to try - then it is probably time to make the power-pills actually do something and get the collisions in. Probably easier to check the block positions on pacman with relation to the baddies, rather than using the collision commands cause I`ll never know what is moving over what at the time pacman gets hit. later anyway. Here goes nothing. Later: ------ Much more work on the inteligence put in now. The monsters are still thick, and I wont be happy with it until a lot more effort is put in, but the little bleeders can surprise you. They catch me out sometimes and I wrote the little routine to move them. Very unpredictable they can be and this is a downfall as I have to try and work out why they sometimes follow a preset path, or sometimes go all out on your tail, or sometimes just stop for a tea break until your x and y cordinates match and they kick in with fuel injection. I still have to get the power pills working but the baddies now end the game if they hit you, though they still all want to occupy the same block and I haven`t got the patience to put in all the extra bits of code to stop them being so close. I have roughly got the inteligence working now. At least it will do for the moment, so I am going to get on with the rest of the , and come back to it. I have to find a way of displaying the score while keeping the speed. I also need to put in the code for the warp gate - you know, the bit where you go off the screen on the left and reappear at the right and vice versa. It is a bit of a bugger going down the path with a wall at the end of it to get at the dots down there and seeing all the monsters come haring down there after you. And there is no way out of it. Then again the buggers are too stupid most of the time to follow you anyway but when they do it`s game over as I haven`t given you 3 lives yet. That should be done today as well. At the moment I have two little messages that come up when the game is over. This will obviously be changed later on. They are just there to tie up the loose ends so to speak so that I have the space to put in the end-game sequences later and so that the game does not keep jumping back into the editor when I am debugging. When I get the score screen up and working properly, I want et a high score and have a little box with the alphabet in and a moving cursor to select the characters for your name. A lot more polished than just a text entry cursor, and it`s something I wanted at the begining which is why I already did the cursor in my sprite collection. That bit should go in today as well as having the high score table actually working rather than dummy data. Okay then. Back to the grind. Now where the hell do I start. Well, the title screen seemed like a fun place to start, so, instead of totally stressing myself out on incorporating the monster munching code, I stressed myself out with Dpaint II and tried to come up with a new Title screen. The new one does not look as good as the first - because I`ve got rid of all the text and now there is a lot of empty space - but the main box for mid-screen is there and providing I leave that the way it is, I can always edit around it later when I decide what to draw. A lot of intense work has s have been implemented. Gone is the flipping between screens routine. No need for it, as I have the box in the centre of the title screen to display stuff like credits and the high score table. All of the routines to display high scores etc have now been written, and a very nice atract sequence it looks now that it is finished and tidied up. I have a clever routine to clear the inside of the box without altering the screen and so I just put in the subroutines to display everything in a predetermind (did I spell that right?) order and bounce some bobs around to create some movement to keep the watchers attention. It looks good, and for once I have done something I am happy with. A few fixes were made so that the game can be started almost instantly no matter what is being displayed were put in and, thanks to the speed of Amos, everything is synchronised brilliantly. Hell, I even had to shove in a few delay loops, as colours were cycling to fast when the high scores were r with the best score has his name up in flashy fashion. As far as I am concerned this bit of the front-end is now finished, as otherwise I would probably go on forever just toning up the cosmetics as I thought up new ideas. Now I have to get the game matching the presentation, although I want to get the high-score entry bit in next, as I have never atempted to try a routine like the one I want to put in for entering your name, and I want to get the music for it in as well. I already have the tune on disk ready, and the nescesary code for playing it in the background. And I am impatient to get it up and running. Besides nobody said I had to write this game in a progressive manner, and, after all, it is nearly finished. Until the next instalment. Day 8: 25th May 1993. --------------------- Decided on forgetting about the high score entry routine for the moment, as my brain went into overdrive at work today and I coined a rough routine in said earlier in the diary that I could not seem to get the bobs moving in pixel by pixel manner and I gave up in frustration and settled for block movement. That compromise has been niggling me ever since so today I finally got stuck right into it with a vengance and got the main character and the baddies finally moving in a smooth pixel by pixel manner. It looks a lot more profesional, if slower, but I can always fiddle with the update rates via a skill level selection option on the title screen - about time this game had some options to speak off - so the game can run at the players choice of speed. Still on the gameplay front, I have had a few new ideas with regard to the inteligence of the monsters. I think I should make them keep moving in the direction they start off in, and only change direction when they come up against a wall, when they can reasses where pacman is and go another way instead. I think this is how the arcade game actually works, and I am hoping ably mean a major rewrite of the entire inteligence routine which I am not looking forward to, still the game can`t be left as it is, as it is way to easy to avoid the little bleeders, and this does not make a challenging game. Keeping in line with the original arcade game, I have decided to incorporate two different modes of playing: Arcade & custom. Custom will be the current way - ie: pacman only moves when the joystick is moved. And Arcade will be like the original, where pacman moved in the selected direction untill the joystick indicated elsewhere or he headbutted a wall. This should make the game appeal to more people, as the lazy ones of you out there - come on, own up - only need push the stick every now and then, while the others can rely on a good joystick & fast reactions to keep the pacman on his toes. Definitly idea of the month this one, and, in theory, it should be pretty easy to code. Famous last words I suspect, still now I am commited., re entry bit sometime in the near future. Like Magazine reviewers always say: Gameplay comes before polish. I`m not fussy. I want both. Having said this, a few minor alterations were made to the front end bits today. Moving the joystick is now like a fast forward command to the title screen telly, and lets you move to the bit you want to see very quickly This is for those who want to see the high score table again, when it has just disapeared and you forgot to see who was in second place and wont see it again for another thirty seconds. Maybe it isn`t nescesary but it seemed like a nice idea at the time, and presented me with a little sideline to think on while I sorted out the animation for pacman routine in my head. I`ve also fixed the title screen so that fire will start the game as soon as the button is pressed rather than the computer ignoring you until it has finished what it is doing. Not very user friendly. And downright unsociable come to that. It works fine now anyway. That`s all for today. 9: 26th May 1993. --------------------- Pretty good today so far. Got the Arcade and Custom modes both in and the apropriate mode selection on the title screen. Took a bit of fiddling to get it up and working right, especially when Amos decided it wanted me to clear all the bobs off the screen when the game starts before it would let me see any characters again. Heaven knows why, but it was a right pain trying to find a bug in my code which didn`t actually exist, just because I took out a command I didn`t think was nescesary at the begining of the game loop. I mean there is no point in zapping all the bobs left on the title screen when you are just going to display them again in the wink of an eye so I took out the command and then spent an hour wondering why I had nothing moving on screen and the joystick was playing eat the dots with an invisible pacman. Most annoying at the time. Anyway problem solved now, and the skill levels are in as well. At the moment all it adjusts is the Monster update rate, but efully I can get it to be a bit more inteligent depending on the level. The code for the enemy inteligence definetly has become top priority now. At the moment, for some strange reason I just can`t fathom, Pacman moves very slowly unless the baddies are moving as well, in which case he moves quicker and more smoothly. I would have thought this would be the other way round, but not so. I have some work to do here I think. And again I had to do a little work on the front end. I don`t know why I keep saying that I am finished here. I still keep finding things to do with it. This time I had to display the current options and make them selectable as well as put in a little routine to not start the game until you push and let go of the fire button so that the endgame screens don`t flick off and you start the game again imediatly. Surprisingly that worked first time, unlike any other routine I have written so far. Now it`s time to make the baddies have an IQ of Mensa standard. Don`t try this at home folks, qualified Surgeon/Butcher. Later ----- Oh boy, what a day. With the exception of a couple of hours, I have been at this inteligence routine nearly the whole day. I am currently on the tenth rewrite and I am still a bit of a way off. I keep coding a massive chunk of comparison and if = < > etc lines and ending up with a huge block of code that does not do the job very well at all. I have lost count of how many times I have stopped to rethink the whole thing through. Just my luck to be having problems with something that is absolutely vital to the gameplay. To make matters worse I suspect I am going to have one hell of a job keeping the speed right once I do get them moving inteligently, as everyone knows, the more instructions the computer has to process, the longer it is going to take. Here I go again for another crack. Well, a little more success now, but I still am far from happy. The enemies are pretty smart now. One fatal move that lets them to near your tail e problem of monsters hugging each other. Not to worried about it at the moment as I want to have each of them with a different form of inteligence by the end of the diary and game. What a challenge: I`m having enough problems just getting them to use the routine I have now. Next game I write will absolutly not have Artificial inteligence. It is driving me up the wall. Having said that I probably will use it again, as I should know how to do it after writing this one. Live and learn as they say. The routine for baddie movement is a lot smaller and neater now, so the speed should be kept up, even though I still have to work on it, because I am trying to make sure the baddies never stop at all, which they do sometimes at the moment. I have subconciously abandoned the fourth baddy. I don`t really have room for it on screen and I think It will be to dificult with him there, if each monster is following different routes. Especially if the playscreen is not that big. day, as I deserve a rest, even though the inteligence problem will probably bug me all night. I hope I`ll come up with some ideas when I am away from the computer like the animation routine. It`s amazing how quickly you get used to something being there. I was trying for days to get the bobs moving pixel smoothly but just couldn`t do it, and then, wam, inspiration, and I hardly even notice it now that I am embroiled in some other problem. I suspect that is what programing is probably about. Next week I probably will just take it for granted when I have three super fast baddies closing in on me and blocking off all my exits while I am trying desperatly to grab the last dot. And to another future thought. What sort of sounds am I going to use in the game? And where am I going to get them. Just another day in a tired programers life. Why is it never easy? Day 10: 2nd June 1993. ---------------------- Had to take a few days off due to a sudden mystery virus that put me mputer. Short wages next week I think. Still not recovered yet but, as Pink Floyd say: The show must go on. Don`t know how much I can get done today, but I have to finish the inteligence bit sometime, and it is getting to be sooner rather than later. I have lots of other bits to work on, which I can`t even start on until this is done. It`s become annoying more than anything. I`ve even come up with a rough plan for my next game. More on this later on in the diary. Now back to those f**kin` baddies. Ever had a day where you feel like a total prat but hate the idea of admiting it. This is one of mine. Spent at least four hours on another total rewrite of the code. It looked like I had a brilliant inteligence routine at last, the only minor problem I had was that the monsters map data wasn`t cross referenced properly - or so I thought - so they were stopping and changing directions at invisible walls and floating straight over others. It e. I thought I had just entered a line wrong or something so I spent about two hours looking through for an error it later transpires was never there. Confused? I know I was. Well, let me explain. I got totally Pissed off with the dam thing in the end so I reloaded my old version before I had made any changes and spotted the error straight away. I had been using the X and Y pointers on the enemy map data the wrong way around and as a result, the enemies had been totally confused as to their actual position on the map. Gutted? You bet. All that hard work down the drain for nothing. I am now going to put in what I can remember and hopefully I`ll have it right this time. Back in a minute. What a time to run out of cigarettes. So much for giving up, especially as I`m meant to be ill. Right. That`s enough. I`m spending to much time getting nowhere and for now I am drawing the line. The code just keeps getting bigger and the whole thing is just not coming together. Sure, I could go back and start over parts of the program while I am trying to put this bit together but I am not going to. I am going to stay the hell away from the keyboard for as long as it takes, and try and devise an inteligence routine on paper that works and then code it. I have just about had enough of this trial and error aproach that I have been using for the last few sessions. It has worked okay for the rest of the program, but, as I should have forseen, something like this needs a lot more thinking about. I will return. Though I don`t know when, as I have another game idea to put to paper as well. And what an idea. See ya. Day 11: 3rd June 1993. ---------------------- There, wasn`t gone that long was I. I made the mistake of giving up on my last game because I got totally tired of the way it was turning out, so this time I was determined not to give up so easily. It is really despairing to give up on something after spending so long on it. I worked out a new ning the computer off, and I have just had time to type it in this morning before I have to go to work. It is working well enough for now, and I have even put in a thick or smart option which determines how smart they actually are. What it basically does is tell the computer to watch where you are all the time if they are smart but only check where you are when they hit a wall if the thick mode is on. It works okay for now, but I`m sure that the computer could be made a lot smarter. Then again, I don`t intend to push it right now. Went through the code just to straighten up a few short cuts I put in. The game was bypassing certain routines so that it would run quickly while I was gametesting, so I had to put it all back to normal. Very soon I am going to go through the whole game code - it`s rather large now - and tidy it all up. This is mainly for speed reasons later on, although it will ease my peace of mind. I can probably stick some of the hat editing is easier. I have to get the power pills working now, but I still have to work out how to display the score without slowing right down. I will have to try a second screen and see if that helps. A lot of thought is going to be needed very shortly even though, technically, this game is nearly finished. I have to decide what to do with the advancement of levels. Should I make the baddies move faster as you progress? Should I make them more inteligent? I should be so lucky. Should I have another couple of maps? Maybe load new ones in off disk and write a map editor so I can save a few. I still have to put in the gateway off left & right ends of the screen. Baddies not allowed, I think. And maybe the high score entry routine just to finish it off. All will be revealed in the end. At least I`m not so apethetic as to want to give up today. Maybe things are looking up. To think, when I started this game, I thought it would take a day, or session. That was just cosmetic. Not far to go now, anyway. Later in the day - otherwise known as early the following morning ----------------------------------------------------------------- I have decided that a few of the actual gameplay routines are long past putting in time. Okay, so I haven`t decided what to do when the screen is completed yet or stuff like that but things like the pacman dying animation and the powerpills working etc all need to go in soon. Also the lifes bit & the displaying scores etc needs implementing. This is all to come but some major upgrading of my Amos development disks was called for today so that I could put the new version of Protracker in the system as this has the best tools for sound sampling and music editing yet. Even better than Octamed though the two don`t appear to be compatible. No great problem as I have never really used Octamed that much anyway. I can`t edit a lot of the old music files I have with Protracker but they can be converted if I find one ike anyway, via Amos. It`s with the sound effects that I really need this program. This is my current action plan at the moment, and I have got hold of lots of pacman-apropriate effects from using this tool, and I now have all the effects the game will need in a bank ready for use. My first step was to write a small program to fiddle with the sounds so I could find out how to use them best rather than the clumsy and time-consuming try- it-and-see method that I am used to using. The program was duly written and the pen and paper came out for making notes, and, finally, I have finished. No, the sounds are not in yet. But they will be as I now know exactlly which ones to use and where. P.S. I`ve got this really sexy computer voice to rub it in and say Game over when you blow it. It sounds great now that I`ve resampled it and adjusted the tempo etc. Pity I only use it the once. Right then, enough of the gassing, I have to put in the sounds that can go in effects for. Pacman can`t eat the monsters yet as the power pills have no effect until I get around to it. I`ll get there one day. This will be my final entry of the day as I really have to get to sleep sometime. It`s amazing just how much you can actually get done if you put your mind to it. I`ve been at it about two hours since my last entry in the diary and I have achieved an incredible amount. It might not sound much when I say what, but it is in programing terms. Just shows how much you can do if you are in the right frame of mind and things are going well. The sound effects are all implemented now, and I also have Pacman with three lives. The death routine is in complete with animation, and the pause mode and jingle bits are complete. The music I was going to use for entering a high score name is to be used for clearing the screen of dots now, so I might need to find some more for that purpose. The warp gates are in and a godsend they are to if you get trapped down the dead ends. Just stab fire man evaporates to appear at the other end. Very nice it looks to, and it doesn`t half feel good when the monsters are gobbling on empty space where you used to be. Now that the sound and these simple little bits are in the game feels 100% better already. I`m feeling good about how it will be when finished now. Once I put in the power pill bits and have Pacman gobbling monsters then it is just a matter of tuning up the inteligence (I`m going to hate that bit) and working on the dificulty bit so that it is hard but not to hard. Then I have to decide on different screens or not. The title screen is going to have to go back to Deluxe paint again because I need another option on screen and I have nowhere to put it. I want to have the number of baddies on screen selectable, and the old screen is looking clumsy now that I have put in all these options. The code is getting very big now. I will have to go other the whole thing once finished and trim it up so that the f keeping the title screen saved with the program so I don`t need to keep loading it each time the game is rerun. It looks very ameatur and I don`t think the compiler will like it much. Besides, the game needs to be all in one file ideally for ease-of-use. Expect more progress next time. Bye. Day 12: 4th June 93. -------------------- I can`t believe I was up and at it this morning at about 8:30. It`s my day off and I usually lie in. Still can`t be a bad thing. Haven`t touched the game yet, but I have redrawn the new title screen on Dpaint and put in a box on the top which will show all the options and let you highlight them & change them with the joystick, all going to plan. It means there is going to need to be some serious revision of the front end code but it has to be done as the old one is to clumsy. Due to my stubborn insistence on keeping the mid-screen box for displaying high-scores and other info, I had to put this options box at the top of the screen and the pacman logo at the bottom. It rd there but there isn`t a lot I can do about it unless I rip everything out and start from scratch. I don`t think so. Made a mental note today not to start fiddling with the front-end of any future programs until I know what options will need to be set. This has been the third time I have had to redraw the main screen and it is becoming tiresome. Oh boy, I hope I don`t think of any more options, I absolutly refuse to do another redraw. As an added bonus, I also think I`ve worked out a way to save the title screen graphics out with the main code so no more loading each time I rerun the game. A godsend let me tell you. Got to go and get a haircut now, and go watch strike it lucky being recorded at the studios later so I don`t know if I`ll actually get back to it today. Until next time. Day 13: 5th June 1993. ---------------------- Started off the day reading up on Dpaint II for the first time. All the time I`ve used it until now had been by a process of trial and error so I thought how to use it properly. And boy did I learn. I also spent a couple of hours rearranging my computer system around as I didn`t like how it was. Much arranging later and I have come to the heavy conclussion that I need a new - bigger - desk. I`ve accumalated so much equipment and disks that I don`t have the space and shelves for it all, and everything is really cluttered. Maybe when I can afford it, I`ll invest in a new desk and build some shelves. Anyway, after much fiddling with Dpaint, I have done some more work on the title screen. Ok, it still looks rubbish - like I said, graphics are not my thing - but it looks a flashy rubbish as I have been playing with differing - where I defined set ranges of colours and filled areas of the screen with this shade in pixels which goes from dark to bright in ranges of colours - and it looks quiet clever and saves hours in comparison to doing it manually. It`s very colourfull as well. Put in the nescesary alterations to the main code so that it doesn`t load from disk more and is saved as a bank. That has brought me to the conclussion that I ought to set up a seperate disk to store all the files/editors/banks and notes as a back up because the only copies I have at the moment are stored with the main program code. It is quiet big because of this but like I said I didn`t want the game to load off disk, and I have no storage space for the routines on my development disks as well. Some crunching of the whole game will be done at a later date as well, just to round the whole thing off into one - smallish - file. I hope the compiler knows what to do with banks. Oer, that never occured to me before, but I shouldn`t think there will be any problems. Now I am going back to the game to put in all the options select bits and display them based on the new designed screen. This is going to be another matter of trial and error. If I get time, then the score screen goes in as well. It`s been to long, and where is the incentive to keep playing if effort. Day 14: 6th June 1993. ---------------------- Well, in all I`ve been at it about 14 days, although not consecutively, and, as I have already mentioned, the end of the road is actually in sight. I did hope to get a lot more done yesterday, but the untimely visit by a friend put paid to that, though the options selection on the title screen is now complete and debugged. Took advantage of the untimely friends presence to get some feedback on the game so far, by letting him have a couple of goes and seeing how he fared against my computer inteligence routines. Once they locked on, the baddies got him without fail and he never did totally clear the screen, but he was getting closer each time, and he was also working out how to confuse the monsters - like I`ve known how all along - and was very slowly starting to use this to his advantage. Given enough goes he would probably have cracked it, and he is no brilliant games player - even if he nteligence routines, and I have got to improve them before I can technicaly call this game finished. As I have stayed away from any modifications to the routines recently, I have developed a new perspective on the way to do this, and come up with some new ideas as well, so I will indeed do some more work on this in the near future. Today has not been a day for coding so far. To start with I have had to work all day so the computer has not even been on till now, and it is now coming up to 12am - I suppose really that means this should be part of tomorows diary, but it is not really that important. I have been thinking with a pad of paper and a pen for the last hour or so, and have been writing down a list of routines which have to go in before the game is finished. Here we go then: 1. Computer inteligence tweaks. 2. High score name entry routine (how long have I been saying this?) 3. Animation on the game start. (I want pacman to fold into shape) I play) 5. Power pills need to be working, and enemy inteligence adapted. 6. The gobble monsters bit. 7. Map Load routine. 8. I need to write a map editor. 9. Clearing of screen animation. 10. Game over animation. That is what is needed before my task is complete, and, as you can see, some of it is going to be a lot easier than others. Okay, now for a little explanation. Point 3: the animation on game start - basically, when pacman dies, a little animation is triggered like in the arcade game, where he sort of folds in on himself before going splat. I have all the sprites for this little animation so I might as well play them in reverse to show Pacman making his grand appearance, like he does when using his warp gates. Point 7: the map load routine. As I mentioned earlier in the diary, the game had no real feel of continuity; at the moment the game just says well done when you eat all the dots and plays a little tune and then jumps back to the how to make it more fun to play, but I have now decided to have several screens stored on disk (or maybe in a bank depending on memory considerations - like I said I want to compile this later) to load in as you progress and I have to make the game get gradually harder each screen. The inteligence will have to be modified based around each new screen as well. Obviously I can`t put this part of the game in until I decide on what format the screens will be in as I have to do option 8 first, which is to write a map editor program as a seperate tool like the sound effects creator I wrote for defining the samples and their frequencies. As to how many screens the game will have. We`ll see how it goes. Maybe I`ll incorporate twenty or so, and then leave the code for the designer in with the game so that the user can also make up his own. The inclusion of multiple screens and a level designer must do a lot for a games lasting interest after all. We`ll see. parts of the game. At the moment I just have a little text message for each event, and if you cleared the level then you get a little tune, whereas if you got nailed then a sexy female computer voice says "Game over" Well, she could hardly say "Well done", eh? Okay, enough gabbing I think. It`s time to put my money where my mouth is and get on with it. Here comes the starting animation and the score screen. GUUUULLLLLLP! A definite improvement now. The score screen is in, and after much fiddling, is working fine. The speed is unchanged and I think some more can be gained when I complete the game and go through it with a toothcomb, just generaly tidying up, and modifying routines to take less memory and work more efficiently. Things are definitely coming along in leaps and bounds. The animation when the game starts is working as well, and a lot nicer it looks too. The transition between dying and restarting is a lot quicker and smoother, and it looks polished too. You could say I`m happy. `s two of the ten points I can knock off my list. I want to get the power pill bit working, but I have to improve the monster movement routine first as they have to follow different rules if they are on the defensive. They`d look a bit silly running after pacman, if he is in the eat them and gain squilions of points mode. The inteligence gets finished once and for all on the next session. I set up a seperate disk for the whole game and associated data so that I can develop it more easily. No more fiddling with which drive to use etc. Now it`s all on one disk, and I can save everything on to it when the game has finished so I have all the data away from my development disks and I can free some space on them in preperation for my next game. This seems to be quite a good idea as I can run out of space even on a three drive system, if I leave all the stuff which isn`t nescesary anymore on them. I`ve been thinking about what to display when the player has done as I`m not to hot on graphics - or perhaps a short animation, which can be turned off as an option on the title screen if the player has seen it once and doesn`t want to be bothered with it every time they play. Oh, no, not another option. Can my title screen stand all these changes. I`m also thinking along the lines of a picture of a newspaper saying Pacman defeated in surprise result when the player loses all his lives. This is not certain yet, but I am throwing the ideas around in the back of my mind while I am working on other bits. I have to put together the map editor after the computer inteligence and power pill bits as well because the game has to have some continuity for when I get a couple of friends to play-test it in the near future. There`s no beating about anymore, anyway. All the short routines to implement are in now, and it`s just the major changes to get in and functioning. Until tomorow. Day 15: 8th June 1993. ---------------------- iority today. More fiddling around with banks etc so that I can save out my sprite bank with this program for easy editing. Got the main screen up and the cursor movement in and now its just a matter of how to define what can and can`t be changed on each screen. At the moment I have no graphic to show for the warp gates so I am undecided as to wether I should make them redifinable or not. If I do then a lot more code fiddling is going to be required so that Pacman appears at the right place depending on which screen he is in. But, if I don`t then there will be quiet a limit on how editable each screen can actually be. Maybe I should think about keeping the game like its arcade counterpart, whereas you go off screen and reappear at the other side. This would make things a lot easier in the map-edit bit as it would not need to keep track of where the warp gates are in each map, I can just tell the computer to zap pacman to the other side of the screen if he goes off one ing in the warp gates and their animation in the first place will have gone to waste. Decisions, decisions. I have to work out how to store the maps as well. I could possibly stick each one in a databank, and just load each file as required, but I don`t actually know how to do this yet. Maybe I will have to write my own I/O routine similar to the ones I used to write on the c64 for the many databases I programmed. More thought on this point as well, I suspect. I really need to find a way of flashing my cursor on the map editor as it is quiet hard to see at the moment. I think I can do this with a bit of fiddling with the palette command. Find out later. I`ve decided on making sure this map-editor is nothing to flash. Just a simple way of putting some screens together, as it will only be used for this game. I might go back to it at a later date though, because I can probably modify it to be a screen designer in general, if I put in some scrolly routines etc. Should be fun. banks and I/O handling. There`s no point in me designing loadsascreens if I can`t save the bloody things out. You try doing all this when you have a major hang-over from a works night out. Have I learnt my lesson about the evil drink - I don`t think so. A little later on - about three hours - I have finally ripped apart another Amos program to get a rough idea on how to load and save to a file. At the moment my routine is simple. It just loads one map, but now that it is there I can customise it by putting up a requester asking for the map number to load/save and so on. Also into the editor is an option for a help page - usefull if I can`t remember which keys do what at a later date when I actually start to build the maps - which I still have to put in. Some standard keyboard commands for showing the default map - the one I use at the moment - and a clear screen command. At the moment these commands will only work if the apropriate key is pressed three times. This is in case of silly afer, I`ll probably have a confirmation requester that will let you save the screen or change your mind. Much more user friendly. The editor itself is not functioning yet - as I said I wanted to make sure I could load and save all my creations first - but it wont be long before I can start making some maps. I still have to decide on the warp gates bit, as well as how much can be configured. I have displayed the pacman and monster sprites on screen as well, just so the user knows where they will be at the start of each map. I have to decide wether to have these bits user-defined as well. More hassle. I think the map editor will get finished by the end of the day though I don`t know if I`ll actually get any maps designed. I must remember to have the number of dots saved out with the mapdata as well, because not every screen is going to have the same number are they? See what I mean about still needing some more thought before carrying on with the program. Back to the grind again. the map editor is now finished. A bit of thought was nescesary before finishing it, but I have now decided on ten different maps, and put in a little file selector for loading and saving each map individualy. The maps are all less than 1k in size so speedy loading is the order of the day but I am hoping to actually be able to incorporate all the maps into one bank and just lump them in with the main program. Not much point in me doing this with the editor program though, as each map can be more adaptable if kept apart from the rest. I will probably write a program later on to convert the ten maps on disk into one bank and then put it in with the game once I have got some screens I am happy with. As I said I don`t like the idea of loading of the disk, and also it might be a bit tricky to know which map the computer should be loading. Anyway, map editor done, and another one of my ten points implemented. Each day brings that compiled gane n the same thing forever. Besides it takes forever to load and update this diary now as it is such a big file. Got to do some more disk editing now, as I`ve got all sorts of dummy files and the like to sort out, since I started playing with the output files through Amos. It took quiet a few times to get the save format right, let me tell you. See you later. Just time for one more stop today as I`ve just finished work and had a few ideas to implement in the map editor. alright, so it`s not really that nescesary to have a brilliant editor that looks great etc as I`m still not certain wether I am going to have it with the game or not. If I do then I probably will have to load off disk for each screen which I don`t really want to do. Some research into storing data into the banks is called for here but I don`t know where to look. What I would do for the original Amos manual right now. Anyway, enough of that. The editor needs a few cosmetic changes d I don`t really want to be fiddling around with the joystick trying to build each screen. Some key input routines are needed to make editing quicker - I can`t be bothered to read the mouse, and the keyboard will probably be faster anyway. I have also decided to have the warp gates user-defined if it is required. If you`r going to have a map editor, then you might as well have a proper one. Okay, so I lose my snazzy animation bit for warping, but it`s not a major sacrifice, and being true to the arcade game is probably a much better idea. Now I have to decide if the monsters can follow you. I think so. Maybe also tweak their inteligence so they head for a hole if they are to far away so they can lock onto you quicker. You just know this is going to be hell to implement in code form. Still, now that I have written it down, I have got to do it because I swore to myself when I first started this diary that I would not edit bits I wrote down, just so I didn`t have to write a to it so far, and look at some of the features it`s led to, so I`ve no intention of stopping now. Back to work for the last time tonight. Okay, finally all done. Well almost. I have the editor working intuitively now. I-e it works how the user would expect it to work. The cursor now wraps around the screen if put over any edge. The keyboard can be used instead of the joystick (much easier) and the computer works out the pill data and saves it out with the map data. The whole thing is running very well now, and I am more than happy with it. Just one more option to put in next time - I put in an advance square bit every time you select an icon and I want to have this part optional as I seem to find editing easier without this mode on but others might not. Like I pointed out earlier: the editor has to function how I want it because I will be using it a lot for a while. Spent a while on tidying up the display in general and getting rid of surplus lines I even stuck it through the compiler just to see if the thing could handle the conversion of banks. No problems there, even if I did run out of disk space. When I do get the game running properly off one file and compiled, I think it is going to be one big file. I shall have to use the compilers cruncher when I do it, or use powerpacker. I suppose anything I code will be like this while I am using Amos, as it has to have a lot of system data saved with the games code itself. When I finally get to grips with assembly language on the Amiga - it is nothing like the c64 6510 machine code which I did get the hang off - then I will have much shorter programs, until then I will have to grin and bear it. Anyhow, all is now on for the next session, where I will put in the routines for travelling through a warp-gate (ie: moving off screen), letting the baddies do the same, loading screens each time one is completed, and hopefully, once the modifications are implemented, the powerpills are going g more than give you ten points. We shall see. I also want to change the clearbox routine used on the title screen. Amos has some clever scroll commands for moving certain bits of the screen around, and I want to learn how to use them. What better way to learn, than to scroll each page of info off screen when the next is going to be shown. I can not wait to try it out. It has to look better than the crummy routine I have now which I thought was oh so clever, but in reality looks slow and clumsy, and makes it look like the computer can not cope with everything it is doing. I just can not leave it like that. Time to sleep as I have to work first thing in the morning. Day 16: 9th June 1993. ---------------------- Went out for some beer today, so there was nearly no work done at all. I loaded up after coming back from the pub with the intention of designing some maps with the editor I spent so much time on yesterday. Kept looking at my little list though and thinking how my time could be spent more constructive means. I got the guilt syndrome and finally wrote the routine to enter a high score name and spent over an hour getting the data to move around properly. The game now has a definite feel to it, now that the three lives and the end of game routines are complete and working properly. Alright so it probably isn`t the most important thing to be done, it had to be put in eventually, and I just decided on now rather than later. The code looks a little sloppy, but then so does the rest of the game, but it all functions well enough, and when I am finished I will rip through the whole lot, just generally tidying up and saving up some memory. The program will be easier to edit as well if there aren`t so many lines, and the complete routines are folded up and forgotten about. Anyway, that`s another of my implementations crossed off the list and to briefly summarise, here`s what we have left. 1. The computer inteligence. 5. Power pill routines. To play background noise and alter enemy paths. outines. All part of number 5. 7. Map save/load routine. I have to design the screens first and decide wether to keep the data in memory or not. 9. End of level animation or similar. Not sure what to do here yet. This part will probably go in last. 10. Game over bit. You could say this is finished now that I have the lives in and the high score entry etc, all looking polished. I think I will probably get the map decisions sorted out and get it working with different screens tomorow so that the game loop is all there, and then I can worry about the tuning up afterwards. I`ll make the game load of disk for now, and then decide later if I want to have all the data in memory. I`ll keep the editor with the main program if I can shorten it all up so that it isn`t so memory intensive like it is at the moment. I`ll have the screens I design as defaults and have an option to use the custom ten screens in game if the player so desires. This should make the game appeal want to use the screen designer. Things are going quiet well at the moment, and I am optomistic about a near completion. Still not quiet confident enough to name the day though yet. We`ll see how it goes with the inteligence bits later on, though I am damned if I am going to let that hold me up now. I have several ideas already on how to improve it. Day 17: 10th June 1993. ----------------------- Not a day for getting much work done, I`m afraid. Loaded up briefly earlier on for a look over the game again, this time from a gamesplayers eyes rather than a programer. It`s alright looking over the game with an eye to improving little bits that aren`t working quiet the way you want them to but that doesn`t nescesarily make the game more appealing to the person with a joystick in their hand trying to play the thing and not caring one iota if you have used clever programing tricks to gain a second of speed or not. This game has so far just been used as a programming exersize rather than an of the best arcade games ever created. Now that I am almost through with the programming, I have to go over the game - by playing it over and over again - to make sure it has the right feel and that the person playing it is going to feel happy with it. The overall sense of opinion so far is that there is definite room for improvement. Most of which I have already set out for some major rewriting, but some more making notes is needed on just which parts to adjust and deciding what else needs to be done. I have got the whole game hanging together quiet well at the moment, and having the extra screens in and running will no doubt help, but to make it as close to the original as I would like, there has to be more done. As an example, the sprite editor is going to be needed again, as Pacman really has to be animated. It`s just not good enough to have one definition for each way the main character is moving. I want him to open his mouth like his for there. The screen draw routine will need some fiddling as well, to make it faster if possible, as games players are alike in that they all hate annoying delays between goes. The list is - in theory - endless, and I think I am going to have writers cramp by the end of it. It all has to get done, though, as there is no point spending so much time writing a game which people might not like to play because of silly things which could have been ironed out with a little more thought. I hope to get a few friends to test the game out at a later date, just to make sure I have got it right, while I sit there with a notebook and take all the critiscism and comments, no matter how bad. If it`s valid then I don`t care how negative it is, I intend to do my hardest to fix it. I suspect this is where a lot of game programmers go wrong and I have no intention of following in their shoes. Most software houses employ about ten people just to test games and give opinions to the programmers make a living as everyone who has ever played a game must have had something they didn`t like about it and would love to have a chance to air their views. Difference is: I won`t have to pay my mates to test this one out. They`ll do it just to get a chance to play on my computer, and to have their name in lights if I credit them on the title screen. Moral statement of the day over, now it`s back to the game with pen and paper in hand. Day 18: 11th June 1993. ----------------------- Back with a vengance today. Started off by getting the load screen routines in and looping it all together so that the game is basically all in and the refinements can be made and tested fully. Put in another option on the title screen to let you choose between two sets of screens. One is the set that comes with the game, and the other is the custom screens which can be edited with the map-editor. I`ve updated the map editor - now in version 2.0 - so that any 1 of the twenty screens can be loaded, edited, and resaved, although editor will be adapted if I put it into the game, so that only the custom screens can be fiddled with. I have to have access to all of the screens at the moment though, because I have yet to design them. My strange set of priorities seemed to indicate that the putting together of the actual main game loop so that it is playable in its current form seemed to be more important. Now it is all in although a lot of refinements are needed to some of the routines just for tidying and smoothing out. The end of screen bit just shows a little message and waits for fire to be pressed before loading the next map and upping the skill level if the player has gone through all ten screens. I`m sure I can do something more interesting when I come back to this bit later on. The game design is certainly going a lot better now than before. Having set objectives certainly helps in the progress department although the programming is not getting any easier. Due to the way I have which can be tidied up and smoothed out etc. Before I go any further I hope to go through the entire code and tidy up as well as shorten, so that I have space for the editor in game at the same time. I know I should really do this at the end, but tidying up now can do no harm and will make it easier to edit and build upon what I have done so far. Also next on the agenda is to design some more screens. At the moment I have twenty on disk, all exactly the same, so the game is pretty boring at the moment, and no changes are apparent when the screen is cleared. I have to make a decision between slow screen drawing and smooth sprite movement or fast drawing and flickery sprites. Not much of a choice really, because without the double buffer command, the game plays terribly. A much nescesary sacrifice, I think. I am also trying to look into ways of loading all ten of whichever set of screens are nescesary just once when the game first loads, as I have already mentioned, I want to avoid going to disk if ible. More fiddling with banks coming up later. The inclusion of more screens will let me analyse the computer inteligence routine in more detail as well which can only help when I rewrite it to play properly. It seems as fast as I write the bits I need, I am coming up with new bits that are needed. I will eventually finish, it`s just that some days I feel closer to the end than others. I have now decided that I am unhappy with the options selection on the title screen and want to do something to make it feel better. Another rewrite of the display and input routines needed once I come up with a better system. Oh boy, I hope the work I have put into this is eventually apreciated. Had a friend playtesting for me again today. The last time I let him lose on the game was a couple of weeks ago, when it was in a much shallower form, and he discovered a few bugs with the warp gate routines which I had not noticed almost immediatly. I was pretty sure that he would not find any d the warp bit even though it is to be taked out and changed shortly - and hadn`t spotted a bug for ages. Needless to say he found one - the pacman was clearing the screen and nothing was happening due to a variable being repeated that i hadn`t spotted. I`ve now fixed that to, and have definetly decided I like the idea of other people playtesting my code, as they always find things wrong that you miss. I am letting him loose again tomorow, and I want to get some input on how he thinks it should be improved. Final note of the day is about the title screen music. I have just realised - after 14 days of having it running in the background of my game - that it is not True-Faith by New Order. It is Blue Monday by U2 and I am currently feeling like a right dickhead. Some programmer, huh. Doesn`t even know what music he is using. I might write my own tune for the game as well. I have a high score table piece at the moment, but I am thinking of using ing track instead. Should be interesting, as I have already said, I am not very good at transcribing music from my head into Protracker. Day 19: 13th June 1993. ----------------------- Had a major strip today (oeerrr, misus) and shortened the code a bit. Also did a little tidying up and rearanging so that the bits of code I still need to work on are placed at the end of the listing so that I can get to them quickly. Still a lot more work to be done in that department but I can`t really get into it as I have to put in the rest first. Looking over my list of bits to implement, I decided that the power pills and gobble baddies bits would have to wait until I got the baddies working properly. That left just the end of level animation that I could have done if I was feeling really creative, but I decided to stop dawdling, and with a heavy heart I started once again on the enemy inteligence bits. God, I wish I hadn`t. This has now become the most major stumbling block in the entire saga and it is really down. I just cannot proceed any further without it working better than it is, and I am really trying to knuckle down and get it up and running. Needless to say I still haven`t succeded and I am to stuborn to give in and settle for what I already have. Back to square one next session, and yet another rewrite. Not happy. Anyway, on a happier note, I got Desert strike yesterday and it is brilliant. That`s one reason why I didn`t do any programing yesterday. By the way can anyone lend me twenty bucks as there is a great book on Amos on sale in my local bookshop. No. Oh,well,maybe I can sell this game to someone. Can you see it: For sale. Pacmans return. Sorry no baddies but the game is priced at budget level to reflect this. Offers to etc, etc, etc. Must be a market out there somewhere. Still, I doubt if the book would be any help to my current project and I can always buy it with next weeks wages. Patience is not my strong point. Day 20: 16th June 1993. ----------------------- ay from the game, call it my days off. Did another major attempt at the inteligence on the 14th but failed yet again, so I decided that it wasn`t worth mentioning. Yesterday I spent all day Go-kart racing up in Reading with some workmates, and all evening in bed with a severe case of sunburn. I wouldn`t have minded but I didn`t win the racing. Would you believe I came second in three out of four of my qualifying races, and I stacked the bloody cart on a tight corner in another race and did not finish. That left me one point short of qualifying in the semifinals. I was gutted. I don`t think I did my car tyres much good either, when I took my Capri in excess of 100mph down the M4. I hope to do better next time, anyway. Enough of that, what about Pacman. Well, most of this morning and early afternoon has been spent on research. Research? you may ask. Well, since I can`t get the right routine myself, I am digging up various Amos programs and also reading the old books of computer listings, trying to find f a similar nature, to see how they overcame the problems of computer inteligence. I`ve spent about an hour editing and reprinting a text file from Amiga-computing covering about a years worth of their Amos column and the entire breakdown of their version of Pacman to see how they did it, and I am hoping to have a proper dig through that later on before having another crack at it. Also on the positive front, I think I have found a way of getting the maps into memory with the main game. I`ll have the twenty maps loaded with the game, and the option to load the custom ten from disk which had been previously saved with the editor part of the program. I am going to have that as part of the game for definite now. Of course I will have to alter it so that you don`t get to edit the main screens as well, else it will mean reloading the entire game if you mess them up. That way the editor usage is just optional, because not everyone is going to want to use it, are they? Now is the time for some reading. g by in the middle of programing to write this short bit. The inteligence is almost working. Incredible but true. I am finally getting somewhere. I am currently working it by these two simple rules which seem to be the same rules everyone else uses. Well, why should I change a tried and tested formula. If pacman is above monster then move baddie up else go down If pacman is left of ghost then move baddie left else go right It seems to be working although there are a few glitches I have to fix and polish up before I can call it finished. At the moment the baddies are sometimes cheating by moving diagonally through walls. Expect some real progress when I next make an entry. Later. ------ Alright, I lied. I`m not quiet there yet. Been working on it for a fair bit of the afternoon, but it is still not hanging together. Some more thought on it while I am away from the computer will probably help again. Also took a while to put in a test mode into the game. What`s that? It`s basically a ther one or zero at the begining of the listing so that if I am testing it will bypass a lot of stuff - such as the title screen and music, as well as loading up a screen from memory straight up instead of loading and drawing from disk which is so slow and irritating when you are trying new routines and want them up and running quickly. Finally got this up and running - after much fiddling - because as I am now spending so much time getting the baddies working properly, I need the program running quickly so more time is thinking rather than waiting. I did a little more tidying up today as well. That`s it. Day 21: 21st June 1993. ----------------------- I think I`ve lost a day here somewhere. I could have sworn a wrote a little entry after the 16th just to say that I was going to get away from the Amuga for a couple of days and rethink the whole thing through, but it seems to have dissapeared. I`ll bet I tried to save this text to Df1:, which is a bad for some stupid reason. Anyway, for a couple of days (four to be exact) I have left the code totally alone, and have been plotting and planning in my head instead. The problems I have been having with the computer inteligence parts of the game are probably quiet common, and I have undoubtedly been tackling them in the wrong way. Any game which has you against an enemy (about 99% of them, I should think) should be approached with a clear set of rules that define how the opponent should play, and its actions in relation to your own. This has probably been my most major mistake in the whole exercize. Impatient as ever, I was cocky enough to think I could just jump straight into the code and knock in a routine of the top of my head. Brave thoughts indeed, and I was probably doomed before I even started; nobody is that good. I bet the professionals don`t even do it this way. Suffice to say that a valuable lesson has been learnt here, and I have most certainly not given up, despite nearly a weeks abscence. simple rules I came up with in an early part of the diary were a definite step in the right direction, but their format is one I am not happy with. It can hardly be called artificial inteligence, can it? And this is what the last few days away from the keyboard have been all about. I have been looking upon this from a totally new outlook and have come up with the following idea. If I was to put myself mentally into the enemy ghosts shoes, how would I track down the pacman. Simple really. I`d nip off in any direction I could go in, changing my direction whenever I encountered a wall, like the ghosts do so far, but then, and this is the "big then", each time I got into a square with multiple directions leading off, I would stop, look in each direction, as far as the nearest wall, and, if I spotted the little yellow bleeder, I`d rush down that way after him. Of course if I didn`t spot him, then I would probably just roll a mental dice in my head (a random number an even number I`d go in the new direction, else I`d just carry on whichever way I was going, and hope to spot him at the next junction. I`d be very unlikely to back-track, so I will probably make sure the ghosts couldn`t do that. Then, problem solved. The baddies would always be moving, and they would be about as inteligent as a human (well, me at least) would be if forced into the same circumstances. Although ideal in its present form, this idea has yet to be coded, and another aspect has yet to be considered. The last thing on the ghosties mind when pacman has just swollowed a power-pill, would be to hunt him. A better idea, for them at least, would be to be going in the opposite direction as far as they can run with no feet. Okay, so the routine for pacman eating the powerpills is not fully coded yet, but it is going to go in sometime, so some sort of addition to the inteligence to take this into account should go in while the routine is being written. A major reshuffle lled for here, as it is time to implement some sort of data-structure and organisation into the routine before it goes hopelessly out of control - which it has done several times so far - and I lose track of what anything does. The format for this I have written below. Ghost (gh,x,y,b,st) Alright it doesn`t look much, but let me explain. Ghost is tha variable name, and gh is the number of the ghost (1-3 so far, although I am thinking about bringing number four back for the show). X and Y are the x and y positions of the ghost on screen. Surprising, huh? B would be the ghosts bearing (1=up,2=down etc), ie the direction it is currently moving in. ST would be its current status. In other words: 1=chasing Pacman, 2=Run like hell `cause Pacman just ate an acid tablet. (yes, it`s true. Pacman is a junkie.) Of course, when I write the routine - as I am shortly going to atempt to do - some of this might be changed just a little. I`m thinking along this ough when I am programming, nothing ever goes to plan, so the whole thing might need to be totally different in order to work. We shall see. Later. ------ Not much luck here. Rewrote the routines to check each direction up to the nearest wall, and lock onto that way if Pacman is spotted but they don`t work too well. At the moment the ghosts see pacman if he isn`t there, and run off in a different direction all together. To make matters worse, if the ghosts stop moving which my routine allows at the moment, then the bloody game slows down to a snails pace. Most annoying. I still have quiet a way to go with this part of the game. So what`s new? I remember writing down my first few lines of text into this diary what seems like a long time ago: I couldn`t ask for an easier introduction into Amos. Famous last words and I am definitly biting my tongue. Maybe I should have chosen a better subject for a game, after all. I always thought programming a good game was adding ng days writing a part which you can`t do without, and is just not coming together. Until next time. Day 22: June 22nd 1993. ----------------------- Well I came back again today, and lost the fight, as is becoming usual. But having said this, all is not lost. I rethought the ghost movement routine yet again - I think I must have used almost every trick in the book by now - and came up with a shorter routine using the dreaded if-then and else conditions, and repeats. I can think of this as a breakthrough in a way, even though the routine doesn`t work yet, because the way I have used them is right, and for the first time, I have actually got to grip with how they work. Let me explain for those of you who are confused: Take the following Amos code. Input "What is your name?";N$ If n$="Tony" Then Print "The boss": Goto END Print "Hi there ";N$ END: Stop Now use the if then else structure. Input "What is your name?";N$ If N$="Tony" Print "The boss" Else Print "Hi there ";N$ End If Stop crude example, but that`s the best I could do off the top of my head without getting to techy. It doesn`t save much space or make the program look really neater, but you can probably get the idea of how many labels you can save on, and how much neater and organised a program could be if this method was employed all the way through. This will have to be done to all my code once the game is finished anyway, as I`ll probably save a whole heap of space, and be able to decither the whole thing if I look at it again, after being away for a few months. I`ve done some more fiddling with the testing mode now. Remember how I said that I have a variable called test set when the game first runs, and if it is one then the game is in playtest mode, so a lot of the unescesary stuff should be bypassed. Well I`ve built a bit on that today, by adapting the code so that the score is no longer shown etc - I`m hardly interested when I am trying to debug the game - and other info is shown instead, like n and friends etc as well as other stuff to show results of the inteligence routine as I adapt it. Hopefully this will aid me in my debugging. It looks bad at the moment with the ghost movement routines not going anywhere, but I am still in there fighting. If nothing else, I`ve learnt a lot more about Amos and artificial inteligence since starting it, and I am not going to give up so easily. It`s going to be back to paper time again, after finishing todays diary, and hopefully with the new stuff I have learnt I can throw away my last piece of paper with the old routine on it that looks nothing like what I have now, and file away a working one in my development file instead. Having said that, I`ll probably frame it, if I can pull it off. Oh,yes, did I mention my development file? It`s great idea of the day time again. I have put all my notes into their own section of my computer file, along with other associated articles and routines, which is my pacman ut and put that in there as well as a copy of this diary, so I can look over all this again, and wonder why I bloody bothered. Just kidding. It will be good to look back on it though; especially when I am writing other games by then, and avoiding all the mistakes that I made with writing this one. Anyway, on a slightly more optomistic note. Bye,bye.... Day 23: June 23rd 1993. ----------------------- Another day of intensive thought. Been thinking along the lines of resetting all the ghost movement routines to move via a complex data structure. And all because the ghosties loved to chase pacman. This is going to be a lot of fun. Not !!! Day 24: June 24th 1993. ----------------------- Looking at this diary and recapping over the last couple of weeks, I`ve come to the conclussion that this inteligence routine has got to be the hardest piece of code I have ever tried to write. Well, it speaks for itself really. Can you imagine how senile I would be right now if I had been trying stead of a nice user-friendly language like Amos. I`d have no hair, and my ashtry would be overflowing into next doors garden. Seriously though, when I finally get it there - and despite my constant bickering, I am much closer now - I`ll probably be celebrating into next year. In a way I am glad it has taken so long because I have learnt so much about structured programing and short cuts etc that anything I write in the future is going to be much better than the basic sort of games I used to write on my old Vic-20 and C64 which had very nice title screens etc but you would only play them once or twice as they had no real drive or clever computer inteligence etc. I never used to be able to write a game that would be just the right sort of challenge. They used to end up looking like demo`s which I ended up doing most of the time instead as they were easier to write and didn`t take much design work which I never had the patience for. Looking at myself critically, I have now realised that I never had ce when programing at all. This is why I used to end up with so many unfinished projects. I would lose interest as soon as I hit a stumbling block and go onto something else, and I would almost never write anything on paper before jumping into the programing. This is why most of the games and programs I did actually finish looked either like blocks of code just put together, or flashy title screens with the game put in as just an afterthought. I have decided to rewrite the one game I did do sucesfully on the Vic-20 onto the Amiga after I have finished this, as this was - to me at least - rather good. I wrote it off the top off my head back then - it must be about eight years ago now - and it had no real programing problems as the whole game was made of easy to write subroutines. I`ll enhance it for the Amiga of course; who wants Vic-20 style graphics now. This said it`s time to look at Pacman again. I have rewritten the enemy inteligence to use a complex data ly shorten the main routine to a readable amount which will aid me in debugging and adding to it a little later when I need to make the ghosts run away from you. The thing uses all sorts of if-then jumps like I wrote about a couple of days ago, and when I have done some more debugging, will be the method I eventually use. It seems to work well in theory, although the version I have keyed in at the moment does not run according to plan. I have so many notes on this subject now, that I am just going to bear with it and keep changing as nescesary until it is finally right. I`ve just about had enough of all these re-writes. To explain this code in simple words: I have made pacman look in each direction when he is ready to move again - ie: his animation phase is over and he has matched his block pixel movement - and mark down if he can move in any of the directions. Tomorow I will change the whole routine a little bit so that he only looks to the left and right of the way he is facing, as I can`t have ackwards and forwards all the time, unless Pacman is behind him of course. He won`t always change direction, if he can move either way though because that wouldn`t nescesarily happen in reality, would it? This might sound a little techy now, but basically he`ll turn round if he hits a wall, spots pacman in another part of the maze - ie: the x and y cordinates match and there is no walls between them, so that the ghost would see him in reality (nothing like being true to life) - or just turn if their is a blank floor to his left or right, and he feels like doing so. This should make the whole thing work smoothly, and in theory the ghost should follow pacman even if he moves out of the ghosts sight, as he locked onto pacmans last position and is going that way himself. Of course you could avoid him, but you`d need two changes of direction in rapid succesion without him seeing which way you headed the second time to get away with it. Not forgetting that there are and you have to avoid them seeing you as well. The routine for looking in each direction is rather clever, if I do say so myself (and I do) - as it is one routine to look all four ways until it sees a wall, and change the ghosts direction if it matches cordinates with pacman before the wall is encountered (in other words it see`s you). It does this by looking at the mapdata arrays in block increments decided by a bearing data structure. How the hell do I explain that one. X Y 0 -1 that is for up. X Y -1 0 that is for left. Are we learning yet? Thought not. Let`s try and make it a bit clearer. X=Bearing(1,0):Y=Bearing(1,1) if x = 0 and y=-1 then it is looking at the block x position the same as ghosties and the block y position the same as ghosty -1 Ie the square above his current position. Sorry if you are still confused, but just because I am a programer, doesn`t mean I`m a teacher. For the educated, this means I am able to search in all four check each way. As I said I am going to change it to three ways tomorow to make the ghosts move better, and not so clockwork. At the moment - for the interested - they are just going over the same four squares clockwise. Even if pacman is within sight of them. I think the problem is with my routine rather than the way it is designed, so I hopefully should sort that little glitch out as well. On a lighter note, I was tempted to put in another sprite today and use it to show pacman pokeing his tongue at the ghosts each time they go past him. This is silly really but I just thought it would be a reminder to myself to sort the inteligence out. Who says programers are all serious guys, huh? Maybe I`ll do it anyway in the game. I have to have the fire button do something, so this could do. And of course the baddies would go mad and double their speed until you pressed it again. Probably make it give you double points for each dot gained while the ghosts are in I-am-a-pissed-off- The idea was just a joke. Wasn`t it? See you in the next thrilling instalment. Hopefully with some clever ghosties. Sounds like a new cereal, doesn`t it? Day 25: June 27th 1993. ----------------------- Alright, so I took another couple of days off. Justified, because, as usual, the game was in the back of my mind nearly all the time as I tried to think out some more routines. Bit of a waste really as nothing else is to be done until the ghosts move as they should. Well move how I think they should; after all real ghosts would walk through walls wouldn`t they. I`m writing this text before actually doing anything else with the game so the movement routines haven`t actually been adapted yet. But I`m going to in a minute. Honest. Spent all day yesterday running around a wood like G.I Joe, playing paintball. Great fun, but very expensive on the wallet for Ammo. I must have used more shots than Arnie in Terminator II. Spent about 60 quid in total, multiple bruises from the enemy. Did quiet well though, although some of my actions could only be called suicidal. I wondered at the begining why everyone let me lead the team into the woods. It turned out I was bait, as the enemy snipers would logically shoot at me first. I did some brilliant dives and acrobatic feats I didn`t know I was capable of, though. Many an enemy soldier was shot by a brave and foolhardy charge by myself into their teritory. I even got through some multiple barrages to pick off men without being shot at all. Most of the time, I got about five pellets in me, though. Anyway, back to our story. Although I am thinking of trying to emulate the feeling of playing paintball into the computer somehow. I don`t think anyone could get it quite the same. Back shortly, after I`ve adapted the ghost moving routine. Later ----- Nothing much to add,really. Had another terrible day. Ripped out the whole routine again and again. This game is really getting to me now. Came close le disk, diary and all. Decided that it is probably in my best interest to stay away from the code for tonight. I don`t quiet know what to do now. I`ve thought and mapped the whole thing onto paper too many times to mention, and I can`t get the thing hanging together. Every single different way I have tried to program around the problem has got me nowhere. Sooner or later it`s going to drive me totally up the wall. I need some severe inspiration but I don`t know where I am going to get it. Day 26: June 28th 1993. ----------------------- I was going to start today`s installment of the diary by saying something along the lines of "Here we go for another atempt which will probably fail at sorting out the ghost movement", but that would be despondent. The only way to aproach this problem is with a positive atitude, so that is what I intend to do. If I still can`t get it right, then I`ll just keep trying to do it again, until I do. There`s no point in just forgetting about it, or ent is essential to the gameplay, and the project is undoubtedly a failure otherwise. Anything else approached in the future is likely to need the same sort of thing so I have to get it right now so that I can repeat it in future. Who wants disks full of unfinished, or poorly programmed games? I only have a short time to work today so I`ll just work on the ghost movement routine alone. Hell, I haven`t worked on anything else for the last couple of weeks anyway, apart from the programmers test mode which will not be in the final game anyway. Who is going to be interested in knowing things like the x and y positions of pacman etc anyway? Just recently I have been writing routines for the game with an objective of saving memory by making them as short as possible, which could be where I am going wrong here. If I just wack in a great chunk of code to do the whole thing properly, and then adapt it afterwards then I might have better results. The program is going to be stripped down in a major way when nished writing it anyway. And, hopefully, it will be compiled and crunched when done so that the whole code is in one smallish file at the end. Obviously some work will have to be done on the way screens are stored, but I am taking this into account, and I have a way of storing all the info into a bank with the main program, although I am not going to program it in until I have the ghost movement up and running first. As I said, I want to have the map editor in with the game, so some severe code shortening will be called for, as well as a clever data storing routine so that map data will not use up so much room. I will probably have my work cut out in this department to. Right, enough of the diary, and on with the programing. Not even half an hour later and I`m back. I`ll bet you are expecting me to say that things are not working out. Hah, fooled you. Things are now looking very good. I wish I had more time to carry on further but I have to sk. Well, I had been having problems with the map search routine - you know, the bit that let the ghosts check each direction up to the nearest wall and see if pacman is there. Well, no more problems; this bit is working great now, and the ghosts no longer move through walls etc and stop the program with all sorts of out of range errors and the like. Now it is the routine to make them move about at random while they are not after you. This bit should take a bit of work as well, as I don`t want them to just keep going over the same old ground if the player keeps out of their way. These guys have to go out and look for you, and this bit of inteligence is what I am going to implement next. By the way, I was right about the longer code to get the job done properly. It is quiet a bit longer than the old search routine which was very economical, but didn`t work properly. I`ll try to convert it later when the rest is in and working. I`ve also put some remark lines in to myself so t`s amazing how much I forget when I don`t do anything with the game for a couple of days. Back again. Not much luck, and I haven`t got the time to fiddle to any real extent. I think I am finally close though. Can you wait for the next gripping installment? Probably. I should think you are reading this much faster than I wrote it. Next time? Perhaps. Day 27: June 29th 1993. ----------------------- Right then, do you want the good news, the good news, or the bad news? Good news? Ok, then, there is no bad news. What does this mean? I hear you ask. Well, this persistent fellow has finally cracked it. Ghosties everywhere and all after your blood. I`ve been on it for about three hours on todays session, and finally, after the usual frustration, the code came together. A little tweaking is still needed. The ghosts aren`t quiet inteligent enough yet. But this is not a major hardship - or another two weeks of my grumbling - as I know exactly how to do it. Needless to say The ghosts now go straight spot you, and they will actively search the maze for you if you are cunningly avoiding them, and what`s more - and this is the best bit, they won`t stop moving. Not like they used to and slowing the whole game down for some stupid reason. The final working routine is not quiet as large as I feared, and a lot of reworking can be done to shorten it which I will do as soon as I have improved the inteligence just a little more. I also found another couple of bugs with the pacman joystick reading routine which I never noticed before and have now put right. The little chap could move through walls if he was moved diagonally, even though he did not stay in them. I`ve also improved the movement of pacman so he follows the joystick direction instinctively. Don`t worry if you don`t get what I mean. It`s probably something you`d never notice when playing the game, unless it was not there, and it is just usefull to the players with non-micro-switched tioned if they can`t tell. A bad explanation maybe, but it doesn`t really need to be harped on about, and it works extremely well. I was going to stop for now and leave the reworking until later, but I have the bug now - I`m glad the game doesn`t though - and I am itching to wrap this bit up. Now that the inteligence is nearly finished, I am now starting to think ahead, and plan the rest of the game that has to be written. The powerpills come next - Shouldn`t be to hard as I`ve based most of my routines around them already. Afterwards, the tidying up, some play testing, removing all the excess code that`s got in somehow and no longer needed, putting the whole thing back together again - I`ve disabled all sorts of stuff and put in loads of bypass flags for test modes etc - and then the map-data etc has to be stuck with the code along with the editor and made into a single file. After this, the final debugging and getting some more people to test it, before I can finally call the thing finished. ny more hitches ahead now, so the game could probably be set a deadline. I`m going to aim for late tomorow - that is without the extensive testing - as I`m that confident (don`t forget that a lot of the nescesary code was being written while I was stumped by the Ghost routines) but it probably will not be quiet that soon. Ok, then. Back to work. Later ----- After a lot more work, I have become a very happy man. The computers method of moving the ghost now works fine. A bit of random movement was called for and a little tweaking of the directions so that the ghosts don`t stay in the same area of the screen all the time. The whole thing works great now, and I am very happy with it. Now I can forget about it and concentrate on the rest of the game. I put in a little cheat mode for myself so I could test everything properly, and it all seemed fine. I have now come to the end of my longest session on this game at any one time, and I am well chuffed at what I have achieved. Not only did I get and running, but I also put in the routine to activate the power pills as well. When Pacman eats one of them the monsters flash, and a subtle noise plays in the background so that you know it`s monster munch time. The monsters, when gobbled, change into a points indicator briefly before being zappped back to their base, and Pacman gets a short reprieve. All the sound effects and animation routines for this part of the code have been implemented as well, and, just to round it off, I tweaked the Ghost movement routines to get the Ghosts staying well out of Pacmans way if he has taken a power-pill charge. It`s amazing how easily I did this now that I know what I am doing. A very constructive day. Tomorow I want to recode the map routine so that they are all in memory with the program, then I can rip out the test mode - my main reason for this was so that I didn`t need to load from disk each time I ran the program - and put the map editor in with the game. I am ough the ones I have now are adequate for their purpose. No progress on the music front however, so I think I`ll probably leave this as it is. I am going to have to rework all the scoring so that the player gets rewarded well enough for his efforts. Ten points for guzzling a Ghosty hardly makes it worth the effort, does it? Some time soon, I have to hit the map editor so that I can set up some new screens. At the moment I still only use the default, as I have been to lazy up `till now to bother drawing any more. I have made the Ghost routine work around any sort of screen so I can probably come up with some really freaky designs. Also needed is the warp routine rewrite. I want to have gaps anywhere I like, so the old method which lets you warp in just one place will have to go. It`s a shame really as I was well proud of the routine I wrote for that. A better screen for when you clear a level is probably called for, as well as a flashy screen fade. I can fade out the palette perhaps. We`ll see ll probably start the rewrite as well, if all goes according to plan. Maybe even shove it through the compiler if I get that far. Until next instalment. Day 28: June 30th 1993. ----------------------- First thing this afternoon was writing a small program to read all the map data for each screen into memory and store it into bank 2. The code for this is now written and I am running it in the background while I write this. Once I save the bank, I can load it back into the main program where it will stay with the rest of my data. The problem now is going to be adapting the game code to use this and ripping out all the load data routines. Hopefully this improvement will speed up the transition period between screens. Just have to wait for the program to finish now. You wouldn`t believe how long it takes to read in each bit of data and store it, even though the bank is only 4320 bytes long. Back again. Not much luck as yet. This is much more difficult than I originally thought. Amos has just choked on the conversion process and has crashed. Most frustrating. I`ll have to look over the routine again and get it right. What a pain. Alright. All running smoothly now. Got the map converter program set up correctly, and now I can just forget about it until I design the new screens. I never realised how much development and other utilities I would need to write just to get this game running the way I want it to. When I finish editing the main game to use the new map format, I am going to have to go over my development disk again, and get rid of more unescesary stuff so I have room to store all the files. Later ----- Right,that`s the space on the disk sorted out. Had to get rid of some of Amos` extensions that I wasn`t using so that I had room. The game will be compiled from my development disks rather than the source disk anyway, so the compiler wasn`t nescesary at the moment, and I made a bit more space. When the code is compiled, I`ll just have that on one disk - self booting - and keep all the banks on it as well, so they can be accessed from Amos. The diary will probably stay on their as well as a program to read it. Done a lot more fiddling to finally get the screen map data sorted out before it was finally working. Had to compromise a little bit and load in the data at the start of the game as Amos doesn`t like the user playing with banks unless they are reserved first, and once I do that all the data is cleared. Catch 22. So a brief pause when the game is first run is the only catch, and it only happens when it is first run. I`m still looking into ways around this. Spent the last couple of hours working through the program and sorting out lots of those little problems which you notice when you are writing the game but can`t be bothered to change as you are doing something else. Did a little reworking of some of the code in a view to shortening the whole lot eventually. The game works closer to the arcade version now, in that the ghosts can only be eaten once on each pill rather than letting Pacman gobble over and over until the pill wears out. Not quiet there yet as the routine just works out if you have eaten three monsters, not which ones. So the Pacman could pick on the same one if he feels like it. Have to change that next time. Also got the scoring working a little better and updated the options and high scores screen so that I have some space to put in whatever else I am going to need. The arcade movement will have to go back in (god knows why I took it out in the first place) and maybe I should put in the Thick & Smart mode again. I think I can adapt the inteligence for this little tweak. I`ll just tell it to ignore pacman if it sees him in front of a wall and play the random search way. What a waste. I spend two weeks recoding and recoding the search part, and the amatuer games players won`t even use it. Such is a games writers life. It makes my mind boggle some times about just how smart some games are actually programmed, and nobody notices it. Not that this is brilliant, by any means. It came together more by persistence than anything else. The final tweak of the day was for the skill level, which was letting the ghosts move faster depending on the level, but not Pacman, leaving the player totally helpless if they spotted him. Then again they spot him pretty quickly now anyway, thanks to the clever random search routine which I am so proud off. This has just got to be used again. Maybe a sequel. I don`t think so. Now that development is coming to a close - just a lot of touching up and some screen designs to go now - I am starting to think on future projects. I have lots of ideas in mind, including adapting one of my old games from Amigabasic - remember that bitch - which I have already started, as well as the one I mentioned earlier on in the diary. When I finish this, I will have to decide which one to do and not get sidetracked as I nearly did with this one, and start coding two at the same time. A bad idea, as none of them ever get finished, I guarantee it. We`ll see. I don`t know if I`ll be doing anymore later today - if I don`t then I have failed my deadline - but for now I`m taking a little rest as I`ve decided I definitely deserve it. I`m hoping to get some playtesting done on this later on if possible. By the way, remember what I said about wanting to emulate the feel of playing Paintball in a computer? Well, I thought it couldn`t be done - certainly not by me anyway, but someone has proved me wrong. I`ve just played a demo of Cannon Fodder by Sensible software, and it`s brilliant. Try it and see. I love it, and can`t wait for the full game. Even later still. And counting. ------------------------------- Phew, I haven`t used my computer for hardly anything else all day. I nearly lost all my game code just now, when Amos decided it wanted to do funny things to screens etc, and everything was going haywire. I`ll have to look into the memory side of things, as I had no other tasks running, and usualy the diary is in memory as well, so I can`t think what was going wrong. Anyway, I have designed ten screens for the defaults - I think I`ll leave the custom ones for the user - and got to work checking the warp routines - much debugging later and they basically work - including the ghosties doing it as well, although they don`t like doing it much - although I`d like to get it so that the bobs move off screen. My animation won`t be much use if I do it like that though. I`ll decide a little later which way to use. Some of the maps have a few errors in - usually the ones with warp gates in as a matter of interest - so I am going to have to find out why and sort them out. I have also been tweaking a lot of the routines after watching how the ghosts react to their new enviroment, but I am basically happy, `cause they always get to Pacman in the end. I can`t really asess the difficulty level of the game as yet because I have been using the infamous programmers cheat mode, so that I could test the thing properly. I think I will set the starting level up one though, as the gameplay is a little too slow on the easiest level, and it can get quiet boring trying to clear the screen. The levels work by adjusting the speed of the characters only at the moment but I - and this is just my preference - prefer a faster game. The screens I have designed are not exactly brilliant, but they work well, and a lot of them set you different types of challenge, where you have to go to lots of dead ends in harder levels and also play on a smaller screen which makes it much harder, especially if there are no powerpills for that level. I even took the mick a bit by sticking loads of power pills on some screens and making them inacessable just to be annoying. Each screen will have to be approached a different way, adding to the games long-term appeal, which is what I wanted. Put pen to paper again to write up a final list of bits to go into the game. It was quiet big actually, and it definitely means that finishing today is out of the question. 1. Pacman needs to be animated. (back to the sprite designer, methinks) 2. End of level sequence needs improvement. 3. Sound on/off option. Even I get irritated with the noise after a while. 4. Screen drawing routines need to be loads faster. (unacceptable) 5. Arcade mode has to go back in with thick/smart mode. 6. Map designer has to be put in with game and option to access it. This means I am going to have to put the map designer, and the map bank maker into one file which does it all, and saves out the whole custom set. 7. I have to do something about the movement of pacman. He looks a bit jerky at the moment - even on the slowest level where he moves 1 pixel at a time. Maybe I can solve this by only updating at the end of the gameloop. 8. Code has to go through the major rewrite, where all the old stuff gets ripped out, and everything gets tidied up. 9. Disk has to be set up for the compiled game, and all the source files. I`ll also want to have a print out of this diary and maybe the source code too. That should be all, though I`ll probably come up with some more once I start playtesting it on my friends, and playing myself without the cheat-mode so that I can grade the difficulty. Day 31: July 2nd 1993. ---------------------- I hate working for a living. It really screws up my programing schedule. I was unable to get into the game again yesterday due to the work comitment, and I`ve spent most of today - my day off - taking all sorts of bits off of my Capri. First of all I thought the brakes had gone, then Mr. nice RAC man said it was the suspension, and now I find out it is my wheel bearings, and the old ones are so shredded that I need to get a garage to get them off. I can`t get the car down to one, so I have had to take off the brakes, suspension, steering rack and all sorts of other bits and bobs, so I could remove the bits I need. Not an easy job, and my keyboard is covered in oil and muck from my hands. Have to get the car on the road soon, though, because it is a right pain, not having one. I have a few problems with the map conversion program which I have to look into and sort out, so the maps are displayed properly. I am also trying to fiddle with the screen update commands so that I can get the new screens up quicker. If I omit the double buffer commands, then everything works hunky dory, but the sprites all flicker like hell. I`m going to test it all on the screen designer, as well as update it a bit, and see if I can get that working better, before I implement it in the game. With a bit of luck, I can get the game running smoother as well, by dictating when the screen should update, rather than Amos deciding for me. We`ll see. Day 32: July 3rd 1993. ---------------------- National bothered day. Programmers personal joke. I finally fixed up the map editor and map-to-bank convertor program to get it right and use compatible data. My big mistake really was using two different ways of storing the map data. One method (the first one) loaded each of the screens of the disk and just displayed them. The other used a different file format to load them into a bank, and the conversion process I used was choking on the two different types of data because I took short cuts instead of updating both prgs to use the new format. Lesson learnt - it was more hassle trying to sort it out, than it would have been if I had just done the updating in the first place - and I have realised that short cuts shouldn`t be used, as you very rarely get away with it. I also cracked the screen-draw routine. You could say I commited hypocrisy here, as it is sort of a short cut I used. Instead of trying to work out in great detail how to use the update and autoback functions - I have no manual to work from so it is difficult - I just closed the game screen off and opened it again, so I just double buffered after the screen is built. Remember the problem is with the double buffer command, which slows everything right down, and I don`t know a way to turn it off. Anyway, enough boring you, it works, and the player doesn`t die anymore of terminal boredoom between screens. Spent a little while modiftying some of the screens based on what I have realised from more extensive playing of the game, so the balance of play is a lot better tweaked now. Also did a bit more stripping (Oeerr!) of the main game code to adjust to the new screen system. No point in displaying the text "Setting screen. Please wait!", when the screen appears almost instantly, is there? With this screen update bit sorted out, the game is now totally playable - ie: no error reports and game stoppages - and indeed I have been playing it quite a lot, with the cheat mode on, working out the nescesary improvements. I`ll have to start with the warp-gates, as I just can`t have them like they are at the moment. It`s got to be like the arcade game, so it is bye-bye to the little animation I got so fond off. Ha,ha. Just found a bug after extensive level testing. The skill levels go up by one each time the player clears ten screens. Trouble is I told it when to stop going up, but I let it go higher than it should, and the ghosts are trying to update at a speed they can`t do. Result. CRASH!!! Must remember to sort that one out this session. Day 33: July 4th 1993. ---------------------- Had a very productive session today. First stop was sorting out the routine for the end of levels, so that the ghosts don`t overlap the maximum speed they can legally move. That sorted, the warp routines were totally rewritten so that all the characters move like their arcade counterparts. It took a lot of fiddling with before I got it working properly, but, now it is working, it is a definite improvement. I did more work on tidying up the front-end, and resolving some of the glitches that I hadn`t noticed before. Put in a display for the last score etc so the player knows how well he did. I also got right into the nitty-gritty, by giving each ghost there own character. Before, eating a ghost would just reset its position only. Had to change that so a ghost can`t be regobbled unless another pill is eaten, though the others would still be available. This works much better, as the player can`t pick on the same one all the time, and it means more of a challenge, as the player is not totally invulnerable while under the effects of a powerpill. The inteligence was modified again, so that the ghosts that are vulnerable will try to stay away from you, while the others will go all out trying to protect their friends. The scoring now gives a higher score dependent on which ghost is gobbled etc, and generally just spent a long time synchronising the gameplay. More playtesting resulted in one hell of a dissapointing discovery: the programmer is not that good at his own game. I know I aimed to write an inteligent ghost movement routine but it looks like I even excelled myself. What a morale boost. It`s quiet fortunate that the ghosts start off moving a lot slower than pacman at the begining otherwise I wouldn`t have a hope in hell. On later levels, with my cheat mode on of course, the ghosts are hell to stay away from. Especially on the screens I have done with no powrer-pills and a smaller playing area. This is certainly challenging. I defy anyone to go through all ten default screens on the top level. I also made sure I wasn`t allowed to enter a high score if I played with the cheat mode on. Talk about having it to easy. If I leave the cheat mode in the game (Not sure yet) then I`ll leave that bit in as well, because I am thinking about having a mode to save highscores to disk and it would have ridiculous entries if the player did it while invincible. Did my final editing with the map-editor today. All the maps work just fine now, and the inteligence routine is smart enough to cope with anything I chuck it`s way. Just as well, as users will probably put in much better screens than I have come up with. There now follows a party political broadcast by the ....... Ooops, I mean a list of what`s left to do before I can finally put this game to rest. 1. End of level screen improvement. (I`m surprised I haven`t got round to it yet.) 2. Pacmans animation. (I have to go back to the sprite designer for this one, so who knows what else I might do while I am there.) 3. The map designer has to go in. (Probably at the end.) 4. The real code crunching has to get done. (Quiet an extensive job, now the game is so long.) 5. The following options. ---------------------- Arcade/custom mode. Sound on/off. Thick/smart mode. (I might do this one. Not sure if it is nescesary.) Keyboard controls. (Not everyone likes using a joystick.) I`ve got the space in that little options box on the title screen now that I have reworked the front-end in, so a lot of these will probably be quiet easy to shove in. Still don`t know why I took them out, though. That`s the end for today. And what a day. Back soon. Day 34: 6th July 1993. ---------------------- Didn`t get much done yesterday, as my friend was around playing the game to death. Got some much needed input, and some minor cosmetics were changed. Nothing major to report. Started off today`s session by putting in the option selection bits on the title screen. Everything is in place now, though I have yet to have them do anything. I did make a start on the arcade mode/normal mode toggle but because I`ve changed the player movement routine about so much, it`s going to need a little more work than I imagined. This will get done next time. I have decided to have the sound effects toggled in game by the S key and I am thinking along the lines of having the screen flash when the sound is off so that you know when pacman can gobble the ghosts. At the moment the ghosts do flash when they are vulnerable, but it`s a little too subtle. I also have to fiddle with the pointers on the meanies as they don`t work properly with the effects of the power pills. In other words some of them can be gobbled twice, and the power sometimes cuts out to soon. Need a little more fiddling there. I intended to work on the arcade mode again but I started messing about with some of the graphics commands instead, and got a new clearbox routine which looks much flasher than the boring little scroll I had before. Also got the end of level screen done, which now sort of chops bits out so that it has a faded background look and stamps down a bold message telling you that you cleared the level etc. Finally got some screen bounce effects in for losing a life and going back to the title screen etc. The between game effects are finished with now, as too much fiddling will probably ruin the effects. The game is now linked together properly, and it`s just a matter of getting the rest of the options in. Now that I know what my next project is going to be, I`ve been doing some preliminary coding to get one of the background routines done for that as well. Nothing major, but I`ve wanted to do a star background for ages, and so I`ve put one together which is 3d like Elite and I can play with the values to go in different directions. No it`s not going to be a 3d game like Elite, I am not at that stage yet, but the effect will be used for various information screens, and probably the title screen as well. A star background moving in different directions with the credits on it, is going to look well smart, although I have yet to get anything else apart from stars on screen yet. Like I said, it`s just a routine for the game, and I wrote it as a little diversion from Pacman. It will be a while before I move on to the game 100%. Back to Pacman tomorow. Hopefully for the grand finish. Day 35: July 8th 1993. ---------------------- Got down to the final parts today and spent lots of time trying to put in a keyboard option which just would not work well enough, and had to be taken out again. The problem is that I don`t know how to clear the buffer of the keyboard, so if the player held down the left key for ages, then the program would keep trying to go left even after pacman has hit a wall, and other movements are frozen until the buffer is cleared. Gave up on it after a while - who still uses keyboard anyway - and moved on. Next on my list was the sound on/off option. Easy peasy. Press S in the game to toggle them. And then we came to the arcade/normal mode. As I said earlier, I had been having troubles with this since I took it out originally, so a lot of work was called for before I finally got it right. I made it in the end, even though there were many times I felt like just abandoning it and leaving the option out. Coward. I went on to do the final settings for the speed of player and ghost etc, and also dropped another skill level, as the game played far too slow on the easiest level, and my playtester said it should start a level up. Did some more synchronisation on the speed of everything depending on the level, powerpills being active etc, and making sure that the ghosts can never move faster than pacman. And that was it. The game is now complete. Bet that shocked you, huh! Thought I`d never get it finished, eh. Thirty five days in total, and he has finally done it. Technically I still have some work to do, though, because I have to go over the whole code, just tidying up in general, and shortening some of the routines etc. This should not be too major a job now because I have been preparing for this day, and I have done some of the work while I have been stuck in other parts. I finally decided not to have the Editor in with the main program, as I will have it as another compiled program with the game. I upgraded the editor for the final time today, just to incorporate the code to save all data to a bank which the game will use, and make the nescesary adjustments so that only the custom screens are available for editing. And there we have it. The game just needs tidying up. Then I can shove it and the editor through the compiler. I then have to set up a self- booting disk that will use workbench to load either the game, editor, or the diary as well as store all the backup files of the data used within the game. I`ll have an ascII dump of the source code on there as well so that anyone interested can fiddle with the game with their own version of Amos. I`ll leave all that until tomorow though, as I`ve had enough for one day, and fancy a blast on Project X. I`m thinking about submiting the disk to a P.D library to get some feedback. It will be interesting to see if they accept it, on the basis of an educational disk in Amos, or a tutorial. I don`t think the game will go on anyones top ten somehow, even though it does play quite well. We`ll see. Day 36: July 10th 1993. ----------------------- Spent most of the day fixing my car, so no work got done on the game until very late today. Had two of my friends running through the game extensively today and got my final input for improvements and modifications. The opinion was that the Pacman moves to fast in powerpill mode, so that had to be toned down a bit. Also the ghost positions had to be reset each time the player loses a life. Before the player would just go in a loop of dying, if he died while a ghost was in his starting square. Not good. Also had to fix the game so that Pacman didn`t go off in the last direction set when he died at the start of a new life while in arcade mode. This usually led to him colliding straight into a ghost. Also not good. Fixed the cheat mode so that it is not accessed so easily. Study the source code if you want to know how to access it. Modified the game so that end of level and pause mode could be got out of with the fire button. Also went into the front end and put in a text message showing credit to all my playtesters, and modified the high score text accordingly. Put in a short routine to load/save & reset the scores as well from the title screen. That gives the player something to aim for. Finally got around to reworking all the code to strip out all the unescesary bits and shorten it all. No problems now, and the game works fine. Tomorow just involves setting up a disk for the game and relevant files and putting everything through the compiler. Then our saga is over. Until the next game anyway. See you. Day 37: July 12th 1993. ----------------------- Looks like my problems are not quiet over yet. After doing half of the disk setting up buisness, I am having a few problems with the compiler. I am trying to get it to compile as workbench programs, but it doesn`t seem to like it. The game loads ok, but the screen just exits the game as soon as it starts. I haven`t used the compiler for anything major before, and something tells me that I am going to have to do a lot of fiddling before I get it right. And, just to put the knife in, every disk I seem to be using to save all the info on, seems to come up with a read/error. Probably because I have used up all my new ones, and have resorted to using old ones with stuff already on them that I don`t need anymore, or have consigned to my blank disk area for some reason - probably because I`ve seen the error before and forgotten about it. I`ll have to start from scratch and use a new one, as well as sorting out why the compiler is being so stubborn. It sometimes seems like my problems will never end. I just hope I don`t need to make anymore changes after I have compiled the game, otherwise I will have to do it all again, and it takes about ten minutes each time. Not to mention the hassle. I think another last playtesting session is called for. Back tomorow. Day 38: July 13th 1993. ----------------------- At last.... It's official. Amos and I are talking again. After much fiddling with the Compiler, I have finally got the game compiled and running as it should. Had a heart attack almost when I loaded the compiled version and saw the speed it was running at. Had to reload the Amos version and change a few parametres etc so that everything remains at a playable pace. That done I finally found a disk that worked - Well, I never - and set up my system with the game,editor,data files,doc files,ASCII dumps and the nescesary files to get it all working independently of anything else. In other words it has its own workbench enviroment and is a self-booting disk. I have included all the nescesary instructions for getting the game back into Amos so anyone who feels inclined can modify the game to their own spec and recompile it if desired. Of course I would like my name to stay in the program, and not see it floating somewhere else with someone else taking all the credit - or flak as the case may be - for it. I still have to draw some Icons for all the files, but I can't see this being a major problem even if I haven't used workbench in a long time. Epilogue: --------- This is normally the bit where an author would say: "The butler did it", or something like that, but seeing as this is not a book, I will have to come up with something more original. In creating this game, I have spent countless hours hunched over the keyboard, deep in thought, banging my head against the wall, having my finger hovering with menace over the format button, having writers cramp after many hours working routines on paper and many jubilant moments when things finally were going right. In other words, I have enjoyed every minute of it, and I am hoping that some of this satisfaction is passed over to you the user. Before signing off for the final time, I would just like to say a few thank-you's to some people who have helped me greatly in my quest for getting-it-right. Please stand and take a bow the following: Lee Stothers (Mega bothered) for testing it at several stages and complaining when it was either to hard or to easy. Not to mention always cheating with my cheat mode option. That's mine; keep yer hands off, pal!! Gary Pearce (Doc) for doing the final playtesting and giving me a detailed list of what was wrong, and how to improve it. Sorry I couldn't configure the arcade mode to your exact specs' but I did my best. Carl Manley for having the first test on a very early version of the game - ie: no monsters and jerky movement on Pacman - and coming up with the most honest statement I have yet to hear: "Basically, it's crap." I hope it's better for you now, honey. Ha,ha. Hope you die soon. Thank-you's in great abundance go out to the following magazines for using some of their files in the game. C U amiga - for giving me Amos in the first place. Amiga format - for the groovy Game over sample, and the tracker tune on the high score table. Amiga computing - for the Blue Monday soundtrack from one of their very old coverdisks. Even if I did think it was True faith by New order for a long time. Special Thank you to Clare - my trusty red Capri - which has just broken down on me for the second time in a week. That's it. I'm trading you in on a Skoda. Finally, thanks to my job for keeping me away from the computer whenever I had something realy important to do on the game, and forgot about when I finally finished my shift. Never work as a duty-manager at a Pizza hut. The hours are terrible. Though it is handy when I need transport. Sales rep's get Vauxhall Cavaliers; I get a company Moped. 49cc Turbo no less. What a great career. Not. To close, I must say a thank you to you for taking the time to read me waffling on and I hope this disk and its material is of some use to you in whatever form. Remember to drop me a line for any comments or suggestions etc. My letterbox is always open. The address is in the read-me file also on this disk. Thank you. Have fun. Tony Brice. 13th July 1993.