Page tags

Add a new page

The Environment structure covers the coding of the various stages or arenas in the game. This page will cover the planned methods used to store, display and output the environmental objects used to build a stage.

This is disjoint from collision detection, which is dealt with by the physics engine.

Basic Overview

For those unaware, this project is intended to be undertaken in the style of '2 1/2 D' This means that while all objects will be drawn and rendered in three dimensions, and that the camera will have a varying degree of freedom, all interactions will occur on a flat 2 dimensional pane roughly parallel to the screen.

Might go without saying, but it is worthwhile to point this out regardless. This means that the camera will be very loosely controlled by the player, if at all during gameplay. Excessive detail on environmental objects will thus be wasteful. It's important for then environment to not appear blocky, but a lot can be done by manipulating surface normals (Smoothing), bump mapping and cheaper methods ideal for improving the look of an object at a distance.

Object Storage

Tiling system

I have decided to use a tiling system to hold information about some of the stages in the game. There are several reasons for this.

-It makes the game highly modifiable. With tiling, we can change one part of a level without having to remake the whole level. Would a platform work better a couple metres to the left? I can do that for us by rewriting a single line of code.
-Allows artists to work on individual objects instead of a scene. This way, 3 artists can work on a level without clunking heads. While there are other solutions, this one is extremely painless.
-Collision detection will be made far easier by being broken down into parts; as an extension it makes sense to do the same for our objects. Especially floating tiles.

Note that this only applies to some objects, particularly floating platforms or any objects that undergo any form of animation. The majority of the level will be a single scene, preferably with the foreground separated from the background.

Storage Format

There will be a main class, c_Stage, which will have several classes inherited from it; one for each stage in the game.

Loading a stage will consist of passing a parameter of c_Stage into a function; this parameter will be one of the classes with c_Stage as an inherited class.