THE MAKING OF BLADE THRUST TACTICS
by Edy Zahid
Last Updated 26 October 2009
Blade Thrust Tactics is 8 years game project undertaken by a single developer. If you are curious on how I do it, read on. But I warn you - this is going to be a rough journey...
What inspires me?
It all started in 2000 when I was playing Planescape: Torment
game. It's the rare game that gives emotional impact to me that inspire me to get involved in game development scene. Its then than I realized that game can become a form of expression. A game can transcend beyond its stereotype limitation to have an impact on human soul just like a good novel or movie does.
How it begins?
I started this game project in February 2001. The game is called Dreazth (taken from the word dread) which basically a true blue role playing game on 2D isometric perspective. The game is based on a fictional world called Dreazth ( hence the name of the game ). It's a dark world of which technology clashes with mystic forces. Think about robot, mutant, cyborg and human possessed by spirit. It's an interesting setting, I must say.
I also have figured out the basic story - an ordinary person accidently get involved in silent war between 3 parties from 3 strange disks he/she acquired. Turns out that the disks contain Super Human Solutions created by Tech Wizards (the organization which dabbles in genetic engineering but was destroyed in a freak accident).
At this point, he/she need to choose sides. The decision he/she made will affect what will happen in the future. Idea Empire want the solution for their global invasion campaign. The solution will allow them to create super soldier. Miracle Chemicals want the solution for their Cell Vigour project. Cell Vigour is a wonder drug that accelerate body tissue repair. EVF/Oracle want the solution to prevent Idea Empire from taking advantage of it.
I start basically from nothing with almost no skill related to game development. I can't code properly, my drawing skill is crude and my writing skill is rusty. And worst of all my computer was broken beyond repair. Damn that CIH virus ruining my motherboard.
That's why I start developing this game in solo. I have to teach myself a lot of things since that time before I can get serious to develop this game. I buy C/C++ programming book and read it to help me to code properly. I also draw a lot especially human figure to improve my drawing skill. I also write a lot related to the game to practice my writing skill.
Soft development and watching lots of TV.
I spend my early years of development by doing a lot design on the game. This usually means fleshing out tactical combat rules, role playing system and basically writing content for the game. This involves creating lots of strange organizations/groups/cults and creature types that populate the game world. Within each of these organization, I create conflicts issues to allow quest to be build upon it. I also create weird characters that controls the organizations including all their statistics and portraits.
For tactical combat rules, I borrow a lot from Jagged Alliance 2. This is easy because the official website ( www.jaggedalliance2.com ) contains details about the game combat. For role playing system, I borrow a lot from Fallout games. This is also easy because I learn a lot from their excellent manual.
I get a lot of idea to create the organization and characters based on TV series I watch. So watching TV a lot isn't such a bad idea after all. You've got to choose the program that you can learn. In my case, I watch TV series that belong to my favourite genre - science fiction, spy and supernatural.
I also watch to improve my writing skills especially dialogue. I think it pays off in the end. I'm sure you'll agree on this if you get the chance to play the game.
I took 9 months break.
Then something happen in June 2002 which force me put this game project on hold. I won't reveal in details what actually going on but suffice to say my life is pretty messy at that time. I need to solve my own problem before I can concentrate on this game project. Although I took a break from the project, my mind still thinking about the project.
I'm back to finish this project.
It took me about 9 months before I have the strength to continue this game project in March 2003. When I'm back, I decided to do a major revamp to the game world. I have restructure the world map by dividing the world into 6 regions - North West, Middle West, South West, North East, Middle East and South East. Each region has its own native people which exhibits their own way of life which dictates their own style of name.
For instance, North West is populated by native people called Intellect race. So the native people has their family name associated with intellect power such as Brilliance, Intellect, Mind, Idea and many other synonym. To get as many synonym as possible, I have to scour my English dictionary from cover to cover to hunt the synonym. That is such a tedious work! And I have to do 6 times for other races too!
But the biggest change I've made is shift the game dependencies on weird names to names that exist on English vocabularies only. For instance I change Dreazth name to Legacy. So the game is called Legacy at that time.
So for another example, I change my favourite character, Jrevan to White Cell. I want the game to have universal feel to it. So any English word can be translated easily to Chinese or Indian. This is good because if the game somehow get localized to Chinese, Chinese gamer get to appreciate more the character rather than calling the character Jrevan. Huh, who is Jrevan?
After continue back the project, I still add lots of contents to the game world. I also started to design the game flow in term of interface. For instance, I sketch how should the main screen looks like. I must admit, my primary reference is Jagged Alliance 2 but as I progress developing the game, I have develop my own style of screen and interface.
From quest based to mission based.
On August 2003, after giving a lot of consideration, I've decided to shift the whole structure of the game from quest based game to mission based game. This mean that the game is now strategy oriented game instead of RPG oriented game.
I'm sure RPG fans might be disappointed upon hearing this but I have no choice. Creating deep RPG game with lots of quests is a job I can't deliver. It's too much of work. Since this is my first project, I'm choosing a much easier game in scope.
The old RPG version has a story line which can branch to 3 different paths/endings. The new strategy version has 6 story lines of which player can start from any of 6 story lines in 6 different regions. So, the background stories from RPG version has been expanded to accommodate the strategy version.
You might be asking how this is going to make it easier for me considering that I ADD the story line not REDUCE the story line. It is easier for me in term of coding. Quest based system requires me to build a robust script system to implement it. Mission based system on the other hand is much simpler to execute as I practically don't need to use any script system. Yes, Blade Thrust Tactics don't use any script system whatsoever.
Isometric Game Programming with DirectX 7.0
On November 2003, I bought a very useful book - Isometric Game Programming with DirectX 7.0. It's expensive but really helps me a lot in my game project. The book helps me to code properly in Windows, how to interface with DirectX and gives me idea on building isometric game engine from the scratch. So Ernest, if you read this article, thanks for the great job!
With a good reference on my hand, I'm ready to cut my teeth on coding the game. The game is coded in C/C++ language but for simplicity reason, I choose to use C for most of my code. I can use OOP and I know how to use it but somehow I prefer not to use it. Maybe because I get used to C language since my first programming book is C: How to Program
. I even completed writing a simple text RPG game based on the code I learn from the book.
This begins the phase of development of which I get serious in the project. This mean from that time, most of my time is spent on developing this game. Previously most of my time is spent to learn many skills necessary to develop this game.
Since I don't have a computer, I write all the codes on paper. This does not look as weird as it sounds because I know a few coders do it. I decided to use diamond map to represent isometric world but I managed to make the game look like it use staggered map. I don't use staggered map because I don't like zigzagging feature it employs.
Initially I plan to have up to 7 elevations within a game level but due to technical limitation and I don't know how to add that much, I decided to scale it to 3 elevations.
Instead of using the game to render what is being shown on the screen, I choose a much harder approach of pre-rendering the whole game world in several surfaces. If player scrolls to another part of the game level, portion of surface will be copied to the screen. If there's a change to the game level, small portion will be updated on the surface and if the change falls within the screen area, portion of the surface will be copied to the screen.
At that time, I think it was a beautiful technique but several years later when I run the code, it gives me a lot of headaches trying to solve the updating problem. You will see how I solve this really confusing problem later in the article.
I change the storyline.
On June 2004, I've made a significant change to the story line. This in my opinion is the turning point within the game development because since the change, I somehow feel many design restriction that limit me on how I can push the story line. Do I feel regret making this decision? Maybe but on the other hand it makes the game much more focused in term of storyline. And it is easy to code to...
Basically, I have fast forward the time line several years later in the story of which the Idea Empire has become a global empire by invading cities/towns throughout the world. An underground rebel organization called the Alliance was formed to fight the global empire. Player are in charge of a special operative squad to carry out several missions for the Alliance in their campaign to liberate several regions throughout the world.
Just by reading the previous paragraph probably you can guess that I shift my focus to action oriented game play. The game right now is much more action oriented than what was it supposed to be back then. I'm sure RPG fans might be disappointed again upon hearing this. What was on my mind? Initially I want to create a game like Fallout or Planescape but end up making a game like Jagged Alliance.
How can I sustain coding on paper?
I spend most of 2004 coding the game. Probably you guys are curious how can I sustain coding on paper for extended amount of time without seeing all of my works on computer screen? The only way I can sustain that is through checking and rechecking every line of codes all the time. I mean checking not in term of syntac but you have to VISUALIZE how the code will behave if it is executed by computer.
I think part of reason why I can sustain to do it is because of my coding habit - I code in simple way, use descriptive name for variable, heavily comment the code and make use of functions/methods to modularize the code. It also helps to separate functions to specific group such as panel, game world, game rule, AI and sound. This almost sounds like OOP concept with the exception that I don't use class to combine the functions. And most important of all, you need to have one hell of memory. Since I'm good at remembering thing, this really helps.
The game has a new name again.
It's quite normal for a game to change title over the course of its development especially for a game in long development cycle. On February 2005, I decided to change the game title from Legacy: Rebel War to Sphere Core. This is because the game world is now known as Core as opposed to Legacy.
I've made a fundamental change on how the game world works which is quite different from previous game world. On the surface this does not change anything, but deep within, it gives me a tremendous flexibility in terms of story. I won't spoil the fun because this represent the most kept secret in the game. To reveal it will make the game lose its mystery aura. So I don't!
I have to fill a lot of data.
Developing a game isn't like manufacturing process of which you need to complete a section and then moves to another section. It doesn't work like that. This mean you can't finish coding and then moves to creating data and then creating arts no matter how small the game project is. Each of these sections need to work at the same time. This is the painful lesson that I get while developing this game.
I've found out that doing just coding without knowing anything about data the code will handle can be really confusing. I have to assume a lot of thing which is bad.
That's why throughout 2005, besides still doing coding, I also fill every data that the game need. This includes interface art, object art, creature art/sprite, town map, world map, item, operative, NPC including enemy, mission, campaign, desk, cabinet and even door.
Filling up data basically mean writing data on paper. If you are curious to know, I only use simple data structure such as array of structure. I don't use advanced data structure such as linked links. So the data is arranged according to record. For instance, item data contain close to 90 records. Each record represent an item. I use this kind of simple structure to represent data in the game and it works beautifully for me.
The only data that I didn't fill at that time was game level data because I know it represent the largest data in the game so it takes a lot of time to fill it. That's why I decided to fill other data at first before I get my hand on filling up game level data.
Filling up game level data is a painful process.
By the end of 2005, I already finished major portion of the code and non game level data. That's why I spend throughout 2006 filling up data for game level. I use 100 X 100 array to represent a map so you can say there are 100 X 100 = 10000 tiles within a map. But I only need to fill just half of it - 5000 tiles. The rest is what I called empty space or junk data.
I'll be happy if I only fill data for 5000 tiles for each game level but that wasn't the case. In order to have a realistic game world, I have to use layers. I use 4 layers - tile, wall, object and creature. With the exception of creature layer, I have to manually fill data for each layer so it starts getting ugly - 5000 x 3 = 15000 tiles. To make it worse, the game has up to 3 elevations - 5000 X 3 X 3 = 45000 tiles.
However since I kind of lazy, I normally only use 2 elevations so the figure - 5000 X 3 X 2 = 30000 tiles. This is still a hell lot of data to fill just for a game level. I have 21 game levels so imagine how many data I have to fill - 30000 X 21 = 630000 tiles. Wow, that's a lot of numbers!
Filling up these huge data on paper is a serious challenge to me. I have to use a large paper called mah-jong paper just to represent a layer. By the time I finished filling up the data, I get myself a big stuck of mah-jong papers. Maybe I will take a picture of those mah-jong papers to give you the idea of how crazy this thing can be.
To break the monotony of filling up data, I also sketch interface and object art on paper.
I draw everything.
I spend most 2007 drawing every arts the game requires on paper. This is the part of development I can really enjoy because I like to draw! Since I have the sketch guidelines, this isn't as hard as it thought to be. I think the hardest part of any art creation process is to translate the visual on your mind to paper or computer. You can have the best visual on your mind but if you can't translate it, you are not going to impress people.
For a long time, I thought my biggest challenge is coding but as it turns out creating good art is my biggest hurdle. Drawing ordinary art is easy. Drawing good art is achievable if you focus your attention to details. Drawing great art on the other hand requires genius mind, dexterous hand and a hell lot attention to details which I don't have.
The part that get me into lots of problem is creature arts. I have to pose several times before I can visualize it on my mind. Even then, I find it hard to translate the visual on paper. So guys, if you find the sprite animation in the game looks odd, rest assure I have try my best to translate the visual on computer. I must admit, I'm not a graphic artist. If I have money, I'll definitely hire a good artist.
The last part of 2007 is spent integrating DirectX code to the game. Up to this point I code most portion of the game in GDI ( don't be surprised! ). So the game have 2 render engines - both GDI and DirectX version. I use DirectX example in Isometric Game Programming book which mean I use DirectX 7. It's old stuff but that's OK because I'm not in the business to impress people in term of graphics. My game focus heavily on deep gameplay and believable characters.
Find anyone who can help me.
By the end of 2007, I reach a point by which I have exhausted all I can do in the game project. In order to move forward, I need a computer so I can convert all of my works so far to computer data. That's why in January 2008, I ask for help on IGDA forum. No one reply to me. I can only assume that people are sceptical as not much is known about me or the game project I'm working on. That's why I create a simple website on Geocities to put as much details as possible about the game so people can assess whether the game is worthed or not.
I also add another post telling in brief the chronology of the game project to convince the people that I'm not some kind of scam. I guess that post really help to convince a few people to help me. The first guy who try to help me is Buzz who work for now closed JGG Malaysia. He's willing to lend me a PC but the problem is I have to wait for several months. Then his friend, Aznan has a PC which I can use. Turns out that the motherboard was broken.
Then Buzz suggested to me that I should meet Brett Bibby of Gamebrains. So I meet him and the guys on February 2008. I'm surprised to find out that they are willing to lend me a PC and also provide some technical helps. Great, now I have a computer to finish this game project. Without their help, I don't think this project will ever be finished. It probably be in a state of limbo for a long long long time.
I change the title to Blade Thrust Tactics.
Also within this time, I change the game title to Blade Thrust Tactics because I've found out that there has been a game that use Sphere Core title. I think it was some kind of online game. How do I get the name? It's from Blade Thrust which is the code name for the special operative squad that you will run in the game. So Blade Thrust Tactics represent tactical and any other challenges you will face when handling Blade Thrust squad. Of course it does make sense.
I run the game for the first time.
Since I get the PC, I'm spending several months to type countless lines of codes from stack of papers. Compiling the code is easy but I couldn't be able to run it. This is highly irritating. What part did I do wrong? Finally I've been able to figure out the source of problem. Turns out I have to force all of array of structures to global in order the game to run. Actually I don't want to do this but since I want this baby to run, I think I can live with that.
It took me about 3 months before I was able to run the game for the first time. Although it's just loading Main Menu Panel, I feel I already achieved something. I know this sounds trivial but try to imagine spending several years coding on papers and then seeing what you have coded spring to life in front of computer.
It's a special feeling that happen once in a lifetime which can not be replicated again. I guess this is the same feeling that you've got when you finally been able to ride a bicycle or the feeling that you've got upon receiving your first payment check.
I run the isometric engine.
Since that time, the development progress speed up to the point that I will be able to make the isometric engine to work in GDI with the ability to scroll. I finally been able to figure out how to make certain tile brighter or darker to simulate the effect of daylight or night. This is very important because light plays an important role in the game.
I also take some time to create some arts for the game using open source application called Inkscape. But there is one annoying problem that still haunts me to this day - creating isometric graphics can be a lot of pain especially if you're working on vector graphics application such as Inkscape. Exporting from vector format to bitmap format can produce what I called 'digital artifact' or undesirable pixels that you must clean up or otherwise it will show up on your game.
Take for instance, wall graphics. If I just exporting it to bitmap files and didn't do any graphical touch up, the wall will be rendered properly on the game but you'll be seeing lines on the border of the wall. Cleaning up those undesirable pixels mean zooming up the bitmap at 1600% and carefully hunting down the pixel and replacing the pixel with adjacent pixel. It's really a tiresome process. This is something that I don't want to do but I have to do it.
How I gain 100% in speed?
Not long after I made the isometric engine to work, I've been able to make the game to run in 32 bit DirectX. But the performance is quite slow which makes me wonder there must be something wrong with my code. DirectX is supposed to be fast. So I carefully reading my render code to find out how can I improve it.
Then I was remembering what Brett told me about loading multiple objects with multiple gradients to simulate the effect of night and day. I told him I only load one copy of object and change the light intensity of the object in real time. That when I figure out the slowdown could be traced to changing light intensity in real time. DirectX couldn't be able to handle lock/unlock operation with sufficient speed in real time performance.
So I tweak the code to allow loading of multiple copies of object with multiple light intensity during Loading Screen so the game don't have to change light intensity of the object in real time. I was surprised to find out that I've been able to gain speed of 100%. Wow, thanks Brett for your wise comment.
I face the most confusing problem.
Up to this point running isometric engine don't pose too much problem to me but as soon as I add creature animation in the engine, thing starts to get really ugly. When creature get close to wall, the isometric engine don't properly update the view. I don't want to reveal too much details about that. Suffice to say that it sucks!
I try almost every imaginable technique I can think of to solve the updating problem but that doesn't solve the problem. This represent my most confusing problem during the whole development cycle of the game. I think I almost give up - I start to think to use other isometric engine I can find.
Then I finally been able get to the root of problem. As it turns out, there's nothing wrong with my code. The real problem can be traced to my flawed isometric algorithm - it's highly inefficient, slow and employ wrong updating algorithm. So before my head get burst by thinking too much, I decided to use a simpler algorithm that is guaranteed to work - update only what's being shown on the screen frame by frame. This is quite different from what I've been doing up to this point. I have to change a lot of render code to implement this new algorithm.
There is a lot to learn from this experience. Do not try to do fancy complicated stuff if there is a simpler stuff you can use that can achieve the same objective. The headache you will get from trying to implement the fancy stuff will robe you of precious time that you can spend in other area. I will say that the old complicated algorithm I use has cost me a lot of wasted time that I could spend in other area such as creating arts.
I have to create 2 versions.
I have the chance to test the game on Mark Bartlett laptop which runs on Windows Vista for several times. Before the game has DirectX code on it, the game runs OK as it uses only GDI code. But as soon as I add DirectX code to the game, the game starts having problem on his laptop. It terminates before the game loading process which I assume it has something to do with DirectX.
This make me to realize that having dual graphics engine in a single executable can create a problem. I can either ditch GDI or DirectX ( however unlikely ) but since I want to retain both engines, the other solution is to create 2 executables - each executable to contain either GDI or DirectX version. It's like 2 games doing exactly the same thing. I know maintaining 2 separate versions of the game can be tough but the reward is justified. If DirectX version won't run properly on your PC, you can try GDI version.
Looking back retrospectively, I think having 2 separate versions might not be a wiser solution at all. I think I should be better off ditching slower GDI and move forward to support only DirectX version. The reason I don't ditch GDI could be of sentiment reason - I spend my early development years with GDI. I sort of grown attached to it. BitBlt function was almost like my staple diet of coding.
How I gain 200% in speed?
After I have been able to change render code, I practically get rid the updating view problem. It was a big relief to me but I wasn't prepared to see how SLOWLY the game run in GDI version. Man, it's way too slow. I kind of embarrassed to see it. The good part is I know why it runs slowly - I use too much of GetPixel function to do some sort of blitting on certain surface instead of using BitBlt function. GetPixel isn't fast enough to do graphics update in real time. Ernest has already mention this on his book but I kind of stubborn.
Without getting into much details here, I change some render code to force BitBlt to do blitting on certain surface. Yes, I can see a tremendous improvement in speed - as much as 200%! The GDI game now runs faster than when I use old isometric algorithm.
Another improvement is I finally been able to make DirectX game to run in 16 bit colour after countless code modification. The graphics looks a little bit grainy, but the game runs fast. So now it's possible to run DirectX game in either 16 bit or 32 bit colour.
Progress in later part of development.
By the end of December 2008, I have completed most of the game features except some part of AI and sound. I also have completed most of object and creature art.
By the end of February 2009, I achieve a milestone in the game development - I have completed almost all game features in the game. I also have finished adding content/data for the free version. So this allows me to add more content/data for full version and more room for me to create more arts.
By the end of April 2009, I have finished adding content/data for the full version. Now with the game code is stable, I push the game to public beta version. This basically mean releasing the beta version on the game website so others can download the game and try it. The primary idea is to track some bugs in the game but the most important of all, I need the feedback on how the game plays.
To encourage people to give feedback, anyone who send me an email reporting a bug that does not get listed in both the bugList.txt on game download and Technical Support Section on the game website will get a key that will unlock the game from free version to full version.
Also at the end of April 2009, the game website is launched with the help of Buzz. He helps me to set up the domain name and provide hosting space for the website. With a proper game website, I can initiate Internet marketing to build awareness of the game.
Building traffic to the game website.
After waiting for 2 straight months without getting any feedback, I soon realize that I need to build more traffic to the game website. The more traffic I get, the more chance people become aware of this game and more chance for them to try to download the game. Hopefully they will provide necessary feedback I required.
That's why since July 2009, I have been stepping up the effort to get more traffic to the game website by announcing the game beta version on several forum websites and submitting the game to many shareware and download websites. I must say this is a time consuming effort and few of them produce unpleasant experience.
Initially the effort only attract small traffic but then a blogger named Rampant Coyote read my forum post on IndieGamer and put some news about the game on his Tales of Rampant Coyote : Indie RPG News Roundup August 2009. Someone read his blog and post news about the game on Game Banshee. This build a significant traffic to the website. Unfortunately this is just a temporary surge in traffic. I guess I have to step up my effort.
Strategy game or RPG game?
On August 2009, while waiting for anyone to give his pearl of wisdom ( aka feedback ), I came across an eye-opening user review written by nathanchinRPG. After reading the review, a lot of questions keep buzzing on my mind. What's actually Blade Thrust Tactics made of? What are the strongest selling points of the game?
Why do I push the game to become strategy oriented game even though I know the core and nutshells of the game lies on RPG? Why I emphasize too much on combat element? Do making a realistic combat experience will attract a lot of strategy gamers? Why care for strategy game market after all?
That's when I realized that I've make a big mistake of designing, developing and marketing this game as a strategy game. Strategy game crowd consists of tough people to serve. I simply can not have the expertise ( especially in the looks department ) or sufficient ingredient to make a decent strategy game. If I keep channelling my energy to develop the game as a strategy game, Blade Thrust Tactics might ends up becoming a LOUSY strategy game. That's the last thing I want it to happen.
That's why I decided to change my focus to design, develop and market the game as a tactical combat game with heavy role-playing elements. Although right now I can't push the game to be a role-playing game, I can mutate the game to be a role-playing game for the next version. Among of changes that I might incorporate is try to add more enemy variety that holds variety of interesting weapons to keep the gameplay feeling fresh, make every game level to have it's own tough boss enemy, more varied missions, operative will have their real career path and reduce combat difficulty.
So over several months, I try to incorporate some of changes to the game. I add some more items such as black jacket, food, Cell Vigour and a curious weapon. I also tag a boss enemy in each game level which carry rare item. I also make operative to have their real career path. The most noticable change could be reducing the combat difficulty. I restructure soldiers weapons acquisition - soldiers in the first town use weaker weapon and it gets powerful as you progress through the game. So far I've been impressed with this major tweaking. The game right now is much more accessible to be played.
nathanchinRPG has done a big favour to the game. His feedback is priceless. The review contains important details that I should put more focus on them. Although I don't get many feedback, his feedback alone make up for the shortage.
The game has finally been released on 16 October 2009. That concludes the first saga of Blade Thrust trilogy. I have no plan to continue the next game installment at the moment as I'm concentrating my effort on developing a completely different type of game called Chronicles of My Life, a text based character simulation game.
What I learn so far?
I hope you can learn something from this article. The biggest lesson could be don't give up on something no matter how tough the situation can be. It's OK to progress slowly at the beginning because once you've get the hang on it, the pace will pick up and you can see some noticeable improvement later. So it's a good idea to have loads of patience, passion and perseverance - 3P.