Posts

Player stats and brightness.

Image
Player stats and brightness. Last week I worked a bit more on the player characteristics, decided on min max values, and did the same for the Enemy stats. I split the visibility factor into 2 values, brightness and motion. Motion will be affected by the movement of the player and the movement in the headpiece and controllers. Brightness is a factor indicating how well lit the player is. So the enemy has skill values for detecting motion sound and smell, it also has a detection generic skill value which is linked with the enemies intelligence. So any light source will have attached a brightness script that triggers and sends a brightness value to the player brightness when the player is in range and increase as the player comes closer to the light source. The player value of Brightness is for now a static value, so multiple light sources can affect it. I still need to cast a ray cast from the light source to the player, if it fails to hit the player then that would indicate that

Player Stats and Hiding mechanism

Image
Player Stats and Hiding mechanism. Last week I worked on two scripts, one for giving the player  visibility, noise and smell attributes and one for adding those values to items and hiding spots. These attributes will later be used for the AI to detect the player. I still need to add an increment when the user moves in visibility and noise. So the player starts with the values of: Player Visibility:70 Noise: 0 Smell: 10 The torch when lit has its own set of attributes to add to the players stats Torch Visibility:100 Noise: 5 Smell: 5 Hiding space Visibility:-70 Noise: -10 Smell: -10 There are also hiding spots, which when you hide in them they reduce those values thus far reducing the chances of the AI to spot you. How Hiding works When the player approaches a hiding space (is within close proximity) and points to it with the cross hair (later on it will be when pointed by a controller) the hiding area gets highlighted. when you left click the user controls a

Character controller and Culling added

Image
Character controller and Culling added This is the first update since the  assignment the hand in. I added a character controller with a torch and created a culling effect. More details in the video.

More work done on the interface, saving data.

Image
More work done on the interface, saving data. I would have liked to say that I started on the loot and enemy randomization, but that is not the case. What I thought would be an hour work job took me half a day. I have now finished with the way the randomizing feed is stored. When a level is complete (PLG state is -off) two buttons appear in the inspector allowing the user to store the seed in a whitelist of black list. When the time comes to generate the level the user has a larger option of choices:  Generate a completely randomly level.  Generate a  completely randomly level but it will never be one of the levels we blacklisted (if we tick on use black list). Generate a specific level from a ID we enter. Load a random level that is included in the whitelist. In order the randomization between levels within the list to be equally random before storing the lvl ID we load the current values and check if the Id already exists, if it does then there is no need to a

Testing the PLG

Image
Testing the PLG Before I get into the testing section Progress on the tasks remaining Place restrictions on all controls in the room generator editor. So you can't place the replaced rooms outside the level and the scan lines. DONE Fix some conditions in chance the quarter can not find a theme room or it the two theme rooms are too close. *I have decided to ignore this and come back to it if i have time after the documentation. Place the furniture , loot and enemies into the level.  Scan the area and store the points that were hit. - this is for demonstration purposes to show how many times that area has a tile placed, to demonstrate how different the levels are. DONE  Store the seed number, the number of tiles used, the  distance to reach the exit and the exit room location DONE So tomorrow I start working on placing the enemies and loot into the level. Testing Today I ran the PLG in a sequence of 40. I have also added 3 functions at before the PLG machine

Tuesday Week 11 -multiple level runs working.

Image
Good morning, This is what I had left last week: What is left for week 11 **Put a condition to fix the error when the exits are less than 3. Work on the seed generator for controlled randomization.  Place restrictions on all controls in the room generator editor. So you can't place the replaced rooms outside the level and the scan lines. Fix some conditions in chance the quarter can not find a theme room or it the two theme rooms are too close. Place the furniture , loot and enemies into the level. Create a function that will repeat the level creation 500 times.  Scan the area and store the points that were hit. - this is for demonstration purposes to show how many times that area has a tile placed, to demonstrate how different the levels are.  Store the seed number, the number of tiles used, the  distance to reach the exit and the exit room location My progress has been, 1. Condition fixed if the exitList.count is less than 3 then randomnumber=0; 2. Seed gener

End of week 10

Image
End of Week 10.  Things week I managed to calculate and display the path from the starting room to the exit. I also calculate the total distance it takes. The red dots and line indicate the shortest path to the exit.  As I looked at the path I realized that Some randomization in selecting the next point is needed. Initially I would just add the available exit points to the list and select one randomly. Then I decided to insert those new exit points (so they are on the top of the list) and then select the First exit from the list. This works smoothly but can create some long corridors. For this reason I decided to still insert the  exits but randomly pick one of the first three. **this now picks up an error if at the start of the creation there are less than 3 exits in the list.** I added a button in the gui, and keep tweaking the editor to my needs. Theme percentage and theme were added to the dungeon Piece script. And a new script was created named themes. There ar