I created a Unity game that simulates a Hunger Games sort of scenario. The idea was to make it as modular as possible so that users could control virtually everything about the characters, weapons, and arena via XML.
For example, the user can create different types of bodies and define each body part. The body is organized as a tree, so in a human body if a pawn’s leg were destroyed then it would follow that their shin and foot would become unusable. Here’s an excerpt from a human body definition:
<BodyPart Name="Left Eye" ParentName="Head"> <MaxHealth>3</MaxHealth> <IsRoot>false</IsRoot> <IsBranch>false</IsBranch> <CapacityFactors> <CapacityFactor> <CapacityName>Sight</CapacityName> <Factor>0.5</Factor> <WeakLink>false</WeakLink> <Influences> <DamageType>Any</DamageType> </Influences> </CapacityFactor> <CapacityFactor> <CapacityName>Pain</CapacityName> <Factor>0.7</Factor> <WeakLink>false</WeakLink> <Influences> <DamageType>Any</DamageType> </Influences> </CapacityFactor> <CapacityFactor> <CapacityName>Manipulation</CapacityName> <Factor>0.5</Factor> <WeakLink>false</WeakLink> <Influences> <DamageType>Any</DamageType> </Influences> </CapacityFactor> </CapacityFactors> </BodyPart>
An example of a capacity modifier:
<CapacityMod Name="Steadfast"> <CapacityName>"Pain"</CapacityName> <Description>"You handle pain better than most people."</Description> <Modifier>2.5</Modifier> </CapacityMod>
Each body part can affect the capacities of a pawn. The eye body part affects the sight capacity by a factor of 0.5, which is to say that if a pawn has its eye destroyed, its sight becomes 50% worse. If both eyes are destroyed, its sight capacity falls to 0%, which affects its abilities in combat and so-on.
An example of a weapon:
<Weapon Name="Lead Pipe"> <Usefulness>8</Usefulness> <Damage>8</Damage> <Range>0.6</Range> <AttackSpeed>1.2</AttackSpeed> <DamageType>Blunt</DamageType> <IsRanged>false</IsRanged> <MissText>%PAWN swings their lead pipe at %ENEMY, but misses</MissText> <DestroyText>%PAWN crushes %ENEMY's %PART</DestroyText> <DamageText>%PAWN clubs %ENEMY in the %PART with a pipe</DamageText> <KillText>%PAWN beats %ENEMY to death with a lead pipe</KillText> </Weapon>
Usefulness determines whether a pawn should prioritize a weapon (for example, a lead pipe is vastly preferable to a flimsy stick).
An example of a character:
<Character Name="Johan"> <Attributes/> <Aspects> <Aspect>Clumsy</Aspect> </Aspects> <Competencies> <Competency Name="Strength" Value="4"/> <Competency Name="Marksmanship" Value="7"/> <Competency Name="Vitality" Value="3"/> <Competency Name="Constitution" Value="5"/> <Competency Name="Dexterity" Value="4"/> </Competencies> </Character>
There is also a built-in editor for existing characters, however it lacks the ability to modify the aspects assigned to a character.
The map is a dynamically generated mesh using the Unity terrain object. Patches of dirt and sand are added using simplex noise to determine which vertices have which texture. Objects are scattered on spots all over the map using raytraces. There’s a day/night cycle where the amount of light affects the visibility on the map, and therefore how effective some pawns will be with their weapons. There’s also a set of controls on the top left which allow the user to speed up time, pause, check the event log and open the stats of a specific pawn.
The action log allows the user to see exactly what is happening, in depth. The character inspector lets them see the vital stats of characters and their current action.
This is technically abandoned although with a bit more polish i think it would be something worth releasing. In its current state it still needs some work.