top of page

Week 19 (Aug 26th - Aug 30th)

Screenshot 2024-08-29 134200.png
Screenshot 2024-08-29 134347.png

Geyser Field:

​This week I completed my third Level Chunk, the Geyser Field. So far it's been the simplest LC to make, as I already had the scripts and visuals for the geysers ready,

I just needed to model and layout the environment. 

​

I took this as a chance to create some extra models that have been place holder's up to this point, including:

​

  • Breakable Wall for Dark Tunnel LC 

  • Basic Button

  • Lever Switch

  • Resource Container

  • New LC Wall (higher poly and more fitting with visuals of the other LC's)

​

Along with the models made just for the Geyser Field itself:

​

  • Geyser LC Floor

  • Geyser Crater

  • Extra Rock​​​​​​​

Controlling LC Randomisation:

​One of the final major coding related problems I needed to solve was how I could make only one of each type of Level Chunk per playthrough, rather than them popping up multiuple times due to randomisation.

​

After doing some rearch on lists in unity, I found the Remove function, which can take objects oput of a list on use.

 

So to control randomisation, I created seperate functions to spawn each Level chunk that still randome sorts through the Level Chunk list, but removes the LC that the function itself spwans from the list. And each function happens after each other in the Start function, allowing the chunks to be removed before spawning the next one.​​​​​​​

Screenshot 2024-08-29 133704.png

Github Merge Issue:

img_merge-conflict.png

​(Example image as I fixed the issue before I took any screenshot's of the conflicts)​​​​​​​

​After comepleting work on campus on Tuesday, I tried pulling my work onto my home computer, but I had conflicts between the two versions. This was because I didn't make a new clone of my repository when I was on campus and used an old one that hadn't been wiped yet. This made me learn how Github doesnt like unity scenes being worked on two different devices at "the same time". Luckily I learnt how to find the code that clashed as it's marked with HEAD and arrows. The clashes were almost all related to changes in m_RootOrder, which I think has to do with the order ID's of prefabs, but my searches didn't give much helpful info on this. But I kept my desired changes and resolved the clash. Very stressful event, so from now on I'll always make a new clone of a repository when I take work to campus.​​​​​​​

Fixing Player Damage Registration:

​An issue popped up when I built out my game where the Geysers would continue to damage players inside the mech even after they had left the damaging collider of the Geyser. After some testing this was also true for the player, and I found it occured if the player was inside the Geyser's collider when it was set inactive by the geyser script., the bool that dictates if the player is in a damaging zone would not change.

​

Turns out when an object is set inactive, Unity doesn't think the objects collider has been exited, so OnTriggerExit won't be called. I needed the code for checking damage to be on the player becuase the player health needs it as a reference, so I tried adding a differnt script to the Geyser that would deactivate the damaging bool with OnDisable. But since this was on all the geysers, they would all turn off the bool at the same time which made the geyser damage redundent.

 

The easy fix I used was to rotate the damaging collider under the map instead of setting it inactive, so the colliders could still register being exited and call the exit function.​

​​​​​​​

BroeknGeyserClip.gif
Screenshot 2024-08-29 140446.png
Screenshot 2024-08-29 140932.png
Screenshot 2024-08-29 140523.png
Screenshot 2024-08-29 143628.png
Screenshot 2024-08-29 141236.png
Screenshot 2024-08-29 142917.png
Screenshot 2024-08-29 142847.png

Fixing Battery Collection (DT):

​Another issue that popped up while testing game build's was that the battery system for the Dark Tunnel LC gate wasn't compatible with my new pickup system, where it had the same issue of the consumed objects not being set to null before being destroyed.​

​

But unlike the mech collectors which we're in the same scene as the player who has the new interacttion script, the battery collector is on a prefab, so to reference the player interaction to set the object to null I made the interact script and insatnce, so it can be called anywhere which solved the issue.

​​​​​​​

Final Touch Up's:

Added fuel to Dark Tunnels level so players could progress without getting stuck.

 

Changed grab point position to take up less screen space, and added some camera animations to the grab point so grabbed objects will bob up and down.

​

Added a sensitivity slider for mech camera, and I made it seperate to the player's slider incase players wanted to have differnet sensitivties in each play mode.

Screenshot 2024-08-29 152700.png
Screenshot 2024-08-29 152636.png
Screenshot 2024-08-29 153055.png
Screenshot 2024-08-29 152811.png
bottom of page