View Single Post
  #14  
Old January 1st, 2009, 12:26 AM

Omnirizon Omnirizon is offline
BANNED USER
 
Join Date: Dec 2007
Location: Illinois
Posts: 1,133
Thanks: 25
Thanked 59 Times in 36 Posts
Omnirizon is on a distinguished road
Default Re: Fourth Age screen shots

original inspiration were roguelikes and games like ogrebattle. thus, graphics are not a big deal. if i get monochrome style sprites like in ogrebattle's world view i'd be thrilled.

for time frame i really am aiming to have a very short demo release before i start back to school. (un)fortunately, i didn't take my own advice and have decided to use a hierarchical equipment system to mirror my character body system. i've had to work out a way to represent bodies, a system to parse out items into body shapes, and a way to equip items and determine that characters have the correct body shapes. fortunately, i've finished this. i may have to tweak it though. the hardest part was actually writing the function to parse out the hash tables i store the data in into instances that can be called for equipping and getting values from items. Really, such a function was unecessary since I could have directly coded all items as instances of a the item class with all info filled in; however I really wanted to be able to store items in hash tables because it is a bit easier to modify things that way with a function to parse out the hash tables into instances.

Code:
'Human'	:{
	'Human' :{
		'head'	: 2,
		'thorax': 5,
		'abdomen': 5,
		'arms'	:{
			'left'	:{
				'arm'	: 5,
				'hand'	: 2
				},
			'right'	:{
				'arm'	: 5,
				'hand'	: 2
				}
			},
		'legs'	:{
			'left'	:{
				'leg'	: 5,
				'foot'	: 2
				},
			'right'	:{
				'leg'	: 5,
				'foot'	: 2
				}
			}
		}
	},
the numbers are the hit points associated with each part of the body...

here's an item:

Code:
'right'	:{
	'hand'	:{
		'right leather glove'	:{
					'foo'   : 3
                                        'bar'   : 5
                                        }
		}
         }
here, the right leather glove fits on the right hand. notice that since the only part of the hierarchy that it requires is the 'right' ---> 'hand' that it can fit on anything that has a right hand. 'foo' and 'bar' are attributes of the right leather glove. I had to write a function that rewrites this hash table as:

Code:
itembody['right leather glove'] = items({'right' : 'hand'})
itemvals['right leather glove'] = items({'foo' : 3, 'bar' : 5})
for me, it is easier to just add items to one big hash table that can be parsed out no matter its shape.


things that have more than a 'left' and a 'right' arm will be stored like:

Code:
		'arms'	:{
			'upper'	:{
				 'left' : {
                                          'arm'	: 5,
	               			  'hand': 2
...ect
whats important is the shape of a hand since a left and a right one are different. the hierarchy _MUST_ reflect this, thus it may require some tweaking to make things fit right, but hopefully the way it is now will work. the only trouble I can predict is if i have to make explicit that a 'hand' is actually a 'Human' ... 'hand'. notice that already on the 'Human' body I have the thorax, abdomen, ect as values of 'Human' indicating that those are human thoraxes and ect.


at any rate, the equipment system foundation is finished and I will be progressing on fleshing out the game world now. i'll post some screen shots very soon, but there isn't a whole lot more to show in a graphical display for right now.

Last edited by Omnirizon; January 1st, 2009 at 12:48 AM..
Reply With Quote