Tutorials
Adding a new building to the game
Background info on how the engine handles buildings
Before I get into the instructions of adding a new building to the game I would
like to give a background of how buildings are used/handled in the American
Conquest engine.
Building dimensions and angles For those who know the game quite well (and any other 2D RTS game for that
matter) will notice that the buildings are displayed on a certain angle, this is
what's called an isometric view; everything in the game is viewed in this way
that it appears you are looking down on an angle, an example of what I mean
could be the French Shipyard from the game:
All buildings are displayed in 2D you cannot rotate the games view to see
other sides of the building, this is easy to make buildings as you only really
need to focus your design on 2 sides of the building.
You will also notice that in the above image the building is quite large,
this is done to give unit & building dimensions a realistic scale, this has
to be taken into consideration when designing/making a new building as you want
all your buildings to look a realistic scale in comparison to your peasants
& troops.
Lighting & shadows In the above image you can see that the sunlight comes in from the
eastside/right of the building and the westside/left is darker and has the
shadow. It can be a bit tricky getting the light setup correctly with your first
building, but once you have the right formula it's easy for any other building
you make.
National color
When you start a game in American Conquest, in the options you are given the
choice to choose which color you would like to be in the game, red, blue, orange
etc. we call this the "national color". So when you start the game
certain parts of a unit or building will displayed that chosen color, this is
how you distinguish your units & buildings from other players. The way the
game engine assigns this specific color to a unit or building is by shading any
parts on a unit or building that has pink on it, this particular pink's value
is: Red: 255, Green: 0, Blue 255, So when you make your unit or building,
put this pink on any parts of the unit or building that you wish to display the
national color, for example this could be a buildings flag, an object in the
building, shield on wall etc. The English dwelling could be an example, if you
see the plant at the front, the box is colored pink, this will be displayed
red/blue/orange etc. in the game:
Not all buildings have to have the national color as it usually pretty easy
to spot the different nations unique architecture, although it does come in
handy knowing the color of the building when you capture them, however the map
displays the different players colors quite good anyway. Sometimes having this
national color can ruin a good designed building but if you can make it blend
in the with building it can come up quite good.
Building construction sequence frames When you select a peasant and place a building to be built, as the building progresses
it displays the "construction sequence frames" these are the
animations of the building being constructed such as the floor, then the walls
going up and then the roof going on and usually there is a ladder and scaffolding
on the building adding a realistic appearance to the construction of the
building, and then the building is finished and ready to be used, these frames
get displayed as the peasant progresses with the building (build time). These
frames form part of the buildings .GP file. Buildings in American Conquest have
4 construction animation frames. Basically you just have 4 (5 including the
completed building frame) separate animation frames with the building construction
progression, just have a floor, then the next frame will have a wall added to
the floor, next animation could have the the roof timber frames added etc. The
final frame is the actual completed building. Below is an example of the construction
frames, this is Holland's Artillery Depot (HOLART.GP), the images have been
shrunk for example purposes:
Frame 1 |
Frame 2 |
|
|
Frame 3 |
Frame 4 |
|
|
Finished building: (if your wondering why there
is a section of the building missing read the Unit walking path/born
points section further down for an explanation) |
|
Each frame is named in 00000 with 1 numerical increments, e.g. 00000.bmp,
00001.bmp, 00002.bmp, 00003.bmp etc. A .LST file also needs to be created which
lists all the frame names.
Note: You don't have to have the constructions frames that elaborate if you don't
want to, to save time you could just have a floor with a few stones, and
as the building progresses more stones appear until the completed building pops
up, this is common in a few RTS games, I do however like the realism of the
American Conquest construction frames.
Unit walking path/born points If you notice in the below image there is a chunk missing from the buildings
and its colored the transparent green color. This is done as it is the
path in which a unit walks when it is either created at the building and walks
out or when the
unit is walking inside the building to garrison it. The transparent green is
used
for this path so that when the unit walks into or out of the building the unit
is visible and also the part of the building is visible.
Its very easy to do this, just render your finished building .bmp frame and you just use GiMP (or whatever image editing
program you use) and you just use the "Free select tool" to select the
walk path you want, you then cut this and save both the building then paste the
walk path separately and save. Now just fill the part you cut away with the same green
transparent color you have as the background color. You need to do this with the
three sections of the building that the unit walks, below is an example of how
it should all look, this is Holland's Artillery depot (HOLART.GP) as an example:
Building death/destruction frames When a building is destroyed in American Conquest you will see that what is
left behind is the charred and burnt remains of the building, usually parts of
the roof is missing, a few bits of timber lie destroyed on the ground, these are
the "building death" frames, you can't build any other buildings while
these death frames are displayed, there are usually 2 death frames, the first
frame is the building badly damaged, as game time progresses frame 2 is
displayed and this is the building decayed and in complete ruin. After a short
period this completely disappears and you can build again on this spot. The
death frames are always the last 2 frames in the GP file. Below is an example of
the building death frames of Holland's Artillery Depot (HOLART.GP):
|
|
|
|
L mode Because the game has the zoom mode (L mode) where you can zoom in and out of
the map for a birds eye view, you need to have a separate .GP file with the
smaller building frames, this is easily achieved with the MegaPack program as in
the packing options you can reduce the size of the animations frames.
How I go about adding a new building to the game I will add the info here soon!
|