Building construction

From Jason:

We tried to think of an easy way to do contruction sequences. A lot of RTS games do really cool animations of the buildings being built or sort of 'unfolding'. That is great if you have a team of artists to spend resources doing a complex animation that is only shown on the screen for seconds. The first time you see it as a player, you say - Wow, cool! Then after that, it is ignored because it doesn't have any effect on gameplay.

A concept we had years ago was that when you click where you want to build the building and rotate it into the orientation you want... like you say the earth flattens (so you don't have floating corners) and the terrain texture would change to a generic 'building footprint' that would match the biome (AOM uses unique textures for each of the buildings, I don't think could just let the game engine do that). A generic foundation marks the outline of where the building would be layed. From that point - a scaffolding (we already have models for it for the various footprint sizes) slowly rises out of the ground (particle dust effects would be a nice touch) and reaches it's height. Then the building model rises within the scaffolding. All kinda like smoke and mirrors - David Coperfield stuff ;)

Once it reaches 100% contruction (or near that), the scaffolding and foundation disappears and the dust stops.

From Philip:

One caveat with the terrain flattening: It presumably shouldn't happen instantly when you select a location to build, because there might still be units there or you might be doing it in the middle on an enemy encampment to mess them up. So it should probably wait until one of your units has physically reached the construction site and started building, to avoid this kind of abuse. Then it can instantly flatten the terrain, or (perhaps nicer but more complex) slowly flatten it as the construction progresses. But that means the initial foundation model is on non-flat terrain, so we'd need to do something cleverer with the meshes to make sure it still looks sensible on slopes. Or maybe it'll look alright as long as we limit construction to terrain that's already mostly flat.


A description from the old TDD:

Here is how I would like to do the UI for placing buildings on the map:

http://www.wildfiregames.com/~art/wijit/buildingUI.jpg

This is the method used by Generals, and I like it a lot because of its freedom and control, and it doesn't tie up the scroll which is used for zooming.

  1. Select your building you want to make, and click its icon in the UI
  2. Move to your game screen and find where you would like to place it, if its obstructed it would have some sort of a red warning (also if it had an aura [resource center, health center, etc..), it would show up when you are in the process of finding a good placement)
  3. Left click and hold once you have found your spot
  4. Move/Drag your mouse in the desired orientation (I want it SE)
  5. Drag (no wait, I want it SW)
  6. Release your left mouse button, once you do the building footprint actor will be put in place and the terrain would be flattened.
  7. Your worker arrives and the building animation begins (scaffolding rises, once its 100% up, the building rises up, when the construction is 100% the scaffolding disappears and the props for the building are put into place instantly)
  8. You're finished building

If you don't care about orientation (some buildings it doesn't matter), you can just do a simple click release and that would basically skip the orientation steps and you would just get the default orientation of the building.

Current status

As of 2010-04-16: The GUI for building placement/rotation works. Foundations are rendered while the building is under construction. There is no scaffolding or animated reveal of the real building (it just pops in when reaching 100%). There is no terrain alteration.

References

Relevant code: Builder, Foundation, VisualActor, CCmpTemplateManager::CopyFoundationSubset

Old description: XML.Entity.Actions.Create, XML.Entity.Traits.Creation, List:_Entities:_Player:_Structures

Last modified 14 years ago Last modified on Apr 16, 2010, 3:23:07 PM
Note: See TracWiki for help on using the wiki.