Previous Blog Next Blog
Prev/Next Blog
by date

Plan for Xavier "eXoDuS" Amado

Plan for Xavier "eXoDuS" Amado
Name:Xavier "eXoDuS" Amado
Date Posted:May 21, 2005
Rating:Not Rated
Public:YES
Comments:YES
RSS Feed:GarageGames Blog feedor Subscribe with .
Profile Page:View profile page for Xavier "eXoDuS" Amado

Blog post
GameShape, Turrets, Terra and Project Raven.
Game Shape
While doing development for Terra, I saw we were using lots of staticShapes for many of the mission objects. Each time I looked at the object in the mission, though, the ugly thought that that simple shape had support for, cloaking, invisibility, fade out, damage, energy, sounds, threads, physics and other stuff made me feel scary. That's when I decided to start a new class from scratch, derived from GameBase, and implementing the necessary portions to just render a dts shape. After an hour of work (mostly realizing that I mistakenly commented out renderImage(); DOH!) I got the first iteration of my gameShape Class. I'm posting this as a resource for everyone in the need of something similar, or just wanting to learn a bit more about rendering shapes, since I've commented most of the code, nothing extensive but should give you an idea what's going on. This first version of the class doesn't do anything else but rendering the shape and/or it's environment maps if available. It uses modified shapebase renderObject and renderImage classes. Most of the cruft was removed and the remaining code tidied up a little bit. It doesn't do collision even, it might still be useful for some kind of games, where you need to render many dts shapes but dont care about collisions (maybe some decoration stuff in a puzzle game, dunno, your call).
I will be adding the collision and damage today since that's what my game's basic shapes will need. I will post an updated version later with collision, and one with damage so that you can pick whatever is best suited for you.

EDIT: Thanks to matt for pointing it out, the difference with TSStatic is that this is a gamebase derivative, it uses datablocks so it can be used with scripts to make a more complex object.

Path finding
Some people have been asking about my path fiding, and to be honest, I decided to work hard on some game play aspects first before continuing work on the AI. The reason is simple, I rather have a finished gameplay that I know how the AI should interact with than be wasting time hacking in AI logic now that will have to be rewritten whenever our gameplay ideas change. I would love to post this as a resource, but it's kinda complicated, and I can already see all the emails with subjects like "your ai sucks, help me to get it to workxoorzzzzzzz". I hate that, so I doubt I will be releasing it, at least not soon. Plus, I don't want to disturb the AI pack's work by releasing one of my own.

Turrets
I've also worked on a Turret class of my own, from scratch, and it came out pretty good. The hardest thing was deciding how to structure the turrets.
The first idea was that the turret was a shape, that didn't rotate, but had a rotating image mounted on it, so basically to rotate I transformed the image render transform. The problems with this were two actually, the first one was that the turret would be limited to a tripod or base and a rotating gun, there was no way of having 2 guns rotating accordingly along with a base that sustained them both. The other problem was that I would have to calculate a camera transform so that it follows the image movement properly, it's not hard, but it was extra code needed.
The second idea was to use 3 parts, the first one was the turret itself, a static shape, with a mounted shapebase on top of it and the weapons mounted on the shapebase. In order to rotate it, I had to simply transform the mount transform in my turret object. This was better, but I still had to code some kind of camera rotation (getCameraTransform). So I was still thinking...
The last idea I had, was simple. If I want turrets that can not only be on the ground, but can be mounted on a vehicle, and I want to do it all with a single class, why not just make the 'Turret' class be only the rotating part? So that's what I did, by having the turret class being the rotating object itself, I didn't even need to calculate the camera, since it was attached to the eye/cam nodes of the rotating shape. To make them groun turrets I just created a staticShape (this will soon be changed with my gameShape described above) and set a dynamic class name in the scripts, which simply override onAdd(). In this onAdd call I simply read a dynamic field in the datablock called turret that contains the TurretData datablock, it creates a turret of that type and mounts it on top of the static shape. So this way I can simply place ground turrets in the editor (or through our in-game build menu) and I can also simply mounted a turret wherever I want, could be a tripod on the vehicle model, or anything else with just a mount point. This made me finish the code in a snap, although I still have to code some kind of interpolation to make it less jaggy on networked games, but I still have to figure out how all this interpolation thing works, it's kinda hairy.


A turret with some programmer art

Terra: Formations
The game from the turret screenshot and for which I've been doing the gameShape code, all the gameplay stuff and the turrets is Terra: Formations. After seeing some of their work I decided to throw them an email and luckily enough they were also looking at some of my work. So from there it was a small chat, an NDA and we started working. It's not my job to market for Terra and I can't really say much about it, but I like it, and I like the team. Since I joined I've been directing the gameplay ideas and they are very happy with them, we should have some real fun stuff to play... sometime :)

Project Raven
I haven't stopped nor forgotten Raven, I still think it's an awesome game, and it's a big step from Terra since it's mainly Single Player RPG. The problem with Raven at the moment is that we have a lot of art being done, but none being exported, so since I started working on Raven a while ago, I haven't seen a single new model, weapon, player, or anything in-game, although I've done lots of programming for it including but not limited to the AI, chat system and the rpg mission/quest system. So I'm kinda waiting till there's more art work and storyline missions to work with for polishing the rpg system and/or adding new features that might pop up. When all that is done I'll see about working on advanced AI to better fit the game play and story line. Another thing that's still in the TODO for Raven is a scripted in-game cut-scenes. But as I said, I'll wait a bit on that too, although I've already started thinking some ideas about it, so I might end doing it soon enough.

Non game-dev stuff
If anyone is interested in non game development stuff, I keep a blog at www.xavieramado.com/~reivax/ (click the blog link) and I have a photography gallery at bbsexodus.deviantart.com

Personal stuff / life / etc
Well.... oh forget it, I don't want to bore you the heck out =]

Thanks for reading! I'll keep you updated.

Recent Blog Posts
List:05/21/05 - Plan for Xavier "eXoDuS" Amado
05/01/05 - Plan for Xavier "eXoDuS" Amado
04/03/05 - Plan for Xavier "eXoDuS" Amado
03/25/05 - Plan for Xavier "eXoDuS" Amado
05/29/04 - Plan for Xavier "eXoDuS" Amado
11/11/03 - Plan for Xavier "eXoDuS" Amado
01/15/03 - Plan for Xavier "eXoDuS" Amado
05/14/02 - Plan for Xavier "eXoDuS" Amado

Submit ResourceSubmit your own resources!

Xavier "eXoDuS" Amado   (May 21, 2005 at 10:09 GMT)
I need to find out how to use the profiler now so that I can taste the differences between rendering a shape with gameShape and with ShapeBase.

Phil Carlisle   (May 21, 2005 at 20:15 GMT)
I did a little profiler thing a while back.. in a newsletter or something?

Xavier "eXoDuS" Amado   (May 21, 2005 at 22:00 GMT)
mmmm... yeah I recall something, no clue what it was?

Blake Lowry   (May 23, 2005 at 03:41 GMT)
Sweet post X :) Glad to see it all working. Finally back from E3!!

Xavier "eXoDuS" Amado   (May 23, 2005 at 12:47 GMT)
Hehe, cool. Talk to you later.

You must be a member and be logged in to either append comments or rate this resource.