|
DEV DIARY #17 - MAGUS |
|
| Hi everybody!
My name’s John Mansir but round these parts they call me magus. I’m 18 and I live near London, and back in March I joined the First Strike team as a coder. I’ve just finished school and hopefully I’ll be going to university in a few months to study physics. I started modding nearly 4 years ago by joining the Battlefield 40000 team for battlefield 1942. It’s been an awesome journey and I’m really glad to have ended up here at First Strike. My job on the team now mostly involves coding vehicles and annoying Woodrow.
I know coding can be boring and you usually don’t hear much about it but I figure there must be at least one person out there who’s interested in how we code vehicles! To that end in this dev diary I’ll show you how we created the B wing starfighter. Don’t worry, I won’t subject you to big boring chunks of code, there will be lots of pretty pictures along the way!
Step 1: Get model & texture.
The first step in this process is to retrieve the art assets from the people who created them and load them into 3D Studio max. This time they were kindly provided by my extremely skilled colleagues RedMonkey and Rybot:

Here’s a shot of the model first loaded up in 3d studio. As you can see from the window on the left it’s in a mish mash of unorganised pieces! These need to be organised into a proper hierarchy so that the battlefield engine knows exactly what to do with all the bits.
src="http://www.fsmod.com/img/sshot1_sml_magus1.jpg" alt="magus1" width="200" height="150" border="0" />
Step 2: Plan out hierarchy and organise the pieces in max
Now that we have the vehicle in max, we have to plan out how the vehicle behaves. To do this we have to find out what the vehicle is like in the movies. I put out a request for background information on the B Wing, and my colleagues Talon and Dutch_Razor provided me with a whole slew of stuff about weapon loadouts and special abilities that the B wing has. The B wing has 2 important features that will be important to our hierarchy; firstly, it starts off in a horizontal position and folds out into a vertical flight position like so:
src="http://www.fsmod.com/img/sshot1_sml_BWINGCONFIG.jpg" alt="BWINGCONFIG" width="250" height="150" border="0" />
Secondly, according to background lore the cockpit is gyroscopic, meaning that it always faces up regardless of which way the rest of the ship is facing. After some deliberation we decided that a ship like that would be almost impossible to fly; we came up with a compromise in that the cockpit should only be gyroscopic when the craft is folding out into flight position. As you can see from the above picture, the cockpit is facing upwards in both positions. Now we know what has to be done, we can plan out the hierarchy.
In the battlefield engine, each separate piece of a model (known as an object) has to have a certain object type. For example, you can set something to be a ‘PlayerControlObject’. These are the base of each vehicle. Each PlayerControlObject corresponds to one position on a vehicle, so in a jeep you would have one for the driver position, one for the passenger position, one for the gunner position and so on. There are many other object types, including ‘GenericFireArms’ (this is just a fancy name for any kind of vehicle mounted weapon), ‘Wings’ (These are invisible objects that generate lift to keep air vehicles flying), ‘RotationalBundles’ (Objects that rotate by player control are RotationalBundles, for example the steering wheel in the jeep), and ‘LandingGears’ (These are a special kind of Rotationalbundles that can rotate automatically when the vehicle reaches a certain speed/altitude, hence their usefulness as landing gears). Since we want the entire ship to rotate from horizontal to vertical automatically when it reaches a certain speed, we’re going to be using a lot of LandingGears!
Each vehicle must have a PlayerControlObject (PCO) as its base, and they can not rotate. Therefore our PCO will be invisible, and attached to the invisible PCO will be an invisible landing gear. All of the other objects will be attached to this invisible landing gear meaning the entire ship will rotate from horizontal to vertical as we planned. The wings are also LandingGears; they will fold out and go from a position held at the side of the main hull to a fully extended position as the rest of the ship folds out.
Unfortunately with this setup it means that the cockpit will also rotate and will be facing the wrong way when the ship has fully folded out. To counteract this, we’re going to attach another invisible LandingGear to the first one which rotates the opposite way. (Think of this as if you were standing on top of a big spinning plate. If you spin the opposite way at the same speed as the plate then you will always face the same direction. We are going to use this principle to keep the cockpit facing the same direction). Attached to this second invisible landing gear are the cockpit model and the player camera. Finally, we need to attach the GenericFireArm weapons, the Engine, and the ‘Wing’ flaps to the main hull object.
Now we translate all of this into 3d studio max and we end up with this (note red annotation is mine):
src="http://www.fsmod.com/img/sshot1_sml_MAGUS3.jpg" alt="MAGUS3" width="200" height="150" border="0" />
This is now ready for exporting into the battlefield editor.
Step 3: Tweak in the battlefield editor
Now that we’ve exported the vehicle from 3ds max into the battlefield editor we can start to change and tweak all of the object properties until they work just as we want. Here’s a shot of the B wing in the editor, and in it you can see me tweaking the ‘GearDownSpeed’ property. Most properties are self explanatory from their names, and as you might have realised this one controls the speed below which your vehicle has to be before a landing gear will deploy itself.
src="http://www.fsmod.com/img/sshot1_sml_MAGUS4.jpg" alt="MAGUS4" width="200" height="150" border="0" />
There are many many properties to set and this is one of the most time consuming steps in the whole process. It takes an especially long time because to tweak certain properties to their perfect value you have to boot up bf2142 again and again and again to test until you’re satisfied. It can get frustrating!
Step 4: Polishing off
After tweaking it in the editor the next step is to put it in an in-game environment and see if any changes need to be made. This is usually lighting/sounds and other minor tweaks to handling. At this point I retrieved sounds made by Ulversial and added them to the weapons and engines on the B wing. Also at this stage we need to add any extra effects, for example engine glows and ‘damagestates’ (These are the smoke and fires that appear when your vehicle is damaged). Here’s a shot of me testing the weapon laser effects and the engine glows in-game:
src="http://www.fsmod.com/img/sshot1_sml_MAGUS5.jpg" alt="MAGUS5" width="200" height="150" border="0" />
Finally after I am satisfied that everything is complete I hand over the vehicle to Blitz and Woodrow for them to do any executive tweaks or add anything that I might have forgotten. Once this is complete the vehicle is added to the game for our testing team to fly around in to ensure that it works properly. Any complaints from the testers are addressed and the vehicle may be further tweaked. As you can see, not including the testing team, coding this vehicle involved the work of 8 developers so it is very much a team effort to produce each vehicle. It’s an awesome thing to behold and I love seeing so many people’s work come together in the game.
Anyway I’m sure you’re bored by now and this is getting long so I’ll bid you farewell and see you on the battlefield!
Thanks,
John ‘Magus’ Mansir
| |
|
|
|
Reactie's |
|
|
|
by
Grompie @ 26 Aug 2007 - 14:08 |
|
|
|
by
DS Imperial @ 26 Aug 2007 - 21:08 |
|
|
|
by
Geral @ 27 Aug 2007 - 18:08 |
|
|
|
by
MMad @ 28 Aug 2007 - 07:08 |
|
|
|
by
FsDev|Dutch_Razor @ 28 Aug 2007 - 08:08 |
|
|
|
by
Muffius @ 28 Aug 2007 - 16:08 |
|
|
|
by
SuperD @ 31 Aug 2007 - 05:08 |
|
|
|
by
Zoran @ 28 Aug 2008 - 03:08 |
|
|
|
by
zombo @ 06 Nov 2008 - 21:11 |
|
|
|
by
glassesshop @ 12 May 2009 - 20:05 |
|
|
|
by
joly @ 23 Jun 2009 - 22:06 |
|
|
|
by
wow gold @ 08 Jul 2009 - 19:07 |
|
|
|
by
a @ 30 Jul 2009 - 23:07 |
|
|
|
by
Gaia Gold @ 04 Aug 2009 - 03:08 |
|
|
|
by
YJN @ 13 Aug 2009 - 02:08 |
|
|
|
by
keci @ 02 Sep 2009 - 02:09 |
|
|
|
by
dsafdsa @ 04 Sep 2009 - 08:09 |
|
|
|
by
longge @ 07 Sep 2009 - 01:09 |
|
|
|
by
ed hardy sale @ 09 Sep 2009 - 19:09 |
|
|
|
by
Wow gold @ 10 Sep 2009 - 01:09 |
|
|
|
by
xiaojuan @ 15 Sep 2009 - 11:09 |
|
|
|
by
hanyujoys @ 23 Sep 2009 - 01:09 |
|
|
|
by
replia lv handbags @ 24 Sep 2009 - 03:09 |
|
|
|
by
tiffany jewellery @ 27 Sep 2009 - 10:09 |
|
|
|
by
ed hardy @ 28 Sep 2009 - 23:09 |
|
1-25 | 26-50 | 51-75 | 76-100 | 101-125 | 126-150 |
|
|