Friday, 24 February 2012

Location, Location, Location

The past few days I have been working on the "Location" object class and a generator that assigns a bunch of random stuff to it. A print out of a randomly generated bare room looks like this,

Location: Asylum.
Inside: true
Size: 4
Darkness: 0
Fatigue: false
Balance: 11
Sight: 0
Water: 0
Submerged: false
Density: 15
Text: You enter a deteriorated asylum. A large root system has broken through the wall, tearing up cobble stone and making footing unsafe.

Location will define the name of the location and text tip that pops up when you hover your mouse above its icon.

Inside is a boolean(true/flase) that sets whether the room is an inside location or not.

Size is representative of how many objects may possibly be found in the location.

Darkness is whether or not their are any lighting problems in the location. Darkness will apply a negative modifier to hit. Dwarves and Orcs etc will not need to worry about this as they will have dark vision.

Fatigue is whether or not the environment is draining on the character such hazardous weather conditions. Fatigue affects a characters hp, mana, and energy recovery rate forcing them to make camp.

Balance indicates that footing may be unsafe at times, as was generated in the above example.

Sight indicates sight limitation such as fog, in which dark vision will be rendered useless.

Water indicates water levels within a location if it is flooded and Submerged is a boolean that indicates a room is completely flooded and the player must go underwater to pass through.

Density indicates the solidity of the dirt in the location if a player wishes to dig there.

Finally text is a representation of the basic features of the room.


If these rooms are going to be any interesting at all I need to fill them with stuff! This can be anything from enemies to tapestries. The items in a room will fill out a room and to its descriptive text. I will also be adding "situations" to the items within a room. e.g. monsters that are sleeping, an NPC that is a slave etc. I will also be adding enemies that favor certain environments, bats in rooms that are pitch black for instance, or water serpents in the flooded areas.

So to recap these are the key factors,
LOCATION -The key features of the location
CONDITION - The special parameters of the location
CONTENT - The objects / enemies within a location
SITUATION - Any special behavior objects in the room may have

Anyway time to go and make some objects to fill these rooms. I might start with something exciting, like a chair... or a bookshelf...


1 comment:

  1. Hi, just got here from JGO. I like the game idea, here's a suggestion. For making objects(e.g. a chair or a bookshelf) you should have a higher class, like class "entity" or "GameObject".