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, September 24, 2007

Playing Smarter, Not Harder

These last two weeks have been extremely busy until two days ago when I decided to take a few days off for a breather. Before taking this breather quite a bit got done on the code base and I have had a chance to experiment with some new artwork for dungeon levels. The code base was modified for an upgrade I finally decided to make to TGB 1.5. Finally, the AI was replaced with a new AI that bears resemblance to the A* algorithms main theories.

Taking a few days off was a good idea, the monotony was beginning to get to me. I spent some time playing some other RPGs I enjoy to remind myself how much fun the final product could be with a little vigilance. I decided to play one turn based RPG, and one action RPG. While I enjoyed both, the action RPG actually made me glad I went turn based. Don't get me wrong, I enjoy both, but a true RPG to me plays out a little more skillfully. I have always enjoyed tactics over reflexes.

Upgrading was more or less painless. It took while to change things over and figure out where everything went since I upgraded part of a code base that I had made changes to. TGB 1.5 is a little more precise than the latter, it was not shy to let me know that my design was horrible and forced me to design better, paying closer attention to collision properties and others. The file layout of 1.5 alone was worth the upgrade and behaviors take a close second. I have already moved a few things over to behaviors in order to speed design.

The AI has been a big issue for a while. I originally thought I would script each AI type, and planned on having 10. Luckily I came to my senses after scripting one and implemented one universal AI. The AI, as it is now in pre-alpha, works off of a scoring system. It takes a handful of available decisions, ways the risks and rewards, and then picks the best one. It works very well for melee, ranged, and casting combat. Where it is falling short right now is in the areas of support and panic, but it is simply mathematically and can easily be resolved. The future is to have certain attributes effect the AI's ability to choose between the moves.

This week I don't expect anything big to happen. Just some artwork and bug squashing. The AI is so intrusive to the system that it has unveiled many hidden errors I had not previously been able to catch. In many cases I was surprised certain things worked at all, but somehow torque was working past my indiscretions. I also have some outdoor object drawn, but I have had little luck making it look good in digital. Hopefully this week I can work past that as well.

Tuesday, September 11, 2007

More Graphical Experiments


This week has been very fruitful in helping to visualize the final product. It started off with the completion of a male and female animated sprite sheet, which looked very good (in my opinion) with the rest of the scenery. With these two characters I began experimenting with other tiles and determined that I should stay with the current look.



Then the week went into fine tuning some of the plans I had. One of these fine tunings included a rough draft of the game map which can be seen on the right. Another fine tuning had to do with timings and the magical aspects of the game. I believe the new refinements and adjustments will render much more challenging situations than were previously planed as well as distinguish the caster from the archer by more than the ability to hit multiple targets.



The weekend turned into yet another graphical experiment in which I played with different ways of drawing, generating, and filtering trees for use in the game. After trying out several applications and watching my own artistic ability fail miserably I believe I have landed on a satisfactory solution that will help to create a rich atmosphere of role playing.



Every time I predict a week I wind up working on another aspect, so I will try from now on to just report progress, not predict it. :-) However, it looks like it will be AI.



Oh, and here is a fretfully clueless NPC, she is pretty sure the world is ending tomorrow, she's just not sure what shoes to wear for it.



Sunday, September 2, 2007

Don't Byte the Hand That Modeled Ya

Last week I listed off a lot of stuff that needed to be done in order to finish the combat code. How much of it did I get done? Not much. What I did get done is probably only impressive to me, because I know what a hang up I have had in the past with this. For years I have worked jobs that closely resemble that of a graphics artist with very little art skill. Growing up I was always told I had a lot of potential, but I never practiced my art into a reality. I have been in game competitions before and artwork is always a big point looser for me. In fact, this is the one area that has intimidated me about this project from the word go, and I knew if anything was going to bring it to its knees begging for me not to pull the plug it was going to be the character artwork. This week that fear had a big byte :-) taken out of it.


While no one is going to be asking me to paint their chapel ceiling anytime soon I have personally been impressed with what a few months of practice and determination can produce. I have read books, done tutorials, practiced free drawing, and looked at numerous gallery's online. What made things start to click was the realization of tendencies, and some anatomy lessons, mostly bone and muscle structures. I was blown away at how much this helped even for drawing cartoon-ish characters. The more I practiced, the more I began to see perspectives and dimensions.


This week became the week to jump. I got out the calculator and took inventory of just how many frames of animation I was going to have to draw for this project per character. The results were horrifying. For a main character, it was going to take 270+ frames of animation to do it like I wanted. While a pro artist may be laughing at me right now, that's a lot for me, and beyond the scope of my time table. It was time for a plan B, and I just happened to have it installed (on 5 different operating systems no less ).


Blender, the 3d tool for those who can't afford a 3d tool. First off, I have had some modeling experience with blender. I have basically used it a poor mans CAD for quite a while. My most recent project was designing my kids a tree house. Second off, don't let its price tag fool you, Blender is plenty powerful. There are more tools in this application than I will ever use, and many more that I thought I would never use until this week.


Now armed with a plan B, I knew I had a lot learn. I started with what I knew to do. I drew out some 2d figures for the characters, loaded the textures, and modeled it up. Now I have done this time and time again, and always threw away the result. This time it was different. Practice had taught me to see the dimensions, and very quickly the character took shape. Luckily, I only need a 128 x 128 rendering, so detail is vague.


Next I took off on a tutorial hunt and came up with enough to get me going on animation. I started out with envelopes and made a lot of the animations. While it worked, the deforms were sloppy, and 128 x 128 even showed it. So I took off on another tutorial hunt which landed me on weight painting. The results were much better, and I was able to see places in my current animations that needed clean up. Blender is truly an exceptional tool, and was well worth the time to learn. Hopefully by next week I will have some fully rendered NPC's to show off. This week I just threw up a quick animation from my character template model.


Other than that not much else was done. I cleaned up the combat system and balanced melee out a bit. There is still more to do with melee combat, but I really need these animations I am working on right now to polish it up. I could try and work around it some more, but that usually causes more work in the long run. I can already see where I am going to have to go back and change some animation code, but that's just how it goes.