Wednesday, January 2, 2008

Truckin' along

Intro:

For the month of December 2007, I focused on getting pathing to work. I have already proven the humans can follow paths and wait, and appear to do jobs. So now I have done a proof of concept for the vehicles.

Paths:
Based on my previous blog I want to have trucks leave from a depot and resupply a weapons bay or ferry crew to the rocket. What they do is follow a path and on certain nodes a special instruction is place to make them wait. They receive crew or get fueled up by crew at the depot and generate crew at the drop-off points.

I implemented the two main AIWheeledVehicle resources and found that the second one was much better because I could set speeds for the vehicles, making it easier for them to turn corners, slow to drop-off etc.

Simple AI Vehicle AIWheeledVehicle

AIWheeledVehicle2

I had issues with the turning. It seems there is a limit on the steering for any vehicle and so to get the trucks to turn sharp corners they had to slide out to do it. I will post on the forums later to see if anyone know why this occurs.


Here's a video of what I have so far with regard to truck paths...

Truck Paths in BRAVE on YouTube


Aircraft Carrier:

I've done a bit more modelling of the USS KittyHawk as a part of modernising (or contemporising) the human arsenal. Here's a couple of snap shots. I've also designed what will happen aboard ship but I'll post that when the sketch is easier to understand.






Joystick:

I fixed up this resource for people when Ed Johnson who runs TorqueSchool discovered it didn't compile. I found the same thing, so I WinMerged the code to get it to work, rather than blindly copy it, and uploaded it back to the resource for people to use in TGE 1.5.2

Racing Wheel, Flight Stick and Gamepad Support for Torque (Windows)

I'm having a go with this code to see if I can fly the plane with a gamepad which is what I want the main control to be in the future. It's only because Ed contacted me that this came about.

Sign Off:

I'll be finalising the truck paths next and then getting the humans and trucks to work together. I will continue working on the aircraft carrier and progress toward completing the first level so I can release an alpha for people to try.




Monday, December 3, 2007

Constructions

This month was mostly about design and construction. I first designed the mission I wanted as below. It involves having humans ferry supplies to a rocket from the store house, and troops resupply to control points, to protect the humans, while the aliens attack.

In the screen about mid-way down this sketch you can see shields, humans etc. You need the humans to resupply your ammo and shielf depots, and also you need to stop aliens from grabbing your humans, otherwise the rocket never gets launched. I'll be interested to see how this plays out, as it will require some careful balancing. [MORE BELOW THIS PIC]




Next I sketched up a control tower and then proceeded to build it in Constructor. It's only just started and so I've placed a copy in the game for reference. There will be several styles of buildings and you will be able to enter them on foot (presumably so can the aliens). I'm going to use textures and objects from Dexsoft.





I've also been working on vehicles. I needed a space truck to ferry parts and troops so I sketched a few designs and iterated upon it until I had something I liked. I've only done the front, but the plan is to make it like a truck rig that can pull a bunch of different trailers, ranging from cargo to missile launchers.




Finally I had a paradigm shift in game design. When I saw the IAV pack coming out, I knew I should probably shift directions. I like conventional vehicles and weapons, so I want to model those now. So instead of space ships for the humans I'm going to make modern day stuff. Should be an interesting mix and pays hommage to Independence Day.

Here's the CV63 Kitty Hawk boxed modelled 1 hour in. I will post more progress over the next month as I have more time during the holidays to work on the game. It looks butt ugly I know, but what I've done is got the dimension accurate, and have started with boxes. I will iterate on them and add more and more details as the modelling progresses. I am going for a balance between realism, texturing to cover fine details and enough detail to satisfy a shooter, but also allow the player to land on it. More soon.




Sunday, November 4, 2007

Lander and Rockets and Mutants - Oh My!

I have some sort of action shooter going now. I have implemented a system to allow landers to find and abduct humans. They then rise up and when they get high enough they turn into mutants. If this sounds like Defender by Williams, that's because it's an exact copy of the gameplay dynamic. The reason I have done this is, is because I need a benchmark to create my final game from.

My game is about aliens attacking Earth and the player must stop them - so it made sense to me to emulate the gameplay from Defender to get the ball rolling. It represented various challenges from a coding point of view which I achieved.

I have mocked up a launch pad as the first mission finds the player attempting to protect the humans as they prepare to launch a rocket into space. I purchased some sci-fi buildings from www.modelbank.com and made my own Saturn V rocket in about 1 hour. The rocket will change later.

I forgot to record audio in the following clip, which are rips from Defender. The reason I'm doing this is to build an arcade soundscape and then at the end replace it with my sounds. Arcade game sounds used to be very simplistic but because of this, they were very carefully designed to give the player audio clues about the state of the game. I want to copy this idea. Here's a video of the action so far.

Video: BRAVE FGE TGE Integration

I have also begun my endeavours into speed paints. These are used to mock up a concept and the idea is to attempt to finish one in less that 3 hours. I grabbed a few tutorials off the net and came up with this image as my first ever speed paint. I will get better over time, but it allows me to visualise what the level is going to look like before actually modelling it.

It was a battle of wills when I started this. For some reason my Wacom tablet and Corel Photopaint don't like each other so when I released the pen it kept drawing. I got extremely pissed off and tried on my faster computer - still same laggy problem. So I switched over to GIMP which is pressure sensitive tolerant and managed to complete the image. Some of the shadows are dodgy and I need to add mood by recolouring, but this will do for now.

I have a map of the new level drawn up (will post when neater) which outlines how the mission will play out. Trucks will move missiles, shields, crew and refuel to depots. The player can use the missiles and shields, and the crew and fuel go to the rocket. Little men meet the trucks and do the loading and unloading. The aliens attempt to eat the humans, and if the player doesn't protect the army and depots they quickly run out of weapons and die. It's about resource management on an arcade scale. The player doesn't control it like Command and Conquer but it does play out like that.

So the player flys around shooting bad guys, and trying to keep as many humans alive to allow them proceed with their own mission. Should be a hoot! Next update I will hopeful upload a tech demo for every one to play.

Friday, October 5, 2007

Backstep to save the project

Lots of things have happened to BRAVE. I got the FGE (Flight Game Example) integrated into the game (or vice versa) and I have started working on the gameplay a bit more. I've dropped back to TGE 1.5.2 while the TGEA LOD bug in 1.0.3 is worked out. I really want the game to run with shaders and if TGEA isn't going the way I need in Jan next year I will implement the Modernisation Kit and just use TGE.

My humans are still using the job system, but I have introduced landers (just mock ups) and have created some spawn points to work on the waves. I did a mini crunch to get the game playable, but there is still heaps of work to do before I can nail down a tech demo.

Here's some screenshots of the game so far. I have put in Defender sounds as placeholders until I can create my own sounds. I was playing Bosconian the other day and when the action gets thick, there's lots of sounds going off. The sounds you hear in the old arcades is the sound design I want to create for BRAVE. They are simple sounds which you learn to know what they mean, a human is being picked up or killed, you get a free man, an alien shoots etc. I also want them to be synthetic so they are just like the old arcade games.

I have to hand it to Decane for the excellent FGE kit. It has saved me heaps of time in development, and the flight model in it is almost perfect. I want to add straffing to the flight controls, and I am going to change the aiController of theirs so I can tell it which ships should not fly like planes, but like floating platforms. The landers for example float down the ground looking for humans. They don't pitch and roll like planes would.

Next I am going to get the landers pickup the humans, get them to rise to the stratosphere and convert to mutants, add scoring and level complete. I'll post an update mid October. Of course it all sounds like a big rip off of Defender - that's because it is. I want to make a 3d Defender as the basis and then derive my own game from that game play dynamic.




Wednesday, September 5, 2007

AI Pathing system

My AI path finding works like this. Bear in mind I read about A* and thought it sounded too complicated when it's all precompiled anyway.

Preparation:
Open editor and click out a bunch of separate paths around buildings - you should try and make as many paths that lead to other location as possible.

Algorithm:
1. When running AI search find closest path to destination.

2. Start COST at 0

3. While traversing nodes on current path, can any nodes on this path see a path to player OR Is node to next path obstructed? (add 1 to COST per node traversed) Store x,y as you go - the idea is to make a path using nodes of existing paths, the paths are just helpers.

4. If failed on either in 3, continue to end of path (summing COST)

5. When at end of current path, look for next path along "rough" vector toward player - tick FAILED counter - pick next path - log JUNCTION(x) ( and COST to here )

6. If FAILED counter < n, pick a new path from destination and goto 3.

7. When FAILED reaches n record COST for *this solution is stored.

8. Next solution, go to JUNCTION(x) until all paths exhausted.

9. Pick lowest cost path.Presumably, when laying the paths down you should have given the algorithm enough chances to get to the player.

So in this pick (black lines are placed by user/programmer) at each junction only nodes "roughly" heading toward the player (even though obstructed) where chosen.

What do you think? Too complex? Not efficient perhaps? Full of errors ?


September - Posts from GG and MyDreamRPG

Here's my latest GG blog which covers everything.

http://www.garagegames.com/blogs/31800/13492

So next is the hard work. AI pathing and behaviour. I was wanting to avoid it, but it has to be done sooner than later. I wrote my own AI pathing for another game, so I might adopt that. It will involve drawing paths in the editor and then the code works out the minimal cost to get somewhere, thereby choosing the best paths.

I've also been thinking about scene handling and I don't really want to hand place every building. I might try an organic, grid aligned algorithm to generate cities and job locations. Will see how this goes.

Post for August - belated

Here's August's activity... mainly blogged on GG and MyDreamRPG...

http://www.garagegames.com/blogs/31800/13335

I've spent most of this month working for 'the man' so development has been slow. I thought I should check in as the month flies on, and blog a little about my progress. It's been mainly research this month.

I've animated the male human using a cartoon-like jutty run cycle. When my pay packet comes in I'm going to invest in an animation book and continue creating unique walk and run cycles for a handful of humans.

I've discovered a free program called Make Human that uses a standard mesh with subtle morphs to create a bazillion different types of humans. So I will use this to create most of the humans and work on skinning to create different looking humans using very few different meshes, about a dozen textures for clothes and unique run cycles.

I've also been implementing the hud and an onscreen debugger, which does something strange every now and then. For some reason writing out play.gui destroys the mouse control and I can't figure out why. It's got something to do with the way the editor writes out the datablocks, but I'm still debugging that to discover the reason.

Next I want to animate the man to work on a machine, and pick something up. I will work more on the Harvester to get it to chase the player a bit better and hopefully in a few weeks have the Harvester eat humans.

Signing off for now. I'll do a bigger update next week.