Level Blockout

This week I worked on making a small prototype of a level to start doing some testing in.

team07_proto_004

Advertisements

AI Improvement+Stealth

I improved the AI, it possess now an angle based field of view instead of a single line raycast. I visualized the field of view with a cone that also serves as a Trigger to only cast Raycasts when something enters it to increase efficiency.

team07_proto-thomas-ai

With that I also implemented a small stealth mechanic. That if the player gets detected by an NavAgent it will try to ring an alarm which if he succeeds will make the player lose after a small timer runs out.

team07_proto-thomas-stealth

 

 

Chaos meter +AI detection

This week I made a script which made the office workers detect if the player was acting aggressive and make them fled or attack him with a variable chance system. After the meeting of monday, Thomas took it over with the rest of the AI.

I also made a chaos meter which is like a measure of how many chaos there is. It has a depletion by time which can be turned off and on. We are planning on linking this with the way the characters react to it (fleeing/attacking).

Another thing I did was fixing a bug that made the breakable mesh spawn a new clean mesh when breaking the old one. I also changed the script a bit so the player must see and stand close to the mesh to break it instead of getting clicked by the mouse button, which was pretty anoying with our first person controls.

Breaking + ChaosMeter

Character behaviours

This week I implemented a weapon manager, who connects all the character behaviors:

  • Pick Up/Drop behavior
  • Hit behavior (shooting or smashing) (melee or projectile weapon)
  • Throwing behavior

I also added health behavior.Hit_Shoot_Damage

Small prefabs for weapon testing.

Suggestions made to the team:

  • make level procedural, independent walls, floors, etc, for easier level building/testing.
  • different design pattern (decorator) for AI.

Simple AI with NavMesh

I worked this week with the Navigation Meshes in Unity. With NavMesh it is possible to get quickly a very decent AI for in our game the NPCs of the game. I added a script in which the assigned NavMesh Agent has several states like aggressive, escaping or passive. In the Passive state the agent can be assigned to some Gameobjects with Colliders and he will follow this  Path, to mimic in the future game for example the office life.

NavMesh

 

Breakable objects

 

This week I tried to find an easy solution on how to create breakable objects. With your model ready, you just have to slice it a few times or use a script that randomly breaks it so you get a second, broken model. After that you make 2 prefabs out of them and let the broken one replace the other one after it gets damaged for example.

I created a small script where after you click on the object, it breaks.

Created the playercontroller script

I created a playercontroller script to make the player move with the keyboard and rotate the camera with the mouse. The player direction of moving depends on the camera’s angle. I also made the player able to jump when pressing the spacebar.

PlayerController_test

If you want to implement it in your level you’ll just need a gameobject (capsule, model,..) with a charactercontroller component (normally generates automaticly with the script) and a camera object as child.

Implementing PlayerController