Building a Backbone for Building

From EQUIS Lab Wiki

Revision as of 21:12, 25 January 2007 by Dragert (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Contents

Building a Backbone for Building

Group Members

  • Chris Dragert

Introduction

Life is a Village, or is it? Typical game play is based upon the collection of resources, which are then used to construct and maintain a village. Documentation on this Wiki (Structures_and_their_Roles) provides a rich description of possible buildings that would be a nice addition to a player's village. There is, however, one slight problem – the game does not have a strong system in place to facilitate construction of buildings.

Previous work has been done on this feature. Earlier versions of LIAV allowed for building structures. This was done by shifting the camera from the regular first-person perspective to a top-down perspective. From here, the player could move the soon-to-be building around, eventually choosing a place where the building would appear. After selecting a location, the camera view would return to normal, and the building would be in place. Unfortunately, later versions of LIAV have rendered this functionality unusable.

Project Goals

The primary goal is to reinstitute a working building system that is stable enough to be incorporated into the game, and extensible enough to be of continued benefit through later versions. The following is a list, in order, of the features of this system that are to be implemented:

  • Allow the player to insert buildings into the game.
  • Provide a view that is useful for placing buildings in legal positions.
  • Tie the building system into the resource system.
  • Provide a useful menu that allows the player to easily select building types
  • Enable the player to build ‘special’ buildings when certain conditions are met (for instance, as a reward for completing a quest)
  • Add construction-in-progress. Buildings start out as a construction site, and progress through a series of models. For example, this could progress by showing a bare construction site, a basic frame, a frame with a roof, a mostly finished building, and an occupied building.
  • Enforce the concept of a village. Only allow buildings to be placed within a certain distance of your village centre. Allow the player to initially choose the village centre by placing a permanent marker.

This is a lengthy list. Time and task-difficultly will determine how many of these features are implemented. Some of these features would only be implemented based upon the availability of models, such as construction-in-progress.

How changes will appear to the player

When a player chooses to construct a building, the view would immediately jump to a 3/4 bird’s eye view, centered at the centre point of their village. A menu would appear that shows the various buildings that are able to be constructed. This interface should also indicate what resources are needed to construct the currently selected building type, along with the current resources available. The user would somehow select a building type, at which time the building menu disappears and a ‘ghost image’ of the chosen building type would appear centered below. The player could then move the building around the landscape and rotate it, with the camera moving such that the building is always directly below. If the building is allowed to be built at the location the user has currently selected, the building should be shown in colour with 50% opacity. If the building is not allowed, it could be shown in black and white with 50% opacity. The details of this will be dependent on what is allowed within OGRE. When a legal location is selected, the building will appear (either fully, or in the first stage of construction), resources will be deducted as per the building type, and the camera view will jump back to the regular first-person view from the player’s avatar.

Models required for the project

  • Buildings! - Once the system is in place, more building models will allow for a richer village. Buildings should be fanciful and visually appealing so that the village is an interesting place. Some models could be made that will eventually perform tasks, as indicated here (Structures_and_their_Roles#Industrial.2FCommercial_structures).
  • Building menu – The menu could list in text the possible buildings, show thumbnail views of the building models, or display simple 2d indications. It should also indicate which building is currently selected. The nature of the building menu is very wide open. A 3d view that shows the actual building model would be very neat. If there are many possible buildings, scrolling (and indication that scrolling is possible should be present.
  • Construction stages – The various stages of construction, as indicated above. Perhaps a general construction model can be made that can be used for all buildings.
  • Village Centre – a flag/signpost/memorial/marker/etc. that designates the village centre.

Technological Issues

There are Three main issues - Ensuring that buildings are placed legally, providing a menu to select buildings, and providing a way to visualize building location selection. Other, smaller issues would arise if some of the other goals are carried through.

Legal Building Placement

One of the earliest encountered issues will be in correctly placing the buildings. Clearly, the buildings should not overlap with anything else (e.g. a building on a building, a building on a tree, etc). Perhaps a buffer zone should be enforced, leaving villagers and avatars space to move through the village. Buildings should also be on flat surfaces. A building that is ‘hovering’ on one edge and ‘buried’ on the opposite edge is obviously problematic. A solution to this could involve leveling the surrounding terrain, which is problematic in its own right. How much terrain would this impact, and does OGRE support changing the height of the terrain on the fly? Is it easy to adjust impacted models, i.e. trees? What if leveling one building ‘un-levels’ another? Also, can buildings go anywhere? Maybe the grid for the terrain can be used as the set of possible building points. All of this work would involve OGRE.

Building Placement Visualization

As indicated in How Changes Will Appear to the Player, the selected-building should be visible as locations are considered. This allows the player to nicely preview the result of the build. However, it should also give an indication of the legality of the currently considered position. As suggested above, colour would be an excellent tool. A legal placement could show the model in its regular colours, while an illegal position could show a black and white image, or a red-scale image. Since the building is not yet placed, opacity of the model would be an excellent indicator of not-yet-built status. The ghost building clearly indicates to the player which building is being considered, and also withholds the pleasing full view of the new construction until construction is complete. These features involve changing the parameters that OGRE uses to display models. The exact selection of the visualization alterations will be based on the features provided by OGRE. In addition, the input must be remapped in this view, as the controls necessary would be different than during normal game play.

Build Menu

The menu to select building types will also require considerable changes. This involves creating a special display, likely using the Crazy Eddie GUI interface. This may be a simple 2d interface with only text. However, it would be nice if there were graphical components (i.e. a thumbnail image). It would need to be determined how to actualize this. Another possibility would be to interact with OGRE and show the actual 3d model of the buildings as you browse through your building options. While it would be a very nice solution, this approach seems to be more intricate, as it would involve combining 2d and 3d elements, likely requiring both OGRE and Crazy Eddie. In addition, the input must be remapped in this view, as the controls necessary would be different than during normal game play.