Sound Adjustments

Not a whole lot has gotten done this week. This tends to happen when I don't have a Thursday off. I will be working on game related things tomorrow, but I felt like making a blog post today.

The current task that I've decided to work on is volume control for the music in-game. This has made me realize that I had a screwed up scheme for producing the music. 

I have already implemented the sound controls into the title menu. Now I need to put it in the in-game menu. It shouldn't be too hard, I just need to put a little time into moving around the current menu objects and creating a new sub-state for the menu.

I also need to create a feedback response to selecting the volume control. Something as simple as a slight change of text or selection arrow color would be fine. I'll probably try the arrow first since changing text color in one menu and not in others will probably seem a bit off.

An interesting thing about the volume control; Since I decided to use a slider, I was able to reuse an art asset that I already had; The clash bar. The volume control was relatively easy to match up with the visualization of the slider. Since volume is measured from 0 to 1 and the slider bar is not a pixel width of 100, I had to create a formula that detected where the slider was. The code is short and simple.

This is the code of the slider. The bar is named obj_music.

x = obj_music.x+325+((obj_sound.audio_level*100)*4.55);
y = obj_music.y+35;

The reasons for these specific numbers:

  • First, the 325 is how far the bar's left hand edge is from the origin of the sprite. The word "Music" is included in the sprite. That's why this isn't just 0.
  • obj_sound.audio_level is multiplied by 100 due to the audio level being a decimal between 0 and 1. This converts it into a whole number.
  • The audio level then being multiplied by 4.55 is directly related to the sprite width. The left and right hand points on the bar that I wanted the slider to stop are 455 pixels apart. That means that each percent of volume is equal to 4.55 pixels.

The following is the code in the PlayerStats object. This object is persistent and holds much of the game's important information.

if(volume_change == true && left)
{
    if(instance_exists(obj_sound))
    {
        if(obj_sound.audio_level > 0)
        {
            obj_sound.audio_level -= .01;
        }
        if(obj_sound.audio_level < 0)
        {
            obj_sound.audio_level = 0;
        }
    }
}
if(volume_change == true && right)
{
    if(instance_exists(obj_sound))
    {
        if(obj_sound.audio_level < 1)
        {
            obj_sound.audio_level += .01;
        }
        if(obj_sound.audio_level > 1)
        {
            obj_sound.audio_level = 1;
        }
    }
}

Very simple. Has volume change been enabled? Does the sound object exist? (I had to add this even though the sound object is persistent due to a strange crash that noted that obj_sound could not be found) If these are true and you are pushing a certain direction on the thumbstick, change the level by 1%. Also, don't allow the sound to exceed its limits of 0 and 1.

Since the slider position is connected to the obj_sound.audio_level value, it will always show an accurate position. Pretty neato.

I plan on squaring this away tomorrow and will probably start on either AI fixes or more art. It all depends on what sounds more fun tomorrow.

Until next time.

_Doombrowski

Final Objects

This week, I've spent a bit of my time finishing up the art for the last objects for the game. I've gotten the implementation part down pretty well so if I ever want to add something in the future, it won't take very long.

The first object is a desk.

This is a modified version of the image that it was modeled after. I used a pretty humorous technique to put the wood grain on the different parts. I created a piece of plywood then copied it and resized it a bunch of different times, masking the shape of the different parts that it was to cover.

The desk gives a bit more surface area than the grill and washer. This could make for some punch action on top of the desk. It's pretty similar to the couch in size, but does not have the bounce section and can be stood on.

The final object that I made and that I will adding sound to to day is the piano.

This one was quite a bit different than the reference. The entire bottom section was at an angle due to the perspective of the picture that was taken. There was also a bench in front of the piano. The piano was also a wood grain. I wasn't really feeling matching up all of the wood grains again so I just made it black. I think it looks pretty cool.

The plan is to add sounds to each of the objects for when you land on them. I also want to change the drag sound on the grill and the washer since they're more metal than anything. 

Sometime soon, I will also be starting on my third revision of the AI system. What's in now is very broken and is difficult to follow and make scale. It also uses direct key inputs to control the player 2 which leads to issues outside of the game. When I use OBS to capture clips to post the sound will automatically turn down because the computer thinks that the left arrow is being held. I'm going to have to make a new virtual control system that simulates the variables that I have in place for the movement code.

I also plan on making some changes to the hit detection for punches. The masks that are currently being used do not always line up with what you see. You can punch a foot in front or behind a character at certain times and still hit. After I create a hitbox object, I'll be able to see exactly where the punches should hit and adjust accordingly.

I really want to start working on new backgrounds and small animations to put in the backgrounds also. There's so much to do. As long as I'm doing something that is pushing the game forward everything is good. I just wish I could get more done faster.

Until next time.

_Doombrowski

Cleaning Up (Not Really)

I did not realize that I hadn't put any updates related to the grill that I made on my blog. Shame on me. Here I thought that my illness this week made me lazy and what I thought I did last week I did this week. >.<

So yeah....I made a grill. 

It's ridiculous how real this grill looks.

It's ridiculous how real this grill looks.

You can stand on it and be pushed while on it. You can punch and block while on it aaaaand....well, read on and you'll find out.

Today, I decided to work on the art for another interactable. I had fun making the last one and it gives me more to show having a new thing to look at! 

I made a washing machine. 

This one doesn't look as real. I have failed you all. I'm so sorry.

This one doesn't look as real. I have failed you all. I'm so sorry.

It's a bit larger than it would actually be, but I think it will work a bit better that way. The added height makes it require slightly longer holding of the jump button to allow you to get on top of or over it.

I also decided to add my "bounce" state to players as they jump off of items. No, they do not bounce. "Bounce" does allow a player to do an elbow drop though. So now, anything you can stand on, you can elbow drop off of. 

Adding the bounce had a sort of interesting consequence. When the bounce state was originally made, it disabled the velocity change when letting go of the jump button. It was to make the bounce feel more lofty. The lofty feel also helps build tension for the elbow drops (conveniently). Now, when you jump off of an interactable, you will have a lofty jump. The jump doesn't go any higher, but the player does jump to the maximum amount by default. It really helps play into the risk/reward thing that I was going for when I made the couch. 

The elbow drop from multiple objects is making me seriously rethink the last interactables that I had mapped out. There's the K.I.S.S. motto (keep it stupid simple) that makes me think I should just make the last couple objects be something that has an interesting shape (sort of like the grill) and not worry about the interactions that I had previously mapped out. The mapped interactions were fairly complex and required new animations. I could really save a ton of work by changing my approach. I'm thinking that I probably will. The more I think about it, the smarter it seems. I really just want to get this game released so I can figure out what the next step in my life is going to be.

That's it for this week. I plan on doing more work tomorrow. It will probably be adding a new interactable. 

Until next time.

_Doombrowski

Working Out Kinks

It turns out that there were a few scenarios on the menu that needed to be fixed after creating the new character select system. 

The new menu system created new variables that needed to be changed when going between screens (ie. after a 1 or 2 player match finishes and if a second player joins an in progress 1 player match). I also finished up the 2 player menu. It ended up taking much less time than the 1 player since the 1 player menu put most of the necessary scripts in place. There was a bit of copy paste and changing a few variables.

Next, the plan is to work on a new interactable. I already have the one that I want to do in mind. It will be the most mechanically simple item to make. The GRILL. I'm hoping to get at least the art done on it today.

My Vanguard Power Calculator is over 250 downloads now. It seems that Thailand enjoys it. Maybe I'll make a few tweaks one of these days and update it. There are some things that I could do to it to allow it to show more information and keep track of more specifics. I was already considering putting a tracker for the totals that you've added on the right hand side of the number buttons. 

I'm feeling a bit under the weather again. Bummerino. Going to the doctor a little later today to hopefully get some antibiotics. 

That's it for this post. The next one should have some cool new stuff to look at.

Until next time.

_Doombrowski

What's on the Menu?

Today I finished up the single player character select menu. A surprising amount of work.

I'm noticing that most of my time is spent trying to figure out why what I think should work doesn't work. I can rarely create code that works right off the bat. My grandfather has always told me that a person that is good at their craft is someone who is good at covering up their mistakes. Maybe I'm getting good?

What was done to change the menu from the previous version to the new version:
Created new visual layout for additional information
Imported new sprites
Created new code to accommodate for information to be added in the future
Created new second player portrait object (amongst a few other new objects)
Made sure character overlaps cannot happen

The 2 player version will be visually identical and code-wise quite similar. Unfortunately, I created a separate "phase" for the title screen 2 player character select, so I'll have to copy and paste a bit of code with the phase modified. I'm hoping that I can make a script and just pop in the phase argument and have things work. Some arguments in scripts tend to not like working for me.

Old Menu

Old Menu

Looking forward to playing some games that I plan on picking up on the Steam Summer Sale. Woo hoo!

Until next time.

_Doombrowski