Group Focused Survival Game System

Get Started. It's Free
or sign up with your email address
Rocket clouds
Group Focused Survival Game System by Mind Map: Group Focused Survival Game System

1. Environment

1.1. Procedural Cities

1.1.1. Destructible buildings

1.2. Procedural, editable terrain

1.2.1. Limited/realistic. Able to move small amount of material, such as digging holes, not moving mountains.

1.3. Building and barricading

1.3.1. Ability to nail planks and furniture and such to barricade windows and doors, or strengthen weak walls etc, using the Q and E action system.

1.3.2. Realistic building system. Build using planks. Hammer a bigger plank/log into the ground to use as a foundation, build planks out from that log. (Possibility to Hold and drag to add multiple planks to create a wall/floor faster if the AI system is not capable of helping). Pour cement in molds made using planks to make concrete walls or place stones to make a stone wall. The system should automatically group planks together which form walls so they share hitbox and stress calculations in order to increase performance and make placing thousands of planks mana gable for the computer.

1.3.3. Update the NavMesh when building so that if you make a floor (or slanted floor, or step etc) NPC's can still walk on player made structures.

1.3.4. Blueprints A piece of paper acting as a "screen". You hold it up in front of you and when looking through it you see sketched style outlines of the structure you're building. You can edit blueprints just like building except you don't need the materials and you can use other blueprints you have saved as modules so that you can deign a room from the ground up once, then copy that room next to each other to make the first floor of a building, then copy that first floor to make the second floor etc. This allows for blueprints of huge structures in very little time. You can also duplicate the blueprint onto a blank paper so that others can help you build your design, and save the design to be used later. The NPCs can help you build by following your blueprint if you give them one, thus reducing the time it takes to build large structures drastically and emphasizing group survival. The NPCs (and players) build the structure piece by piece and must therefor be able to reach all the pieces during construction, scaffolding will therefore be an important tool to help with accessibility. It will not be a part of the blueprint however, but placed down and moved around dynamically by the NPCs as they need to reach places, basically acting like ladders which are added to the nav-mesh to help the NPCs navigate. This leaves a lot of room for player oversight, the player might be able to make the process more effective by ordering scaffolds to be placed in certain positions or removed once a stair is completed, or the player can just let the AI do it's thing alone.

1.4. In Game Time Problem

1.4.1. Since only the most hard core of players will want to play the game in real life time changes will have to be made for how fast the time moves in the game and how to balance this to keep the game as realistic as possible. The discrepancy arises from the fact that the player (and other NPCs) move in real life time. There's also the need to speed construction and crafting up too, no one wants to watch their character stuck in an animation for an hour carving wood. The solution to this whilst also keeping everything balanced realistically is to change how much energy (or more accurately power) certain actions use. An average human worker can output around 75 W of power consistently (More during short bursts, an elite cyclist can output about 400 W). Since energy is Power * time everything balances itself out, if a certain action takes 1000 Joules to preform and times is sped up so that 10 in game seconds is one real life second, that action will obviously be done 10 times quicker in game, so 1000 J / 75 W (W = J/s) => 13.3 seconds => 1.33 in game seconds. When walking at around 1.5 m/s a human uses about 320 W (depending on weight. Note, this is not the same as "power output" which is the work you can actually output). Now if you walk for 100 seconds you will have gone 150 meters and spent 32 000 Joules. This however becomes a problem if we now just take that energy times 10, since one second is 10 in game seconds, because you can't also take the distance traveled by 10 since you are limited to the speed of 1.5 m/s in the game too. Thus some actions (which depend on variables you want to keep the same as in real life, such as speed or strength etc) is involved you also have to use the real life time when calculating the energy used for those actions. This is the main reason why many survival games run out of food very very quickly, the "food meter" is ticking down at a somewhat realistic rate compared to the in game time, but your movement is limited to the speed so you can move and thus do a lot less for that amount of food compared to the same amount of food in real life. Taking this into consideration survival in the game will be as close to real life as possible without having to set the game time equal to real life time.

1.4.2. Sleeping can also become an issue when introducing multiplayer, there are basically two solutions to this problem, remove sleep all together or split the world in two,, and you can alternate between those two worlds when you sleep. These worlds also interact with each other to give the illusion that it is one world, such as copying over progress made in one world to the other when the day shifts to night. To do this seamlessly you would need to change this while there are no players around which could cause some problems. Since this two world split would be very complicated to implement and comes with many ways to abuse the system (such as going to sleep while being chased by enemies to get into the other world and avoid them or building two different buildings at the same spot in the different worlds to merge them together etc.) it is much easier to not implement a true sleep mechanic but rather a rest mechanic, where you have to lie down and rest or you will pass out and passing out at the wrong moment might be fatal.

1.4.3. SLEEP UPDATE: Introduce dreaming. You are placed in a random situation based on your current situation in the game (Such as available weaponry, places you've been too, etc) and need to survive nightmarish/intense experiences. If you survive in the dream you are more likely to discover good loot or something similar the next day, if you don't you wake up and can't go back to sleep for a period of time, causing your character to be in worse condition because of a lack of sleep.

1.5. Heat

1.6. Fluids/Water

1.7. Sound

1.7.1. Procedurally generated sounds based on geometry and material when hitting objects and such.

1.7.2. Sound drop-off proportional to 1/r^2 (Based on intensity of the sound over an area of a growing sphere). Silencers and such only decrease this initial sound intensity based on real life values.

2. Player

2.1. Hunger and Thirst System

2.1.1. Energy from food in KJ

2.1.2. Require certain food (Vitamins, proteins etc)

2.1.3. Limited Energy reservoir, when empty strength stats and immune system deteriorates. Separate reservoirs for separate vitamins, proteins etc, some small some larger).

2.1.4. Water is gained through drinking, lost through actions and passively through breathing/cooling down (temperature dependent).

2.2. Damage System

2.2.1. Each Body part (Torso, leg, arm etc) handle damage separately. Blood is the only thing connecting them.

2.2.2. Body Temperature Body parts will take damage from being too cold/hot. Each body part cools/heats separately based on The law of heat conduction, q = -k∇T where q is the heat leaving/entering and k is the conductivity coefficient which will change based on clothing or how wet (or sweaty) you are. ∇T is simply the difference in temperature of the body part and the outside. Heat is added to the body part by actions, or moving (anything that exerts energy also adds heat). Removing heat costs water (though sweating)

2.2.3. Blunt Force If the Force/Area is low but the force is still large, broken bones and internal bleeding is the result. (HELP, Anyone with medical expertise to determine how to model internal bleeding and healing time etc.)

2.2.4. Sharp Force If the Force/Area is large enough the skin is ruptured causing a bleeding. The depth of the cut/puncture is determined by the object used which determines how much blood is lost per second. (HELP, Medical expertise)

2.2.5. Vital Organs Vital Organs are marked out with hitboxes (or spheres) inside the body.

2.2.6. Fall/body impact Damage Calculated based on acceleration, not fall height. >80g = extreme risk of instant death 35-80g = broken legs and other blunt force trauma (based on how you land), death if head is hit. 35-25g = risk of breaking legs/spraining ankle <25 = safe. These values are just preliminary, the "softness" of a material also has to be a separate variable since simulating grass surfaces as slight soft bodies is too computer intensive. This also allows for the simulation of mattresses and other very soft objects you could land on, whilst if only calculated the change in velocity landing on a mattress will be just as deadly as landing on a concrete block since both set your velocity to 0 over the course of just one frame in the physics simulation (again, assuming no soft body simulations since they are computer expensive). Best way to calculate fall damage would be to have a rag-doll and calculating the accelerations on each body part. This way your legs can slow down the impact and your head/torso might not get crushed.

2.2.7. Armor Penetration of objects into armor is based on the mass, velocity and impact area of the projectile/weapon as well as the density of the armor and the tensile strength of the armor. Exactly how needs to be experimented with (possible real life experiments). The incoming angle will also be taken into consideration with a simple cosine function.

2.2.8. "Downed" system You will only be "Downed", that is not be able to walk and stay on the ground if both of your legs are broken, you cannot be quickly recovered by a friend but they can drag/carry you away to safety where you can treat your wounds and recover (or bleed out and die depending on your wounds)

2.2.9. Blood Every player has a certain amount of blood, losing different amounts of blood will have different effects. If you loose up to 15% of your blood there won't be any noticeable effect. Lose between 15-30% and your strength weakens (walks slower, hits slower, heavy breathing, fast heartbeat etc). Lost between 30-40% and you can still move but blood transfusion is necessary to survive. if you loose more than 40% of your blood you will go into coma if you don't receive blood transfusions and medical care you will die shortly thereafter.

2.2.10. Healing/Recovering is done over a long time, but only certain injuries are recoverable, and it's not guaranteed that you recover. Breaking a leg and letting it heal without any medical attention has the risk of leaving you permanently slower, while medical attention reduces that risk. If you loose a limb it will obviously not recover.

2.2.11. There is a risk of getting sick by many different diseases, both infections from wounds, food poisoning and just regular diseases. Everything operates on probabilities, so if you disinfect a wound and keep it clean there's still a very small risk that it can get infected, the less you clean it the bigger this risk gets.

2.3. Movement

2.3.1. Movement counts as an action, costing a certain amount of energy to sprint, jump, climb etc.

2.3.2. Jumping Deciding which location to jump too is done by looking at the location, moving towards that spot with the movement keys, and pressing space. Your character will then be given a motion vector to make sure you will land on your chosen spot given no outside influence. If the target location is beyond the range of your jumping abilities the motion vector will try to get you as far as possible when jumping. Grabbing ledges is done using the mouse buttons by looking at the ledge and using left,right or both mouse buttons to grab onto the edge. If anything is being held in the designated hand this item is dropped. Obstacles such as fences can be jumped over simply by looking at them and pressing space bar.

2.3.3. Climbing When grabbing a ledge or climbable extrusion from a surface by clicking it with mouse buttons you enter climb mode. You can use the movement keys to shift along an edge or as far as the structure you are on allows. When grabbing onto extrusions you dedicate which hand by selecting the corresponding mouse button. As long as you hold down that button and your strength is sufficient you are grabbed onto that extrusion. To move between extrusions simple shift toward target location using the movement key buttons and press the new extrusion using the mouse. Legs will automatically provide extra support if a nearby extrusion is found. This will be indicated by a symbol in the lower left and right side of the screen, indicating which leg has support, and approximately where this support is so that the player knows if moving further right or left will leave this support structure. Jumps can be made when in climb mode as in normal mode, by looking at the target location. The strength of the jump is determined by the amount of support/extrusions you are holding onto and your characters strength. Double tapping the jump button will cause you to jump in the opposite direction to which you are looking.

2.3.4. Crouching When holding the crouch button the character crouches. In crouch mode walking over ledges is prevented. If up against a ledge, tap the crouch button to climb down and enter climb mode on that ledge.

2.3.5. Crawling Crawling mode is enabled by double tapping the crouch key. When in crawl mode you can get into smaller spaces. To exit crawl mode, use the jump button.

2.3.6. Moving up against a wall and tapping the movement key button toward that wall will cause you to "lock" to that wall. If you come to a corner and keep moving you will lean out and look out of the corner while staying locked against the wall. To unlock from the wall simply move away from the wall a second time and you will push off the wall giving you a small acceleration boost. Only touching a wall will not cause you to go into "lock mode", your force vector has to be facing the wall within a certain angle span, so just running alongside the wall and brushing up against it won't cause you to shift into "sneak along wall" mode.

3. Weapon Systems

3.1. Realistic Gun Mechanics

3.1.1. Realistic Ammo System Magazine and Reload Is a separate entity from bullets Load each magazine with bullets Have a choice between double tapping R to reload faster but drop the magazine on the floor, or spend the extra time to put the empty magazine in your pocket Bullet Different types of bullets, some more common than others based on the production of the specific bullets in real life, this might make you want to use less powerful guns since ammunition is more common to find. Single bullets can be loaded into the chamber of a gun if you are out of a full magazine using the Q action menu on the gun. This action menu also works to check the chamber, take out the magazine to inspect how many bullets you have in it etc. Bullets need to be loaded into magazines which are then loaded into the gun.

3.1.2. Aiming Aiming is done like it is traditionally, the gun is by the hip when you walk/move where you can fire from but with a large spray cone which makes it very inaccurate. With the press of a button you can toggle to aim down sights. When aiming down sights the the barrel of the gun, in other words the front part of you sight, moves slightly, up and down, left to right, it moves in a fluid predictable manner but not perfectly predictable, there is randomness to exactly when it changes direction and exactly how far from center it moves, but it always return towards center. The amount the front sight moves depends on your stance, if standing it moves the most, crouching it moves less and lying down it moves very very little. Tripods and supporting structures can be used to completely eliminate this movement, such as if you are crouching behind a wall you can rest the gun on that wall and reduce the front sight movement significantly. While turning around (making large movements with the mouse) the front sight moves very much thus increasing the "aim cone" a lot. This separation of front and back sight removes the need for an aim cone since if you just aim quickly towards your target and fire as you do in most in game firefights you are likely to hit (the front iron sights only moves a little) but you are not 100% accurate. If you instead take your time to aim and time your shot perfectly you can increase the accuracy a lot. This is also a very accurate representation of aiming a real gun since you do not have control over the small movements your body does when aiming. To experience what this system tries to emulate, hold a pen or other sharp object in your fist, hold out your arm with the pens tip as a sight, now focus your eyes on the tip and try to hold it as still as you can while "aiming" at some distinguishable point in the room. You will notice that you can't hold it perfectly still and that it moves almost randomly. This system should also complicate making aim bots, if the server keeps track of how the front sights of the client move it can determine if the bullet being fired is on the correct path, and in order to stop script tampering with how the sights move a specific signature in the randomness of how the sight moves can be used to pick up cheaters. This signature could be changed during patches of the game whilst unnoticeable to the players anyone modifying the exact movement of the sights will be caught and banned.

3.1.3. Recoil Recoil is based on the momentum of the gun when being fired, not some arbitrary "add this amount of inaccuracy after firing". These variables should preferably be measured by real life experiments, some gun active Youtubers might help out. Recoil does not change the direction you are looking at (Unless shooting really big guns like desert eagles etc to make the player "feel" the recoil) but only increases your aim cone. To give the effect/feel of the recoil the camera should bump, but quickly return to where it started to. "Return to zero" time, the time it takes for the shooter to return the gun to the initial position (in game terms the time it takes for your aim cone to become small). This stat should be both gun and character dependent.

3.2. Mele System

3.2.1. Hitting Works conventionally, clicking with the mouse while holding a weapon swings the weapon and a hit box for the weapon swings to see what has been hit and where. The swing is not "instant"/one frame but over several frames so you can do different kinds of hits (Upper cuts, slicing motions or stabs) by moving the mouse in such a direction. Simply looking straight forward and hitting will cause a stab (if you have a stabbing weapon) while first looking up and then dragging the mouse down while you click or hold down the mouse button will cause a slash from above etc. Very intuitive. There should also be weight to a weapon if you swing and miss the direction you're looking at will follow the sword/weapon in the swing.

3.2.2. Blocking If two swinging hit boxes meet (Imagine the hit box of two swords) they will collide and act according to the built in physics in unity. If two swords swing at each other they will both stop in place, while if both stab and the momentum is forward and the hit boxes meet/hit they will slide against each other and possibly hit/stab the player. This offers different counter attacks for different attacks, if someone stabs at you you have to swipe their sword/ weapon away, if someone swings at you you can block that with a swing or if your are close enough go in for a quick stab while they are looking up to swing. More dynamic and realistic mele fighting than just "Spam click button".

3.2.3. Grabbing If you have one hand free you can grab your enemy. This is done by simply holding down the mouse button of your free hand on the person, if you grab their hand they can't attack using that hand. Your movements are now locked, if you walk, your opponent moves with you, if he walks you move with him, if you turn, you will make your opponent turn, if he turns he will make you turn. Strength stats decides who has the most control. This can be used to either grab a knife so your opponent cannot use the knife, or to just restrain the person, or get an upper hand in any type of fight.

3.2.4. Shoving/Tackle Being close to someone and double tapping forward (assuming you opponent is in front of you) causes you to shove your opponent/ apply a force to your opponent. This works in all directions, so if you are running next to someone you can double tap towards that side and you will shove that person to the side. The person being shoved then has to move in the opposite direction in order not to fall over, so if someone shoves you back you have to press the back key in order not to fall over. (Forward key might be more intuitive but offers little in terms of dynamic play since you're most likely already pressing the forward key when walking towards someone who shoves you.

3.2.5. Dodgeing Double tapping any direction while crouching will cause you to leap/jump in that direction. This can be done before the crouch animation is completed in order to quickly dodge attacks/ hurl yourself backwards in order to avoid a swing/stab or jump behind a wall. Leaping forwards will make you do a roll when you land while leaping to the side or backwards will put you on the ground (and often at a disadvantage)

4. Inventory System

4.1. Action System

4.1.1. Left mouse button functions as left hand, Right mouse button functions as right hand (Option to change flip it). Hotkeys 1,2,3... used to access pockets/bags or rifles on your back (if you have any). Default, hold 1 to get a popup menu of items on your back, 2 for pants, 3 jacket etc. Backpack is a separate item used for storage, not a key used as a hotbar. Hold E over object, select action from popup menu. E is "act on environment key". Example: Pick up, open door, use machine etc. Just pressing the button will use the default action for the object, for example "pick up" if there's an object that's on the floor. hold Q and get action menu for objects you are currently holding. Q is "Act within player key". If two different items are held in each hand pressing the mouse button corresponding to that hand brings up the menu for that item/tool. Just pressing Q quickly without clicking will drop what you are holding, if you are holding two things it will drop the one you're holding in your left/non-dominant hand (can be changed in options). Example: Eat, check ammo, light match etc.

4.1.2. Each action cost energy or/and water to preform, balanced realistically. (Eg, Picking up 1kg of material takes about 50 Joules of energy from the laws of physics. Potential Energy = Mass*g*height = 1 kg * 10 * 1.5 meters. Human body is about 30% efficient, 15 Joules/0.3 = 50 Joules. The 35 Joules not used for lifting goes to warm the body)

4.1.3. Some actions require certain amount of strength, or is preformed faster based on current strength

4.2. Crafting System

4.2.1. E and Q keys also function as the crafting system. For example, if you have a stick, knife and tape/rope available you can pick up two of the items, hold them in your hands, hold E on the third item and "Attach Knife to Stick" will appear in the action menu, used to craft all items intuitively without the need for crafting menus. Certain items might also have "craft like" actions, using Q on a stick could give you the option to break it in half to make two sticks, or pealing off the bark with which you can make string. This also serves to make crafting more realistic, in order to craft more complex objects you need to craft the complex object in stages since you are limited to only interacting with basically thee items at a time. This kind of crafting system also works well with groups since you can have other people (or NPCs) crafting basic ingredients used for other things, such as rope, while you focus on other things. In order to make groups even better and more realistic each time you craft an item you become better at crafting that item. This means you could have one NPC specializing in crafting one specific item (or set of items). Loosing that NPC in a battle will then have a larger impact on you and you will develop a stronger attachment to that NPC. A third purpose of this crafting system is to show how things are actually made. If you want to make a bullet you will need a sheet of brass, a saw/punch out a circle, punch that circle though a tube to turn in into a cup shape, punch it through an even smaller tube, again and again until it has the right diameter etc. This requires tools, such as a hammer, those pipes of different diameters, heating of the brass etc. This would traditionally be impossible to do in a game since you the player can't possibly be expected to preform all of these steps while at the same time having to look for food, manage your surroundings, craft clothing etc, but with a group based system you can have NPCs do all these steps and you can actually see all these steps being performed. Bullet manufacturing might not be the best thing to teach, but this system would teach you how to make many other things you take for granted, such as how to make string, a shirt, a bow etc giving the player a better understanding of both human history and how much machinery and logistics that go into making modern day things, and how hard it would be (yet not impossible) to build these things in a post apocalyptic setting, everything from getting the raw resources to actually building the tools needed to build tools to manufacture the specific thing you are trying to make. How do you drill a hole when you don't have a drill-bit, can you make this drill-bit? This also automatically balances which items are valuable and which aren't in a post apocalyptic setting. Simplifications will have to be made tho in order to limit the huge amount of items/tools required otherwise. Separating tools into classes will help with reducing the work to make all these tools. You might have "Striking tools", "Mold tools", "Hole making tools", "Thinning tools", "welding tool" etc which have the same property but specific subsets of those tools might only work on certain materials or for certain dimensions etc, then you can assign each item a set of sequences in which you need to use these tool classes in order to make the item from raw materials. For example a bullet casings "craft scheme" might look like this: Raw "brass ore" -> Heat tool( 850 C ) + Refining tool (Brass) -> Thinning tool (Brass) -> Circle tool(Brass) -> Mold Tool (2 cm diameter cup) + Striking tool(Brass) -> Thinning tool (Brass, 1 cm Diameter) -> Hole tool (Brass). Each tool has a parameter it has to fulfill, so you can't use a Heat tool which only reaches 500 C. Some tool classes can also overlap, for example a Saw Tool can also be a circle tool (but take longer time to make a circle), so the classes of tools can have sub classes themselves. There might then be lots of different Refining Tools or Heat Tools, Hole Tools etc, each with different materials they can treat, temperatures they can reach, diameters they can cut or time it takes to preform the cut etc. These parameters can also be a span of values and not just a single one.

4.3. Bags/Storage items

4.3.1. Storage items can hold other items and they will be visible inside the storage item. You can use the E or Q key (Depending on if it's a bag in your hand or box on the ground) to open the storage item.

4.3.2. Structurally storage items are built up in layers, each layer can hold a certain volume of items.

4.3.3. Looking through a storage item is done by first opening it, then you see the first layer of the storage item (think "top part" in a bag). Then you can use the mouse scroll wheel to access layers bellow/behind the first one and the layers above fade/becomes opaque.

4.3.4. This forces the player to choose where they put certain items, the top part of the bag is easier/faster to access so you might want to have items such as medical equipment, full magazines etc in the top layer of your storage while items such as sleeping bags/empty spare magazines etc could be stored at lower levels.

4.3.5. This offers a more seamless inventory system with more interesting features than a regular "item slots" styled inventory system. Maximum length of an object can also be specified so you cannot shove long pipes into your small bag just because the pipe has a small volume.

4.3.6. The player can also carry more things in their arms, a certain volume and weight can be pinned under the arms and stacked on top of each other to allow players to move a lot of things without putting it into a backpack but will then not be able to use their equipped item. If items are stacked on top of each other fast acceleration or turning will cause the objects to fall out of the players "hands".

5. AI system

5.1. Relationship system

5.1.1. Each NPC has a relationship with all other entities, NPC or players. This relationship consists of two simple variables which together with the GOP system can form a huge variety of relationships, everything from mortal enemy to lover:

5.1.2. Trust. How much what you say influences what the NPC does (more on this under the GOP section)

5.1.3. Attachment. How much the NPC values your well being, i.e how high it prioresses your well being in the GOP system. (can have a negative value for enemies).

5.1.4. How certain actions influence these variables is determined by the NPCs personality. Each action (or consequence of an action) has a determined way it will influence Trust and Attachment. The set of these "influence values" is what makes up the personality of the NPC. These influence values are also subject to change based on repeated prolonged interaction/actions, such as a player constantly stating the value of surviving at all coss which might lower the influence value of killing strangers in the NPC if the player stating these things has a high enough trust value.

5.2. The AI system is at the heart of what makes most other features possible. The NPCs can function as other players and assist (or cause problems) for the players. Both the Crafting system and Building system heavily relies on the use of NPCs to make progress in the game. It is still playable alone, but with almost the same limitations of being alone as in real life. This also solves the problem of groups of human players playing together in a multiplayer scenario gaining a huge advantage since an NPC is just as capable as a human player (except a lot dumber) and the person controlling the most NPCs will have the most power and not the largest group of players.

5.2.1. Goal Oriented Planner (GOP) Each NPC has one or several goals to achieve, the priority of these goals are determined by the "personality" of the NPC and the health/desperation of the NPC. In any given situation the NPC has a list of actions it can preform and actions others might preform around it, each action is linked to a consequence/ change in the environment which can either add new available actions or achieve a goal. The NPC searches through all (or a limited number of steps ahead) available actions it can preform and chooses the one with the highest probability of achieving it's goal (or being closest to it based on a heuristic function). Each action also has a perceived probability of success, this set of perceived probabilities is what determines the NPC's personality. If actions involving actions are rated with a low probability of success the NPC will behave "kindly", if actions involving interacting with others has a low rate of success the NPC will be very quiet whilst being very talkative if the reverse is true. This should create a very dynamic and differing personality to all NPC's without having to explicitly needing to add different personalities. These probabilities can change over time based on the success rate and interactions with other NPCs or players. If another entity (player or NPC) informs the NPC that a certain action has a "high" probability of success it can change that probability value within itself if the NPC "trusts"/has a positive relationship with the other entity. This allows to convince NPCs around you to do as you want while also adding group dynamics with leaders who are more trusted etc. In the case of the probability values of actions preformed by others around the NPC these probability values are strongly influenced by the relationship to that other NPC or player. Setting up specific goals determined by the player allows for the player to give tasks, and prioritize those tasks (assuming the player has gained enough influence/trust over the NPC). This allows the player to become the leader of a large group, setting up rules of what they should do under certain situations. One example might be a player on a multiplayer server wishing to dominate the server and telling his NPC companions to look for other humans and either kill them on sight or disarm and subdue them and bring them to the base so the overlord player can determine if this human is a player or not and then hold him captive, ask the other player to join him or just play around with him for fun.

5.2.2. Chat System with AI Find verbs, subject etc in a sentence, Links them to actions/objects in game and informs the goal oriented system. A relatively large database of words linked to game objects and "small talk" is needed. The reverse is done when the NPC talks, it has the actions and objects/game entities it wants to communicate but not the sentence to express it. Example: NPC is trying to survive and running low on food, if the GOP then determines that informing the player of this and the player responds with " There's probably some food at the dog shelter" the chat system will link "food" with "dog shelter" and the GOP will update its parameters to include a probability of food in dog shelters which might cause the NPC to go look for food there.

5.2.3. Setting up all the parameters Setting up all these thousands of parameters for every action and consequence in a functional and natural way is a huge task which if done by a human could either make the NPCs very limited or make them function very poorly in their environment. Instead of doing this manually an evolutionary algorithm can be used to determine these values. The Evolutionary Algorithm: A lot of NPCs are initiated with random probability and influence values. A fitness function is then determined, for example health of the NPC, and if you want love to develop adding having a child (which would have to be an action only performable between two NPCs of the opposite sex) should also be a part of that fitness function. In order to have a good fitness function time spent alive should probably also play a role since at the start of this algorithm many NPCs will do idiotic actions and kill themselves almost instantly by just random chance. You run the game/environment for a certain amount of time letting the NPCs interact with other NPCs and the environment, some die, some survive longer,. After this run of the environment you score each NPC and remove the ones preforming poorly while reproducing and mutating (randomly changing the probability and influence value slightly) for the copies of the ones preforming well, whilst also keeping the original. It's vital to not only take the one NPC who preformed best since this will not give a variation to the probability and influence values and will only produce one "type" of personality in the end and not a large set of them. This process is then repeated thousands of times until the NPCs are very good at navigating their environment and interacting with other NPCs. If the chat actions used by the NPCs to communicate are set up in a natural/good way these chat actions will convey the correct meaning to the player as well. (For example if the action of saying "Supplies in this area" has the consequence of "increasing the probability value of finding food in that area" then the communication between Player and NPC will not be much different from the communication between NPC and NPC. However, these actions and their consequences has to be hard coded into the game, they are basically what makes up the environment of the game.

6. An immersive sim survival game where group dynamics and realism plays a large part of the game. NPCs who behave in a natural way is a large part of the game mechanics and allows for the construction of communities without the need for lots of players running around doing mundane tasks. This breaks the classical "lone survivor" feeling that most games have and has you spend a lot more time on managing the group as a system, setting up construction sites, "manufacturing lines" of people crafting different things or just managing relationships in a natural way instead of through click menus or similar mechanics, but through chatting with the NPCs and doing things for and with them. Pop up menus can still be used for stressful situations where typing is not an option and if the player does not want to use voice recognition. This system is not yet complete and there is a lot of detail which need to be added (especially in the environment and procedural city part).

7. Optimizations

7.1. In order for the game to run smoothly with many many NPCs and structures, optimizations has to be done. The core of these optimizations is not "faster running code" but rather simplifications.

7.1.1. Simplifying NPCs If you have NPCs around you which you have told to craft certain items or build certain structures etc, and you leave the area the computer can simplify what the NPCs are doing to the pure mathematics of what is happening. If the NPCs are gathering resources from one place and using them to build a house, the movement and whole decision making process of the NPCs causing them to behave in this manner can be erased and replaced with a simple script that reduces the resources from the area where the NPCs were getting them whilst adding the materials to the building they were constructing. This vastly reduces the complexity and computation required. Whenever a player enters the area the NPCs can be placed back in "random but logical" positions within that area and continue their work. In order to stop exploitation where the NPCs become invulnerable from other NPC attacks (such as zombies or other humans, whatever the threat might be) a threat assessment is done by the computer before the player is leaving the area. If the area is surrounded by hostiles in their way towards them there's a high risk of the NPCs being dead when the player returns to the area, if there's no hostiles in the area there's a very low risk of the NPCs being dead or injured, but there is still a risk. Scavenge missions can be treated the same way, the NPCs disappear from the players sight, get replaced with a chance of success rate to find something and a chance of injury/death, then they return after a while. In order to make it possible for the player to chase after the NPCs if he forgot to give/say something to them or if he told them to go to a certain location and they have been gone for too long and he wants to check on them the computer can also simulate a point moving across the area where they are scavenging, if the NPC had a specific location as a goal that is where this point will be, if they died or got injured at some point the point will stay there and if the player comes close to that point the system will spawn in the NPCs either dead or injured near that point.

7.1.2. Simplifying structures Structures such as buildings are made up of many rooms, each with many hit-boxes and objects inside them. Simulating multiple whole skyscrapers with all the contents inside is simply impossible, thus simplifications has to be made. These are quite obvious, whenever a player isn't inside a building the building is just one large hit-box/object. When the player gets closer the rooms which he can reach first gets loaded in or generated if they have not been generated before. The rooms load in sections, so you only load rooms connected/visible from the room you are in, thus only a handful of rooms has to be loaded at one time. Interactions with the building can also cause the loading of rooms, for example blowing up part of the outside wall of the building will load the corresponding room. Basically the building is reduced to a grid of rooms, linked to each other so there's no need to go through the whole grid when the player moves around in the building but each room knows which surrounding rooms to load.

8. Director? (Not needed but might enhance the game experience)

8.1. Direct the action, where and when enemies will come, trying not to put the player in situations impossible to survive but hard enough to make them fun, gauging the players skill level and increasing or decreasing the difficulty. This would not be for "hard core" people who want to use the game as an "apocalypse simulator" to see how long they could survive, but rather to make the game more enjoyable, the director decides which of your group members gets sick or gets lost etc to add tension and drama in your game.

8.2. The Director is also a Goal Oriented Planning system with a set of actions available with their possible consequences (spawn enemy, spawn enemy community, spawn friendly survivor, change weather, make someone sick, make two people in the group fight etc etc) but has the goal of "making it fun for the player". Defining fun would be very hard, the "easiest" way to do it would be to have a machine learning algorithm which tries to learn which set of actions it should do when to maximize the time people play the game, but this requires an already functional game and many many players playing the game to get any useful results since it needs a large sample to work with so that people logging off when they need to go to work doesn't get interpreted as something being boring. There's also the option of reinforced learning, requiring only a "few" beta testers who tell the AI when something they liked happened and when something they didn't like happened, eventually a pattern will be learned. This is however very subjective and gives the Beta testers the ability to "cheat" by rewarding behavior which gives them resources. Using a large enough sample size of beta testers this problem should however solve itself since there will be a lot of people calling the AI boring when it starts giving them too much stuff.

8.3. Could also function as tutorial, at your first game the director will throw/force you into situations where you need to learn certain game mechanics before you can proceed (such as trapping you inside a building and needing to craft fire burn down a door or similar things, each mechanic should be introduced safely and build upon the previous experience).