Jump to content
  • Advertisement

Project: Moonrise

Gameplay Moonrise | Dev Blog #8 – SFX Addition

Yyanthire Studio



Welcome to Dev Blog #8- SFX Addition and Integration!

The video above demonstrates some of the sounds of our spells as they sound in-game (music disabled) (we’re also showing off some of the new color schemes, so we hope you enjoy the much-improved visuals!). There’s still a bit more polishing to ensue, but the current setup seems to be ideal.

Sounds are very easy to do in Unity- we create a variable for our ‘travel’ sound, and then our ‘hit’ sound, and transition between those within code at the correct spots. The same goes for things like dying, spawning, acquiring special things like Resources and Tomes, and so on. We can conveniently trigger all these events as they occur from their main event within the code.

Sound Management is also quite simple- except, things need to be done in a reverse order. With Music, we can control the music almost directly, since its just a single entity. But with Sound Effects, since they are so spread out across so many different things, handling them all directly would be a bad idea. Instead, handling them in a reverse order- ie, have the SFX themselves figure out what the current control scheme is via a global handler is the most ideal.

This is done by, on SFX call, the SFX itself looks at the global GameManager class to understand all its various parameters (namely volume). It then takes those parameters and updates its own information with them, then plays the sound. This allows us the ability to control dozens of different SFX objects very easily, and simplifies the scaling process. So, instead of the GameManager controlling the sounds directly, when the sound is needed, that sound instead looks at the GameManager to determine its volume, etc. We imagine this is the same setup we’ll use for handling things like ambiance effects and so forth.

The other task we needed to overcome was handling sounds in massive quantities. RTS games are known for having dozens of spells flying across the screen at once, and if each of them are playing a sound (different, or same), all those sounds get added together to create one overpowering element. Therefore, we need to manage the output levels of sound so it doesn’t get too loud.

To do so is quite simple- using Unity’s Audio Mixer, we can have the output sound essentially ‘check itself’ to ensure that it doesn’t go over a desired volume limit. This differs from simply lowering all volume- we have both a minimum and a maximum volume to maintain. The minimum is easy- its the base sound on its own. But the maximum is a bit more complicated- when dozens of the same sound play simultaneously, the result is that 1 sound at a much higher volume.

Utilizing the Audio Mixer, we can feed every sound into a base, and from there, determine if we need to apply volume lowering. The desired goal is to make it so dozens of spells sound fairly similar compared to just one being cast. The result is even as dozens of spells are cast, the overall amount of sounds do not overwhelm the player.

There is still some tweaking to do- we’re still playing around with the volumes of sounds at their base level to ensure all are very similar in volume. But right now, its at a state that is both good and fairly smooth to listen to.


Thank you for viewing our post! Support and interest for the project has been rapidly growing ever since we began posting here, and we're incredibly grateful for all the wonderful feedback so far! We hope this project interests you as much as we love developing for it, and please look forward to more updates coming in the very near future!

If you’re brand new, consider checking out our trailer and overall description of the game here: https://www.indiedb.com/games/moonrise


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Advertisement
  • Blog Entries

  • Similar Content

    • By horror_man
      Hello, I'm currently searching for additional talented and passionate members for our team that's creating a small horror game.
      About the game: The game would be a small sci-fi/post-apocalyptic survival horror 3D game with FPS (First person shooter) mechanics and an original setting and story based in a book (which I'm writing) scene, where a group of prisoners are left behind in an abandoned underground facility. It would play similar to Dead Space combined with Penumbra and SCP: Secret Laboratory, with the option of playing solo or multiplayer.
      Engine that'd be used to create the game: Unity
      About me: I'm a music composer with more than 4 years of experience and I'm fairly new in this game development world, and I'm currently leading the team that'd be creating this beautiful and horrifying game. I decided that making the book which I'm writing into a game would be really cool, and I got more motivated about doing so some time ago when I got a bunch of expensive Unity assets for a very low price. However, I researched about how to do things right in game development so I reduced the scope of it as much as I could so that's why this game is really based in a scene of the book and not the entire thing. Also I'm currently learning how to use Unity and learning how to program in C#.
      Our team right now consists of: Me (Game Designer, Creator, Music Composer, Writer), 2 3D Modelers, 5 Game Programmers, 1 Sound Effect Designer, 1 3D Animator and 2 2D Artists.
      Who am I looking for: We are looking for a talented and passionated 3D Environment Artist that's experienced in the modeling of closed environments and is familiar with the horror and sci-fi genre.
      Right now the game is in mid development and you can see more information about it and follow our progress in our game jolt page here: https://gamejolt.com/games/devilspunishment/391190 . We expect to finish some sort of prototype in 3 months from now.
      This is a contract rev-share position
      If you are interested in joining, contributing or have questions about the project then let's talk. You can message me in Discord: world_creator#9524
    • By INTwindwolf

      INT is a 3D Sci-fi RPG with a strong emphasis on story, role playing, and innovative RPG features such as randomized companions. The focus is on the journey through a war-torn world with fast-paced combat against hordes of enemies. The player must accomplish quests like a traditional RPG, complete objectives, and meet lively crew members who will aid in the player's survival. Throughout the game you can side and complete missions through criminal cartels, and the two major combatants, the UCE and ACP, of the Interstellar Civil War.
      Please note that all of our current positions are remote work. You will not be required to travel.
      For more information about us, follow the links listed below.
      INT Official website
      IndieDB page
      Also follow social media platforms for the latest news regarding our projects.
      Website Manager
      3D Character Modeller
      3D Environment Modeller
      3D Animator
      Unity Engine Programmer
      The project is marching increasingly closer to be ready for our crowd-funding campaign. Being an Indie team we do not have the creative restrictions often imposed by publishers or other third parties. We are extremely conscientious of our work and continuously uphold a high level of quality throughout our project.
      We are unable to offer wages or per-item payments at this time. However revenue-sharing from crowd-funding is offered to team members who contribute 15-20 hours per week to company projects, as well as maintain constant communication and adhere to deadlines. Your understanding is dearly appreciated.
      TO APPLY
      Please send your Cover Letter, CV, Portfolio (if applicable), and other relevant documents/information to this email: JohnHR@int-game.net
      Thank you for your time! Please feel free to contact me via the email provided should you have any questions or are interested to apply for this position. We look forward to hearing from you!
      John Shen
      HR Lead
      Starboard Games LLC
    • By egor230
      For a long time wanted to write a plugin that allows you to run lua scripts for vc. In this plugin lies Plugin-SDK DK https://github.com/DK22Pac/plugin-sdk/tree/8d4d2ff5502ffcb3a741cbcac238d49664689808 
      the sdk has its main thread, which is an infinite loop, in a way. If there put delay, for example, 10 seconds, then at this time will stop the game itself. Therefore, we launch a new independent stream with a flag, so that it is only one.
      Searching all lua files in a folder, run in a new thread with a new lua state.  Threads and lua States are added to vectors.
       There is a check for errors, run the script, the counter of running scripts increases, get the stack function main, run it.
      As follows.
              lua_pcall(L, 0, 0, 0);// run the file.
              lua_getglobal(L, "main");
              if (LUA_TFUNCTION == lua_type(L, -1)){ luastate.push_back(L); counts++;
              lua_pcall(L, 0, 0, 0);

      Lua contains the main function, which has an infinite loop.  Everything works, but there is one but.  How do I reboot all scripts?
       Press ctrl, go through the cycle for vector c lua States, remove from the stack all, but lua state is not unloaded from memory, so it has an infinite loop.
         Please tell me how to unload the script from memory to properly write the implementation of reloading scripts?.
    • By DreamcityClass
      Dream City: Classified – "Survival Code" (Proof of Concept Framework)
      Episodic, 3D 3rd Person Co-op, Action Adventure Puzzle Plat-former
      Hey everyone I'm looking for a PART TIME/ HOBBYIST PROGRAMMER with an interest in the "Afropunk" style and culture. He would need a understanding of Unity python and marching cubes, or a willingness to learn it. I'm a character artist/ animator dabbling in coding and while starting to develop this game myself I just realized I don't have the time. I need help. I need a team. Hopefully some what passionate, but any little bit will help. You covering the coding would free me up to do more art, animation and character design, (and find more guys).
      The game is a procedural puzzle game, which aims to make all of the 5 (or more) characters on screen use different methods of traversal and fighting styles. The more characters in the party the more complicated the puzzles get. The players need to work together to survive (Dark Souls combat difficulty). There are charts, diagrams, and examples of each with assets I've already created, and a frame work you just need to stitch together. 
      But don't fear, this is a "BY THE EPISODE PROJECT", each of which will be individually Kickstarter'd. Once you sign on we will begin to understand one another's work habits, schedules, etc. while we make this FRAMEWORK. The framework is what we CROWD FUND for support to make the first episode.  
      If there is anyone out there interested in...
      Bringing more diversity to Indie games Working with an unique horror adventure world (World Anvil WIP) Working with an committed artist (who understands coding) and a remote growing team Developing a tight development plan, with passive income contracts: Patreon, product sales, (micros) and of course Revenue sharing Interested in working on a co-op TRINE ~like game mixed with DARK SOULS Willing to grow with this me/(us) as this company takes off.  
      Lets make a dream worth dreaming. 
      (Contact with questions)

    • By packetpirate
      I just finished writing a parser for TMX data (Tiled maps), and the way Tiled handles rotated tiles is by using three bit flags for flipping an image horizontally, vertically, and diagonally, to allow for rotation. Unless I'm wrong, flipping an image "diagonally" is just rotating 90 degrees CCW (counter-clockwise) and then flipping horizontally.
      So I tried to implement this when I create the sub-image of the tileset for each tile:
      public Image getImage(Image tileset, int w, int h) {     if(tid == 0) return null;     int nh = tileset.getWidth() / w; // Number of tiles in this tileset horizontally.     // Offsets to be multiplied by tile width and height to get origin point of tile.     int ox = ((tid - 1) % nh); // Subtract 1 because the TID numbers are 1-indexed (why use 0 to indicate nothing? why not -1? stupid Tiled...)     int oy = ((tid - 1) / nh);     Image sub = tileset.getSubImage((ox * w), (oy * h), w, h);     // If any of the flip bits are set, flip the image.     if(fh || fv) sub = sub.getFlippedCopy(fh, fv);     if(fd) {         // To flip diagonally, rotate counter-clockwise, then flip it horizontally.         sub.setRotation(-90);         sub = sub.getFlippedCopy(true, false);     }     return sub; } Specifically, the area where I set the rotation of the sub-image is what's causing my problem. Despite setting the rotation, the image is not rotated on the canvas. Doing a little digging into the library (what little information there is), it seems that the Image class' internal rotate methods don't actually do anything to the image, and most rotation is done using the Graphics context's rotate methods, which rotate the entire context and then draw the image.
      The only problem with that is that if I rotate my graphics context, which is the map I'm constructing using these tiles, then the coordinates I give to draw the tile are no longer correct because of the rotated context, so my tiles come out all over the place.
      What would be my solution here for rotating the images? Is there a transformation I can do to the coordinates once the graphics context is rotated so they draw in the correct position? I don't know anything about linear algebra, so I'm not sure what to do from here.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!