Weekly Update – May 10, 2024

Adding sound effects has become the vehicle for demo scope creep. It started with adding an audio manager and continued this week with sound propagation. The latter involved major rework of the observation system. 

  • Sound propagation. Sounds now propagate through the dungeon level based on their initial loudness and nearby obstacles. Actors within hearing range can react to the sound through the observation system. Sounds only play if the player can hear them, and the sound volume is adjusted according to the volume when the sound reaches the player. 
  • Improved observation system. The observation system generates observations from game events and determines which actors receive those observations. Actors use observations to determine their actions. The message log uses observations to log messages. Previously, observations indicated the game event, e.g. “Door Opened”. There was an assumption that all observations were perceived visually. To support observations from sounds, I added a Sense attribute (sight, hearing, etc.) to observation types and created separate observation types for seen and heard game event types. As a result of the rework, game events and observations are cleaner and more flexible. Instead of generating observations directly, the code now generates a game event, and the observation system gets the observation types for game event type from data.   
  • Fixed many, many bugs originating from last week’s UI improvements. This activity consumed half of this week’s time.

Next week, I’ll tie up the loose ends in the observation system rework and add more sound effects.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *