Code Ugly

Name: Greg Tedder

I am a Christian, a family man, a college student, a full time worker, a contract developer, and a musician who is currently trying to break in to the indie gaming market. I like games, mainly turn based RPGs, but my interests do wander when a good creative title comes along.

Monday, November 26, 2007

Aeges Road Weekly Update

Well, I'm back. If anyone was wondering what happened, I took two weeks off, well, almost two weeks. As I was saying in my last post, college and everything else was just too hectic in order to even try and make time for Aeges Road, so I purposely scheduled time off. Even when I had time, I did something else and got myself rested back up. In my time off, I bought another indie game that I would consider the best RPG I bought in 2007, possibly even 2006. Eschalon, it is simple, it is old school, and it is somewhat tactical. The stats system and how well balanced it is, is what really won me over.

Saturday I started back up on Aeges Road. After a refresher and a time to reflect, I decided it was time to do more planning and less hacking. So I woke up early and began diagramming most of the theory and some of the logic. My first order of business was to fix my painfully slow range finding algorithm. So I diagrammed the theory behind it, made a UML activity (I think) diagram and separated the logic into something other than ugly code for once (I may have to change my name if this keeps up :-) ). After that, I opened up Torsion, and did some of the fasted coding I have ever done. Nested recursion, tons of nested logic statement, and it all took about 10 minutes to write.

Unfortunately, there was an error. An infinite loop that I could not track down. Windows just could not kill the process, and I was having a lot of difficulty getting feedback. Frustrated, I wound up spending most of Saturday and Sunday fuming and doing something else I will talk about a little later. Today, after pounding the code with more echo's than the grand canyon, I found something interesting. I have never, in my life, made this mistake before and hope I never do again. Standing alone, I would have found it in a heartbeat but nested into the code it I just couldn't see it. This one line of code destroyed my weekend.

for( %ol = 0; %ol < openList.getCount(); %ol )

At one point I think it took my machine 15 minutes to recover from end task. This is where any Unix or Mac developer will be throwing darts at their Windows box. Macs force quit and *nix's xkill are by far superior to the all too polite end task. It got to the point I was unplugging my computer at the wall to save time. I even had a blog post ready to go Saturday, but got caught up in this, and was giving what was really annoying me Saturday and chance to prove me wrong, and it did.

Well, after I finally started incrementing my controlling variable variable, I was floored with the results. My AI has been a beast. Making tactical combat work has been painful. Range finding is a must for getting the heuristics I need and my old algorithm was killing me on performance. At times, AI would take nearly 2 seconds to make a decision which would cause the system to hang. I knew it was the range finding algorithm, and it didn't help that it was being called multiple times. Now, the basic range finder is so fast I can do mouse highlighting in real time with it and no “noticable” performance hits are there. The performance hit shown in the numbers is very satisfying.

So now I have fast code that is pretty to boot and easy to use. This week will render few results until the weekend, but I can definitely see time saved by heavy diagramming. There are a couple of other small algorithms that are not performing right that are about to get hit with this. Anyway, enough about code, moving on.

This weekend I made a purchase, FLStudio. This is very similar to a midi music making program, but generates a much higher quality sound track. So far I have two very rough sound tracks, and I am getting the hang of it fast. The results continually impress me, and I just hope a simple musician like me can rise to the task of full on composition. I know it won't be as professional as hired music done or music I could have purchased, but I have dreamed of working with music since I was very young, and I am more excited about this project now than I ever have been.

Tuesday, November 13, 2007

Aeges Road Weekly Update

It seems that I am stuck with too much to do. College, work, family, church, project, and sub projects have all ganged up on me and kicked me to the ground this week. College being the predominant kicker right now. However, with only a two day delay, I was able to get complete my inventory management to the point I expected. Inventory is now fully functional as far as graphics and manipulation goes. There is a lot more to do, such as interfacing it with actual characters and implementing transitions, just making it work was quite a task, and it took some creativity because the solutions I needed were not standard gui components.

At one point, I debated backing out of using a gui and using behaviors to turn scene objects into my components since they have a more flexible callback and visualization functionality, but decided against because a few gui functions were too easy to use as they were. It is also nice for another screen to take over input, while I can handle it myself (and will to a point later), it is much easier when it is done for you. There are also font rendering issues that made me a bit apprehensive on using the scene screen.

Here is a screenshot of the inventory screen in action. Those two odd looking things will be covered later. After some major overhauls in the stats and rules engine, I decided to go after one non-normal feature, and those two things are it. My original rules system is better suited for PnP, it is harshly based on reality and got tedious fast, even with as little play testing as I was able to do. This is why I went for a more elemental based system such as Sacred or some of the Final Fantasies. I have not rigged this system into the game yet, I am still playing on the old system. The new system will actually be easier to code and much more flexible for additions.

This week I am going to work on the website. I hope to have the basics up and functional in two weeks, and have the forum done some time in January. Not all this time is going to be spent on the website, I want to get back into the game code as soon as possible.

Sunday, November 4, 2007

As it is with Aeges Road

This is a long post to give a good outline of where Aeges Road currently stands. Things are looking good, but I have been feeling the time crunch for the last two months. I might even get an ulcer if I am not level building come December. :-) Looking back, I can see that my biggest problem was that I had no experience in many of these areas, and developing balanced tactical combat has taken longer than I expected.

This weekend marked the half way point in the game competition in which I have Aeges Road entered. It was interesting to see the feedback on all of the projects, and very humbling to see so many incredible teams and individuals working so hard towards this. If you haven't taken a look at all of these projects, than a visit is necessary, go here.

Recently I posted some oddity item artwork, and after several comments I have gotten, I am just as surprised as I am excited to say that this is the direction I am taking with the equipment artwork. As a note, I liked it, I wanted it, but I was skeptical as to whether I could sell it, literally sell it. :-) Now I feel a bit of optimism shining through the clouds, and I am going with it. My original plan was to have these items as part of the Weird Eddies collection in the Chalt Village. Oh well, maybe Eddie can design some high heal hiking boots or something?

On other artistic notes, unless I change my mind again, I am going with the original tile set look and feel for the game. It has a bit of a mid-90s RTS look to it. I always liked the RTS tiles sets, they usually just lacked good scenery, though a few really stood out. Stat and inventory screens have changed significantly, and so have the combat screen controls. I felt that what I had was a bit to hard to manage for a new user, and simplified things with a dedicated stat and inventory screen. For some reasons I had grand illusions of a console release early on, then realized I need to cater toward my current platform first and foremost.

AI is fully working, with just a few bugs right now. It uses a heuristic approach to terrain, and enemy placement and weighs the risks and rewards of each possible move. I think I have located the worst bugs as being directly located in both the path finding and the range finding algorithms. I have an algorithm on paper that will soon replace the range finding algorithm, and the oddball A* is solid theory, I think I am just missing something which will hopefully show itself during beta testing. Luckily, this hard to locate bug is not a show stopper, it just causes unresponsiveness sometimes, and the occasional silly path. I think the silly path has to do with an error in the terrain preprocessing (sorry, I'm running out of angles, and I have no one else to blame). :-)

After play testing my old rule set against two AI algorithms (the first AI was boring, but solid), I found it be pretty much a gamble rather than progress and tactical. While there needs to exist that gamble that adds to the anxiety and possible consequences of each action, there does need to exist some consistency as well. The ability to tactfully give yourself an advantage, or the ability to realize you are at a disadvantage is important to me. It helps bring skill into the game. So I decided to keep base stats and professions, but I completely changed their purpose with a complete rewrite of the derived stats system and the skill system.

While this is still in development, I have not posted a screen shot in a while, so I can't help myself. As you can see, things have really changed. There is a new five elemental system that is used to determine both physical and elemental combat modifiers. It also changed the way professions and equipment are used in terms of tactics. Professions are a bit more static in their level ups, giving them more obvious strengths and weaknesses. Weapons and armor are now modifiable through gem slots. Here is a screen shot of the inventory system in action. Currently, the gem slots are not in operation, but that will change very soon. The rest of the inventory system is almost fully functional. I just need it working with the characters and updating stats, which will happen when I finish the stats portion of the project.

Of course, character creation is taking on a rewrite, but it will actually be simpler than the old method, making it easier for a player to customize and get into the game. With 100 levels possible per character, this will give the player plenty of customization options throughout the game. One possible problem that may arise later on in the game, is that a part full of jack of all trades will have difficulty overcoming enemies who are specialists. While the idea of the game is to bring a bit of balance to both tactics, the bottom line is that math eventually finds its limits as Enron and World Com found out. :-)

The story line is shaping up, and sequel and prequel notes are being kept in order to offer an intriguing series rather than a loosely knit set of games loosely based on a similar concept. I may eventually do the latter, but trilogies seem to be a popular thing. I still have no building art to speak of. I have a bit of dungeon art and a level mock up. I have quite a bit of out doors art. I have some character art, I have stopped to spruce up the animations a bit before continuing use of my template. The few characters I have are all NPCs, and will be usable for the game since I did not have to update their animation frames.

I currently do not have save game functionality. I do have a file template wrote up, pretty much a simple markup type language used to save variables and arrays to file. Level building is waiting for more artwork, but I have general guides made up to help me structure the outdoor map which will greatly speed things up. The structure is based on the game map, so with some luck, the game map will be usable in game with just a few modifications. I also need to re-write the level transition and spawning code.

Music is still in the air, though I think I can do it myself. I am waiting until later in the project to make sure everything else is done first. I have six songs noted down for possible tracks in case I don't have time to make my own. Sound effects will most likely be purchased. I have very little experience with wave form, and don't have time to get creative with it. Particle effects are still needed, but I have some fun ideas. I programmed some cool particles in Java once for a PLAF I never finished because I was afraid I would give someone epelepsie (like me). I called it Drop, because its biggest feature was that it would make ripples when you were typing or moving the mouse over it. I may dig those up and try and port them over to torque.

The main parts of the website are just waiting for me to fill with content. This weekend I finally got the template finished, and working on IE 6 no less. The forums, games sales, and possible blog integration will be added as I get more acquainted with Ruby on Rails. Nice framework for anyone looking into MVC application development.

So this is where Aeges Road stands. Come test time in March, I may still have some place holder art in the levels. I will also probably wait until then to work out my AI issues, because none of the problems are show stoppers and I can currently play my game without any crashes. Some errors I expect are just bad heuristic calculations that in making these simple fixes, I will get re-acquainted with the code easily.

Labels:

Thursday, November 1, 2007

Aeges Road Weekly Update


What happens when a programmer tries to go cartoon artist and make some basic weapons and armor icons? Well, something like this. The saddest part is, I kinda like it, and it certainly doesn't seem to be what most people want in their RPG. So among other debates going on right now, I am trying to figure out a weapon line that will let me salvage a few of these masterfully sloppy creations and use them in the game.

Among other things wildly in debate, I have been trying to tie up all loose ends on the UI so I can move forward and stop looking back. It has been both artwork and programming intensive, not to mention the constant second guessing and do overs. I have found myself to be a horrible boss for me, and my goal is to have this 100% done and ready to shine in a weeks time. Once this is done, I will be free to finish up the back end systems, get events rolling, and focus entirely on content and level building.

Music has been holding up progress on finishing the UI so far this week. With some spare time, I began exploring different alternatives for music and sound production much like I did with art software. I hit the internet and looked for wisdom. One very notable find, was all the royalty free music out there, and surprisingly, a lot of it is pretty incredible. I even managed to find 5 tracks that would closely fit the mood of the game.

Of course, not being totally satisfied, I started looking into how these tracks were made. I myself am a musician, but I am limited to pretty much one instrument. I know how other instruments are supposed to play out their part, but I can't play them well enough to record a production track with them. I have played with midi sequencers in the past, but the results were always very basic and lifeless. Fortunately, there is an incredible application available right now that does a great job of putting life into software music, FLStudio.

I have been playing with the demo, trying to get the hand of how everything plays out, and it is very impressive, and surprisingly easy. Today I decided I should try and compose a simple song that swung through a few moods, and the results were surprisingly so-so for just 45 minutes of fiddling around with my mouse. The tonal quality of the loops is incredible, no complaint there. The so-so comes from my loopiness, the song plays out like a cheap Japaneese animation, lots of repititious loops.

So once I get some things squared away, I plan on putting FLStudio to work on making the sound track. I have a general theme in mind, I am just not sure yet, as to how far into left field I want to take it. Right now I am more concerned with just making sure the quality is good and the melody and beat make the player feel something in accordance to the rhythm and groove of the game itself.