Flexible Game Terrain Design

* See also Construction
* See also Modular_Game_Objects
* See also Templates and Procedural_Generation
Allowing Uniqueness and Changeability in the MMORPG's Rapture (and facilitating Auto-Generation of Terrain)
--- --- --- --- --- 
Scenery/Terrain Deformation/Transformation :
* BS1/BS2 you saw corpses turn into 'lockboxes', that was to prevent the game from having to render all the human figures which are fairly complicated and consume alot of GPU rendering power. So they converted the oldest bodies to something much cheaper to render (making the game work adequately on lower end computers).
* For BS1/BS2 when you struck the terrain with your wrench or fired bullets at it it left marks (called 'decals' in the graphics world). I've gone around in those games doing that to everything and they have quite a variety different surface types each with its own 'mark' patterns and sound effects and visual special effect (bits flaking off, a steam leak from a pipe, a small cloud of dust). Those marks over time will go away (and if you do many quickly you will notice there is some limit of how many it will draw at once and it will 'clean up' the oldest ones as you cause new ones to be made. The limit was sufficiently large that you generally wont notice it.
* In BS1/BS2 there are a number places there are special terrain features that let you 'break-thru walls'. They are 'precanned' built into the scenery to function that way (and I wish there were at least 3 X as many and some hidden a little better to make the terrain more interesting).
--- --- ---
This proposed MMORPG's Terrain is Modular : 
* Made up of many terrain Objects (instead of large sections of fixed/static mesh terrain that game 'levels' areas are normally composed of). Walls/ceiling/floor are all subdivided into smaller objects which can be individually manipulated/mutated. Whole chunks of buildings might be reduced to rubble simply by substituting the set of sub-objects.
* Individual 'terrain' objects can be changed significantly, deformed or even removed/substituted. Example :
** You fire your flamethrower at a wall and it is scorched, that causes a burnt appearance (a texture change with no real change of shape). Decals (Asset type) can be applied as well to vary the scorch marks significantly.
** You then fire a grenade launcher at the wall and the facing inner wall is cratered and caved in - That section of wall (and Object) has a substitution made (new 'wall damage' Object takes the place of the undamaged wall section) with a proper damaged shape/look, and probably some rubble/pieces on the floor (secondary objects).
** The 'patch' (substitution object) is either a pre-canned 'impact damaged' wall section, OR in a more complicated system, a new object is built 'on-the-fly' with a customized '3D' mesh with an appropriate customized 'caved-in' shape (if you hit to one side of the wall slab the damage would be centered to that side, or to the right/left/up/down or even accumulative of several hits).
* The damage in this game is 'persistent' :
** If you come back later that caved-in wall should still be there (unless someone else (Player or NPC) came and destroyed it more or repaired it (or modified it further).
** It might even crumble further with time (a 'degradation' script could handle that) or if it was wood - get waterlogged and degrade. Burnt things may burn and eventually be nothing but ash.
* A deformable terrain system is more complicated and requires more work :
** If you use simpler 'pre-canned' states-of-object-damage, you have to PRE-create all the additional variations of the mesh/textures for all such objects (ALL objects in the game could be subject to such damage). Many are just texture changes, others are mesh changes, while others may be the object blown apart and now in little pieces strewn about.
** A complex on-the-fly 'Patch' systems requires 'damage effect scripts'(programming) to modify an object's mesh patterns appropriately.
** It is possible that both systems could be used, with the more complicated/difficult scripting method being reserved for the most visually positive effect (or those of most interest to player interactions).
** A problem with complex 'Patching' is : A unique set of data is created and it has to be saved in the Server (and sent to any client which has a view of it). ( Note - Complex damage shapes increases the Client rendering load.)
** One advantage to script-based patching is many damage patterns are similar and the same scripts can be reused for different object types (the damage scripts can be 'parameterized' for variations like concrete vs stone vs wood). You would then not need to create 'canned' assets for every possible state (and combination of effect states).
* This system allows great variations of terrain :
** In styles and colors, and in the state of different sections (clean/grubby/damaged/obliterated)
** Compatible substitutions can be made with wall section replaced by: a utility access hatch, or a window, a small alcove, a builtin bookcase, a fireplace, etc ... Same for floors and ceilings.
** Details (separate objects) can then be hung on the wall surfaces or attached to the ground -- allowing even more variations.
* Players 'Repairing' Rapture :
** Terrain can start as bombed out/waterlogged/moldy and be incrementally fixed up.
** would cause wall sections to be cleaned/restored/repainted/etc... or the old rubble'd section removed and a new intact section put up in its place.
** A player may have to 'take down' a wall section (they are built modular after all) to get at whats behind it to do repairs (pipes, electrical lines, to get at a leak in the concrete structural wall behind, to extract the dead Splicer that's been creating a smell, etc...).
** Sections from other locations can be (salvaged and) brought in to replace wrecked wall/floor/ceiling sections when rebuilding an area.
** There are still many wrecked 'rooms' even in the showcase City Center that were closed off 'til later'. They can be restored to 'pristine' state (... eventually - a be a high value property for the player who fixed it up.)
--- --- ---
--- --- ---
Modular Construction - Objects & Patterns :
Buildings would be assembled out of a variety of standardized Object types :
The Outer 'structural' Walls define a space. These Outer-wall building blocks fit together in related sets only certain ways. They need to define a closed space - with the walls keeping the ocean out, and doorways and other portals (utility conduits, windows, etc..) have to exist to allow access. Some sets of patterns are 'expandable' - example- where there are two end walls but middle sections can be replicated in a row to define a needed dimensional space. Floors in a high-rise likewise would be repeated (stacked) to achieve the required size of the building.
Modular Windows penetrate the Outer Walls and are an important factor that shapes other building details (that have to be adapted to their shape and fit around them). Various window sizes/shapes would exist and the Outer Walls would accept inserting windows at certain predefined points (slots). Some building do not need windows and the slots would not be used and there would be a plain blank wall there instead.
'Section' objects fit inside the space defined by the Outer Walls, and are composed of floors, 'Inner walls' and 'Dividing walls' (which themselves optionally have doorways/portals/windows thru them). A number of Section layouts can be substituted with different combinations suited to the intended use of the space.
The 'Section' divides up the space into rooms/closets/hallways with the specific placement of walls/doors. We've seen shops with windows set into interior walls (ex - Pawn Shop in Paupers Drop...). Some interior 'walls' may be in the form of cabinetry (ex- shelves and bookcases built into walls).
Walls/floors/ceilings have some repeating structural pattern based on supporting beams and the structural surface sheets. These details are usually hidden so can be chopped up/fitted somewhat irregularly (fractions) to match the required dimensions.
Once the Inner walls and floors/ceilings are placed, they can have decorative surfaces attached to them (working around/fitting any portals). These Surface patterns are flexible in their dimensions and have fine repeating patterns that allow them to be adjusted to fit a required position/placement. Often margin strips can be adjusted to make up the difference between the space available and a fixed size pattern tiling.
Behind the walls there is space left for vents, standard pipe and utility lines and equipment which have fairly standard positionings (unless otherwise specified). These utility conduits usually penetrate structural floors at well defined standard points, but if needed the modular floors can be adapted to any combination required.
Some structural building Sections fit sets of much thinner (non-structural) floors (different from diagram). The position of those floors can be more varied (like open spaces, split levels, support struts, balconies, railings, open staircases, and other such building blocks). A common building 'Section' pattern might be 2 stories tall (think of various places in Poseidon Plaza) and allow variable placements of floors/stairs/railings, allowing a much more interesting split level arrangement.
Adjacent buildings will 'link-up' connecting the buildings external portals. There is a great deal of flexibility in the ways buildings are linked (the viaducts walkways have turns/angles, 'T's, 'Y's, upsteps, support attachments, and having a stretchable straight section would allow an algorithmic 'fitter' program to do most of the hard bits in a connector tool (Its what the auto-generator system would make use of)
--- --- ---
Terrain/Object Substitution/Deformation :
Allows substitution/replacement with a 'damaged asset' or when repaired to a 'nice clean asset'...
Layers that let you get to the 'detailed' bits of Rapture and more realistic presentation for different places (crappy residential apartments have bare concrete walls and exposed pipes, etc...)
Players and the Auto-Generation system can have alot of options to work with, to create more 'unique' terrain.
Mechanisms 'behind the walls' (can be abstracted until someone 'opens it up' and then 'built-on-the-fly' can compose an appropriate detailed set of objects). Logical patterns of utilities are part of a 'rooms' pattern/template, controlled by abstract attributes associated with the 'room'/'section' object.
Divisable Objects (unitized repeatable patterns - think of them as 'tiles') - Consolidated objects that allow piece-wise modified. Start as large common pattern object (to simplify Database and rendering) but as soon as some unique change is made that 'large' grid object can be broken down into a group of smaller unit objects that now can individually be substituted to reflect the change (like a large hole you can see thru at one point and the rest of the wall still intact). An example would be a floor (one object) of all the same 'tiles' replicated as a grid. When one tile is broken the large object is broken up adding the new single 'broken' tile and then the surrounding floor in as few objects (smaller grids normal tiles) as possible -- No need to break a 10 X 10 tile grid object into 100 separate tile objects when 5 objects will work. Further damage would cause those grid to be broken up more, if needed.
Mutatable Objects - Not just substitution but objects with a 'mesh' shape that can be changed/deformed to reflect the changes made (and become permanent data). Ragged holes can be made and even overlapped cumulatively making the damage look alot more realistic.
Deformation 'in-depth' - Large deformations can effect many adjacent objects and even object of different kinds --- not just wrecked wall section but wrecked decorative layer and wrecked decorations/fixtures mounted on the wall, and damaged utilities behind it and marks on the structural wall behind that. Debris gets strewn on the floor.
With repairs (Player/NPC actions), individual 'tiles' would be automatically (Server function) re-merged with adjacent similar objects to simplify the data/processing (and the rendering load on the Client) and the simpler grid objects can wait until the next damaging effect (if ever).
--- --- ---
Structural Insulation and Heating (details behind the walls) :
The Sea Water outside Rapture is ice cold and no matter how thick the concrete walls ( which has a very poor insulation factor ), heat will be pulled out through them continuously. Water condensation inside will form ice if warmer air is not circulated -- Especially important near pipes and anything electrical, which are usually located between the inner and outer structural walls (utility space).
A constant stream of warm air is created by the structural heating system. Convection from heat given off by hot water circulation in pipes ( from Hephaestus or an independent building unit ) would rise thru the wall spaces and back down again to cross a cold precipitation surface ( the cold outer concrete or metal wall ) to condense excess humidity (which flows down to the sump below the bottom floor). The warmed are would also keep the outer surface above freezing temperature to prevent ice formation.
Only a moderate temperature needs to be maintained in the utility spaces to prevent icing and the living space is to be kept at a somewhat warmer temperature (local thermostat control).
Insulation should be located on the hidden side of the inner walls/ceilings/floors to prevent heat loss from the living space. The regulated ventilation/environmental systems keep the living space at the appropriate temperature.
Insulation would be something with a sufficient insulation value ( air pockets and dissimilar materials and something water/moisture wont degrade ).
Some (more expensive) residences may have under-floor heating.
These details are visible in areas where there is much damage ( or in some of those really cheap apartments ).
--- --- ---
Creation Tools (Ease of Use Wanted) :
The different building Objects have 'pattern sets' they belong to and their sub-objects ( objects that would be inserted into them ) likewise have 'pattern sets' of objects that can be substituted.
Construction options are basically picking from a presorted/filtered menu of usable substitutions and the tool will show you what it looks like. Common/logical arrangements ( like the 2 end pieces with a expandable middle piece ) are added as a group together.
Sample (preexisting) constructions would be provided with 'typical' details already assembled so that the user can get going on the interesting bits or modifying and detailing ( most of what makes an interior look unique are the decorations and furniture contents ).
'Fitters' are programming to which the the Editing Player specifies a global choice for a Theme or other overall Attribute flavors, and then the Tool makes the changes and adjusts things with a composition to match. The 'Fitters' logic fills in details matching what the User has specified - and saves a great deal of tedious work.
This all leans heavily on the modular and Hierarchical nature of the Game's Object data, and the ability of Scripted Templates to apply common changes to groups of Objects.
The Auto-Generation mechanism in the MMORPG use alot of this functionality when automatically building up new sections of the City as the Player's Game World expands. City expansion is NOT all random, as from the start major features would be planned out, with data that would guide the way the City would logically grow (Seed Maps). Fortunately, alot of the city is in ruins and pretty messed up, so that what got 'auto-generated' would not have to be as exactly detailed, compared to IF it was all brand new and populated as in 'the good old days'. Much will eventually be rebuilt by the Players, and THEY will add much of the exact detail.
--- --- ---
Auto-Damage Generation :
Damage and destruction - mutating scenery objects :
* Holes that show hidden layers behind (which in turn may have further holes)
* Decals for minor effects (dents, scorching...) similar to what you saw in BS1/BS2 ( except the MMORPG decals are permanent and cumulative -- can mutate into more severe damage. )
Debris :
* Clumps of appropriate materials
* Become objects that can be manipulated by player - these too are group objects that appear to be many small bits but until the player interacts with them (like starts cleaning them up) are simplified to fewer objects to optimize Database and Rendering.
Real Secondary Effects on Utilities/ Structural Objects :
* Sparks/fires -- fires cause further damage that progresses over time
* Leaks/flooding -- puddle objects and bigger effects if there is enough major damage
* Malfunction/disruption of utility services -- systemic damage that effects other object that are 'plugged into' the utilities.
The 'Damage' that the player will see is done by adding additional Objects, and rebuilding the objects meshes algorithmicly on the Client :
* The bulky Object 3D mesh data isn't sent to the Client, instead a set of coefficients are fed into a generator function that builds the required data 'on-the-fly ( including the mutations needed for the 'damage' locally ). The base 'pristine' shape data already exists on the Clients Object Dictionary (a disk database).
* Various static data like textures and basic object shapes would already exist on the client's disk database.
* This also allows presentation (LOD) Level Of Detail for different platforms and detail settings ( simplified data would be built to be shown on less than optimal hardware ).
--- --- ---
Creations of Special 'One-Of' Buildings by Players :
Some buildings have too unique a shape to have more than one in the city, with some kind of grand architecture or some really distinctly arranged and decorated building spaces. Players may submit them as such or the community/company will decide to make it a special building (things seen in the Previous Solo games are assumed to be acceptable).
An environment in which the new unique buildings can be correctly placed will be determined, or will be selected on the city map which is appropriate - Substituting it for a 'closed' spaceholder building, preferably away from where large numbers of Players have seen it. Placeholder buildings might start with a jumble of debris and obscuring seaweed so that the outside shape was largely indistinct. Placement "Off in the Ruins" may be the simplest method as long as the buildings proper environment restrictions is met. ( You wouldn't have a Grand Museum in the middle of the warehouse district ... ).
Once the Asset exists (created, accepted and published), it may be placed in different location in each Server World. Some of these special building may be 'special' only in their interior and so can have a generic building outside, making them more flexibly placed.
Units smaller than complete buildings likewise can be treated this way -- Special shops or Arcades can fit in any standardized compatible 'section' slot in a building. ( In some cases the business originally owning a 'shop' may have had more than one replicated in different locations in the city ). They would get placed in the appropriate environment ( ie - a Shop in a building that is a group of shops, a Residence in a high-rise or 'court' style apartment block, etc ... )
Such buildings may have complete details - Including business/brand names, with signs and advertising ( which can be inserted in other parts of the city ). Some will represent 'working' establishments - To be run by NPCs to populate the rebuilt city areas, and others will have damage of various extents applied and be put in 'The Ruins'.
Hopefully, many such building will be Manually created as they can have a more cohesive/coordinated design (and feel) than the semi-random Auto_Generation process can create. Their patterns can then be 'Templatized' so that some of their design can be reused and mutated ( furthering the available patterns the auto-generator can make use of ).
Some significant 'One-Of' buildings (like the Stadium), which would have many New Rapture activities tied to it, will be requested in advance/early from the Player Creation Community ( If the company Developers don't just do it themselves ). There probably will be many such building locations in the city ( We really don't want Rapture to look like all of the City was built cookie-cutter and be bland and repetitive ).
--- --- --- --- ---
.
.