Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411413 Posts in 69360 Topics- by 58415 Members - Latest Member: sophi_26

April 16, 2024, 04:07:09 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsThe Lost Light of Sisu
Pages: 1 ... 11 12 [13] 14 15
Print
Author Topic: The Lost Light of Sisu  (Read 42471 times)
Nordanvinden
Level 2
**

Indie game developer from Stockholm Sweden


View Profile WWW
« Reply #240 on: February 14, 2018, 12:03:01 AM »

#Update 146 - Intro animations and UI audio

So I have finished up all the technical tasks that I had for the world map. It was a lot of audio related tech, but also some more interesting visual and technical things.

Intro animations


Intro animation that plays the first time the game is started.


Exit animation that plays when the player enters the last teleporter and gets transported into space.

UI Audio

Among other things, I added audio to the options menu. Now it bleeps everytime the focused UI element changes. I solved this by implementing the ISelectHandler interface.

Code:
public class UIAudio : MonoBehaviour, ISelectHandler
{
    [SerializeField]
    Sound Selected;

    public void OnSelect ( BaseEventData eventData )
    {
        Selected.Play ();
    }
}
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #241 on: February 14, 2018, 12:28:56 AM »

That reminds me: did you ever link any tracks here?

Hey! Sorry for the late answer.

I did post two audio-clips in #Update 39 (page 4) at the bottom of the post.
A lot has changes so Im not sure if I will be using them, but I still like them.

This is what I wrote then:

I was thinking that this one would play as soon as you start the game and when you hang out in the menus.
https://drive.google.com/file/d/0B3JcE3llNr7BTFlOUmJ2NHJ4dVk/view?usp=sharing

And this one would play in levels of world 1. aka forest levels. I like how its very soothing and makes me calm when I play.
https://drive.google.com/file/d/0B3JcE3llNr7BR0gzcWNtY2txbHM/view?usp=sharing
Quoted because pagination. Sounds nice! Bit short, but I guess that's the idea of sharing a clip.
Logged
Nordanvinden
Level 2
**

Indie game developer from Stockholm Sweden


View Profile WWW
« Reply #242 on: February 14, 2018, 11:39:37 PM »

That reminds me: did you ever link any tracks here?

Hey! Sorry for the late answer.

I did post two audio-clips in #Update 39 (page 4) at the bottom of the post.
A lot has changes so Im not sure if I will be using them, but I still like them.

This is what I wrote then:

I was thinking that this one would play as soon as you start the game and when you hang out in the menus.
https://drive.google.com/file/d/0B3JcE3llNr7BTFlOUmJ2NHJ4dVk/view?usp=sharing

And this one would play in levels of world 1. aka forest levels. I like how its very soothing and makes me calm when I play.
https://drive.google.com/file/d/0B3JcE3llNr7BR0gzcWNtY2txbHM/view?usp=sharing
Quoted because pagination. Sounds nice! Bit short, but I guess that's the idea of sharing a clip.

Ah, thanks Smiley Yes, exactly. If I decide to go with any of them, Ill make them longer.
Logged

Nordanvinden
Level 2
**

Indie game developer from Stockholm Sweden


View Profile WWW
« Reply #243 on: February 14, 2018, 11:54:13 PM »

#Update 147 - Energy flowers

So yesterday I first played through a lot of levels to figure out whats left to do there. Its mostly audio related but also some other minor things.

I have shown these before but I finally added them yesterday, the retracting energy flowers which adds some logic to why energy is floating around in the world.





Today I am going to start looking into creating a simple audio system thats pools the audio sources. The reason is that some levels have a lot of enemies and it feels a bit redundant that they have their own audio source, even when you cant hear them. But hopefully I will be able to write more about that stuff tomorrow Smiley

Oh, and heres is a screenshot from the game which I took for the twitter header, but I rather like it so I though I could share it here as well!

Logged

Nordanvinden
Level 2
**

Indie game developer from Stockholm Sweden


View Profile WWW
« Reply #244 on: February 21, 2018, 01:21:45 AM »

#Update 148 - Audio Source pooling system

I have been meaning to do this post several days so I am happy to finally being able to do it!

I have created an audio pooling system that makes it easy for other components in the game to just ask that system to play any sound at a certain position. It works really well so far and has made it a breeze to add audio.

So this is what the audio source pooling system provides:
  • Pooling of audio sources.
  • Instantiating new audio sources if there are no available.
  • Offers three playback types: One shots, Looping and Background.

One shots are audio that is supposed to only play once at a certain position. For example when the player jumps.

Loops are audio that is meant to be repeated for as long as the calling component wants it to. Usually for as long as the player is close enough to hear it. For example the sound the stompers create when constantly spinning.

Background audio is supposed to always play and does not care about distance to the audio source. Typically used for ambience or music.

How it works in practice

One Shots

This will be an example for how the players footsteps gets generated.

The player audio script exposes a field of a Sound class called movement. This contains settings for the audio such as which file/files this sound should trigger, the desired volume, pitch and some other settings.


Sound field exposed in the inspector.

The player script then calls the audio manager playing a one shot, like this:

Code:
  _audioManager.Play (
      _settings.MovementLevelSound,
      _playerPosition,
      _audioManager.SoundType.OneShot
      );

The audio manager then grabs an unoccupied audio source from the pool, assigns all the settings from the MovementLevelSound and triggers a coroutine that keeps track of when the sound is done. It then returns the audio source back to the pool and deactivates it.

Code:
   private IEnumerator HandlePlayingAudioSourceOneShot ( AudioSource audioSource )
    {
        // Activate audio source and start playing it.
        audioSource.gameObject.SetActive ( true );
        audioSource.Play ();

        while (audioSource.isPlaying)
        {
            yield return null;
        }

        // Disable audio source and return it to pool.
        audioSource.gameObject.SetActive ( false );
        _audioSourcePool.Add ( audioSource );
    }

This is what it looks like.


An audio source gets triggered and positioned for each foot step. Also when the player jumps and lands.


In the hierarchy the audio source is parented to the correct root to easier keep track of which audio source is playing what. Also makes it easier to debug.

Looping

For the looping sounds the calling component is responsible for stopping the audio source. This is because there are different reasons for different component when to stop or start playing looping sounds. So I simply return the audio source to the calling component and then they return it to the audio manager through a call to Stop, like this:

Code:
   public void Stop ( AudioSource audioSource )
    {
        // Stop playing the audio source.
        audioSource.Stop ();

        // Reset.
        audioSource.loop = false;
        audioSource.gameObject.SetActive ( false );

        // Return audio source to pool.
        _audioSourcePool.Add ( audioSource );
    }

Background

The background audio will loop and play forever. The key here is that all background audio has 0 in spatial blend to avoid being dependent on where the audio listener is in the scene.

Final

I really enjoyed creating this pooling system so I hope it was interesting to read about Smiley


« Last Edit: February 21, 2018, 11:20:26 PM by Nordanvinden » Logged

JobLeonard
Level 10
*****



View Profile
« Reply #245 on: February 21, 2018, 01:33:43 AM »

I never had to deal with programming sound, but that looks like a solid architecture Smiley

Quote
Loops are audio that is meant to be repeated for as long as the calling component wants it to. Usually for as long as the player is close enough to hear it. For example the sound the stompers create when constantly spinning.
Can it also use this distance information to change the volume?
Logged
Nordanvinden
Level 2
**

Indie game developer from Stockholm Sweden


View Profile WWW
« Reply #246 on: February 21, 2018, 11:29:31 PM »

I never had to deal with programming sound, but that looks like a solid architecture Smiley

Quote
Loops are audio that is meant to be repeated for as long as the calling component wants it to. Usually for as long as the player is close enough to hear it. For example the sound the stompers create when constantly spinning.
Can it also use this distance information to change the volume?

I'm glad it looks solid, thanks Smiley

Regarding using the distance to control the volume, its something Unitys audio sources already does. There are multiple settings you can use but basically that is what the "Min Distance" and "Max Distance" inspector settings controls. So if you put the audio source to be linear, then the volume will be at maximum when the audio listener (attached to the player in my case) is inside the Min Distance, and then fade out linearly until the player is outside the Max Distance. Then the volume is = 0 (and that is also when I usually return the audio source to the pool).
Logged

Nordanvinden
Level 2
**

Indie game developer from Stockholm Sweden


View Profile WWW
« Reply #247 on: February 21, 2018, 11:40:31 PM »

#Update 149 - Visual bugfixing

So I have kept on adding audio to the game and I think that I am nearly done. I still need to look into adding some sort of ambience system that plays random bird/noises in the background for the forest world. I guess I should do something similar in the ice and lava world too, but Im not sure yet what sounds they should be.

Other than that I also did some bug fixing and one of them was that the eye of the main character popped out when slamming under the water (or basically when the character was moving right before slamming). So when fixing that I made the eye open fully by mistake, and it looked kind of funny Blink


Looking confused when slamming down..
Logged

Nordanvinden
Level 2
**

Indie game developer from Stockholm Sweden


View Profile WWW
« Reply #248 on: February 22, 2018, 11:45:45 PM »

#Update 150 - Audio

Yesterday I implemented some nice audio effects:

  • The higher audio frequencies gets cut off when the player submerges in water. As soon as they reach the surface again, it goes back to normal. This really adds a nice effect of being under water.
  • Added a similiar audio cut off effect when entering the menu.
  • When walking or jumping on ice, the characters footsetps and jumping sounds changes.

These things were pretty smooth to implement once I understood how Unitys audio mixer system works. So If you want to create something like that yourself, I would tell you to check out Unitys official tutorials for the audio mixer, they are very good and informative.



Logged

JobLeonard
Level 10
*****



View Profile
« Reply #249 on: February 25, 2018, 04:05:10 AM »

Oooh, I love the minimalism. It actually works really well without any music
Logged
Nordanvinden
Level 2
**

Indie game developer from Stockholm Sweden


View Profile WWW
« Reply #250 on: February 28, 2018, 11:47:57 PM »

Oooh, I love the minimalism. It actually works really well without any music

I'm glad you like it!  Grin

I have actually just been going through those thoughts in my mind. If I want/need music or if ambient is enough. In this case I guess ambient is both soft background atmospheric audio and bird chirps. But not actual traditional music. Hmm.. Great to hear your opinion Smiley
Logged

Nordanvinden
Level 2
**

Indie game developer from Stockholm Sweden


View Profile WWW
« Reply #251 on: March 01, 2018, 01:08:45 AM »

#Update 151 - Water splash and UI visuals

Visuals
When entering water, in addition to a water splash sound, I have now added some splash particles. It really added to the feeling of entering and exiting the water.



I also started working on finalizing the UI which has been temporary this far. I wanted a cleaner look and less color at the same time, but not remove it completely. The solution was to only show color for the currently selected button. This is what it looks like in the first level menu:



I still have some work to do in the options menu where resolution, controls and possibly audio options should be available.

Audio
So in the end of last week (and weekend) I implemented a small "system" that detects when the player gets hit by an "enemy" which triggers a certain player-is-hurting-noise.

I also added audio for "footsteps" when swimming in and under water. I made a big difference.




Logged

Sundrop
Level 1
*

Grandma cooks best!


View Profile WWW
« Reply #252 on: March 01, 2018, 01:56:45 AM »

I love the addition of water splashes and energy flowers!
The UI buttons seem to need a bit more love. Right now it reminds me of video app menus. Maybe have some energy flowers pointing at the selection?  Tongue

It's great to see how well things are progressing! Thanks for the Unity Audio tips! I myself am working in Unity and was secretly dreading audio work haha! Keep it up!
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #253 on: March 01, 2018, 08:49:50 AM »

Check out mynoise.net if you don't know it. It has a lot of good ambient noiseblockers, might be good for ambient inspiration Smiley
Logged
Nordanvinden
Level 2
**

Indie game developer from Stockholm Sweden


View Profile WWW
« Reply #254 on: March 01, 2018, 11:21:57 PM »

I love the addition of water splashes and energy flowers!
The UI buttons seem to need a bit more love. Right now it reminds me of video app menus. Maybe have some energy flowers pointing at the selection?  Tongue

It's great to see how well things are progressing! Thanks for the Unity Audio tips! I myself am working in Unity and was secretly dreading audio work haha! Keep it up!

Thats great to hear that you like them Smiley

I am glad that you could get something good out of the audio posts Grin

Ah I see what you mean. Now when you mention it, I actually remember having similar thoughts in the beginning when adding them. If I have time I might change it, but what I have found is that those icons are really effective. People seem to understand immediately what they represent, which is the most important thing to me (since I dont want to use text). In todays post I will write about the options menu that I created yesterday which has some other icons. They are a bit prototypish, but might give a better feeling of what it would look like without the video-related ones.

And thanks, I really appreciate your honest feedback! Coffee
Logged

Nordanvinden
Level 2
**

Indie game developer from Stockholm Sweden


View Profile WWW
« Reply #255 on: March 01, 2018, 11:26:40 PM »

Check out mynoise.net if you don't know it. It has a lot of good ambient noiseblockers, might be good for ambient inspiration Smiley

I just checked it out and it seems great for inspiration! Thanks a lot, thats a great tip Grin

Logged

Nordanvinden
Level 2
**

Indie game developer from Stockholm Sweden


View Profile WWW
« Reply #256 on: March 01, 2018, 11:54:46 PM »

#Update 152 - UI Options

Updates

Yesterday I mostly worked with the UI for the options. It still doesnt feel totally finished, but here are the main changes:

Made edges of UI elements sharper.


Updated Options layout.


Updated dropdown menus visuals and added new icons for resolution settings..


.. and quality settings.


I also updated the mechanics of when to show the controls. Instead of showing them all the time, they appear once you select the controls button. This is a bit wierd since all of the other buttons has to be pressed. These control-images are still temporary and I am working on something more fitting.



I am not sure about these icons, but I dont know how to show "Resolution" and "Quality" with icons. And it would be nice to not have a separate submenu..  Huh?

Early culling bug fix

I had an issue where animated skinned mesh renderers would get culled before being off screen. In this case it was one of the arms of the final boss. But it turned out to be a simple fix where I only had to increase the extents of the bounds for the skinned mesh renderer. Might come in handy to someone else Smiley
Logged

Nordanvinden
Level 2
**

Indie game developer from Stockholm Sweden


View Profile WWW
« Reply #257 on: March 08, 2018, 03:42:55 AM »

#Update 153 - UI Options & Company

UI

I have had some time to keep on working on the controls option UI. Its not really looking as well as I want it to but the idea is starting to show.

So the idea is to color code the different input buttons and then have animations at the top showing the different actions. Like a blue outline which shows the character running back and forth inside it. The temporary white boxes symbolize where these animations would show up. Unity does not support gif files as far as I have understood, so I probably have to look into some image-switching solution.



I also switched the backwards arrow icon to a solar-system icon instead to symbolize where you go when you exit. The backwards arrow is used in the options menu, and I did not want to confuse by using the same icon for two different things.



Company

Other than that I have been busy trying to set up a proper company where I can release games. Its still pretty far from done but I am learning a great deal and will hopefully be able to show something soon.
Logged

Nordanvinden
Level 2
**

Indie game developer from Stockholm Sweden


View Profile WWW
« Reply #258 on: March 09, 2018, 01:24:05 AM »

#Update 154 - Animations in UI

So yesterday I managed to implement a simple system for animating an image based on multiple images. Now you can see the character running in the upper left corner when entering the controls section in the options menu. It will have a blue border around it to indicate its connected to the blue input.



this is a code snippet i found on the Unity forums that I have modified to work for images instead of textures, and when time scale is zero:

Code:
public class AnimateImages : MonoBehaviour
{
    [SerializeField] Sprite[] _frames;
    [SerializeField] int _framesPerSecond = 10;
    [SerializeField] Image _image;

    void Update ()
    {
        var index  = (int)(Time.realtimeSinceStartup * _framesPerSecond) % _frames.Length;
        _image.sprite = _frames[index];
    }
}
Logged

Nordanvinden
Level 2
**

Indie game developer from Stockholm Sweden


View Profile WWW
« Reply #259 on: March 15, 2018, 07:06:31 AM »

#Update 155 - Animations in UI

I havent had time to work much more but I have at least finished the first version of the controls UI. It looks like this:


There should be a green border around the jumping animation that my screen capturing software removed.

I am still kind of happy with the original idea of color coding the controls and show them as in game animations. But it looks kind of messy and does not really suit the otherwise visually clean game. I have to think a bit more about how I want it to be structured..  Huh?
Logged

Pages: 1 ... 11 12 [13] 14 15
Print
Jump to:  

Theme orange-lt created by panic