Game World R-GW-1,2,3,...,11 |
||||||||||||||||||||||||||||
Elemental GameElemental
Game is the entry point to the program. GameFlow InterfaceThe GameFlow and EditorMode
are designed to be interchangable.
|
bool manualOverride; | // Enables and disables controller override |
bool attackPressed; | // Triggers an attack using the current player attack mode |
bool shieldAttack; | // Triggers usage of the shields |
float elementUse ; | // Gets values from triggers for terrain mod and firing attacks |
Vector2 playerMotion ; | // Modifies the player's world position |
Vector2 playerRotation; | // Modifies the player's orientation |
Game.ElementalMode modeSwitch; | // Selects and element |
|
|
Character model size shall be in the range of:
Min
|
Max |
|
x
|
100 |
150 |
y |
100 |
150 |
z |
70 |
120 |
where x is the width, y is the height, and z is the depth of the model within Milkshape.
Particle are the basis for weapons and sheilds for Humans and AI's
Attacks using Low-Poly particles
of Earth, Air and Water.
Particle scale should be as small as engine stress testing allows.
For example, we eventually
we want to create sand size earth particles.
Water should be small enough to simulate a unit of cohesively bonded water.
Air should be small and plentiful enough to float freely around the grid
space.
Heating and Cooling of particles is done through the use of the Fire element.
Changing the temperature of an element causes it to begin reversing that
change by disappating into the air or to other elements.
Eventually these temperature changes should also propegate to props.
Direct Attack particles react to the environment.
They display real collision physics against other Game Objects.
Attacks will drain manna based
on the impact force and heat value.
They can be aimed using the controller and the hud targeting interface.
Attacks using High-Poly particles
of Earth, Air, and Water.
The player may move in and out of these particles.
If inside, the player is effected by applying damage to health.
If shield is up for the corresponding particle, player gets manna.
Particle scale should grow
as effect animation unfolds.
We control this using a radius value that expands over time.
All animations have scale
and temperature components to modify the effect.
The radius value is used expand the scale of the bubble and to propegate
wave patterns through the effect.
The temperature value is used to modulate between textures applied to
the particle.
Earth
Particle effect is a sand storm with a fracturing earth quake.
Sandstorm is done by rotating
a semi translucent textured particle using a quaternion.
For added excitement we randomly terrain mod a fracture around the area
particle encompasses.
When the particle "pops", the final state of the terrain is
kept.
Water
Whirlpool Flood.
Whirlpool is accomplished
by collapsing the particle to approximatly the player's eye level using
the vertex processor.
It should be rotated and have a wave pattern that sweeps IN - WARD towards
the center.
Forces should be applied to the player moving it in an inward spiral towards
the center of the whirlpool.
Rotation should be accomplished using a quaternion.
Air
Lightning Storm with Gale Force Winds
Lightning Storm is accomplished
by applying a semi-translucent cloud to the particle and shooting down
spikes of lightning using an inverted version of the fire effect.
Gale Force Winds are accomplished by applying random forces to the player.
Forces should be applied to the player moving it in an inward spiral towards
the center of the storm.
Rotation should be accomplished using a quaternion.
Shields allow the player to
protect themselves from hostile attacks.
Shields will be implemented using a translucent colored globe dependent
upon the selected element.
Shield interaction will occur
via the particle system.
When a shield corresponding to the particle is used, player will not be
damaged, but instead will gain manna.
Shields are effective for both Direct Attacks and Area of Effects.
The terrain of the world can be manipulated by the player. The objects on the map can also be moved or destroyed by the player. In this section we will describe how the terrain and object modification will be implemented.
The terrain is loaded from a 2D bitmap image and scaled to create a large playing surface. The height values are stored with black = lowest and white = highest.
The vertices for the surface are generated from the 2D bitmap and stored in a 1D array which stores the normal, position and texture coordinates. This vertex array is then passed to the vertex buffer and an index buffer stores the indices for the triangles.
A collision detection map is also generated from the original 2D bitmap. This is also a 2D bitmap that has been scaled with height values interpolated between vertices to provide accurate terrain collision detection.
To change the height at a vertex, we change the height at the specified position in the original bitmap, recalculate the normals for that position and its surrounding points, and propagate the changes into the vertex buffer and collision map.
There will be various "brushes" that the player can use to modify the heightmap in different ways. For example, they can either just change one vertex at a time to create spikes or use a gaussian brush to raise mounds.
The terrain height map is
generated from a gray scale bitmap.
Each pixel represents a vertex and the color value of the pixel represents
the y-coordinate height of the vertex.
The vertices are stored in a vertex buffer that is scaled by a preset
scale factor when drawn.
This scaling factor is also applied to the collision map.
The Collision map is generated by scaling the terrain height map.
Interpolation between the original values gives us a more accurate collision
map to reference when doing Object to Terrain collision detection.
Terrain can be raised or lowered
by any Player.
Terrain Modification must change the appropriate vertex's y-value
and update the normals, the vertexHeightMap and the collisionHeightMap
appropriately
The entire game world will
be enclosed in a Sky Sphere.
This is a traditional "sky box", except it uses very large low-poly
sphere with a texture to create a more realistic sky.
The ParticleManager will be the top-level class which will be in charge of controlling all the different sets of particles.
It will contain six main objects - AirAOE, WaterAOE, EarthAOE, AirDA, WaterDA and EarthDA.
These three objects will each be a ParticleSystem class.
The main job of the ParticleManager will be maintain these three objects independantly.
Contains three lists of particles - staticParticles, dynamicParticles and thermalParticles.
Each ParticleSystem will be in-charge of maintaining all of it's particles.
The ParticleSystem will handle moving particles from one list to another.
It will perform the following functions for each list separately-
staticParticles - Only a Draw() function need to be called for the particles stored in this list.
dynamicParticles - An Update() function has to be called for these particles in addition to the Draw() function. The ParticleSystem also needs to call each particle's UpdatePosition() function and update each particle's boundingSphere position based on it's new position.
ThermalParticles - An UpdateHeatDissipation() function will be called on these particles. This function will cause the particle to dissipate it's energy either to neighboring particles or to the environment. A Draw() function call is also required for these particles.
A particle is only allowed to be stored in the following combinations - only static, only dynamic, only thermal and dynamic-thermal.
A particle is a simple low-polygon
model if its a Direct Attack particle.
If the particle is an Area Of Effect particle then it will have have model with a higher polygon count and scaled.
<see physics>
<see shaders>