Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411500 Posts in 69373 Topics- by 58428 Members - Latest Member: shelton786

April 25, 2024, 11:39:34 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsLeilani's Island
Pages: 1 ... 53 54 [55] 56 57 ... 67
Print
Author Topic: Leilani's Island  (Read 411719 times)
Ishi
Pixelhead
Level 10
******


coffee&coding


View Profile WWW
« Reply #1080 on: February 14, 2020, 09:35:02 AM »

Although you're probably happy with your current collision routines, I have to put an obligatory link to the rbush and flatbush libraries, which obviously are the wrong language for your usecase (JavaScript) but might have some algorithmic interest - near the end of the readme of rbush there are a few links to papers about r-trees and their derivatives as well:

https://github.com/mourner/rbush

https://github.com/mourner/flatbush/blob/master/index.js

Sorry I didn't get around to replying to this sooner - thanks for the links! It's not really my style to get too much into complex algorithms - if a naive solution will work then I'm usually happy with that Grin Though it's also valuable to remember that smarter solutions exist and are out there to read about! Maybe for a future project I'll try something less basic - depending on the needs of the project.

5 years of the devlog!

I'm one day late, but the devlog is now 5 years old. Hurrah! Coffee Many thanks to all those who read my posts, it makes the whole thing worthwhile!



Those explosion effects have always been a bit weak-looking, and I've had various todo-list notes to revamp them over the years but never did it. I thought since it's a special occasion that I'd actually make the effect to tweak them!



Nothing too groundbreaking - but they're more punchy now at least.

6 years of development

5 years of devlog means the game has been in development for 6 years. I'm still not willing to put any release date on this! But I'm feeling good about development. I was on holiday last week so took a nice little break from the game - I'm starting to get back into development today and looking forward to pushing through to get the next playtestable version done, hopefully without adding too many more things to my todo list...
Logged

oahda
Level 10
*****



View Profile
« Reply #1081 on: February 15, 2020, 02:25:52 AM »

So many devlog anniversaries all at once! Congratulations! Game and updates keep looking amazing. Kiss
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #1082 on: February 15, 2020, 05:00:43 AM »

Congratulations!
Logged
EJlol
Level 0
**


View Profile
« Reply #1083 on: February 17, 2020, 12:04:52 AM »

Congratulations! Grin
Logged
OctoMini
Level 0
**


Talk does not cook rice


View Profile WWW
« Reply #1084 on: February 17, 2020, 12:45:20 AM »

The amount of polish and attention to detail is staggering for an indie project, but what I Iike the most in this project is Leilani herself. Such an affectuous little protagonist! You truly have something special in your hands! Can't wait to play this one! Congratulations on hitting the 6-year mark! Quite an achievement!
Logged

Ishi
Pixelhead
Level 10
******


coffee&coding


View Profile WWW
« Reply #1085 on: February 22, 2020, 12:20:27 PM »

It's a bit late, but Leilani and a maca were able to settle their differences and enjoy some birthday cake together. ^_^



Audio System - Further Improvements

I've begun the daunting task of doing a full pass over the game's sound effects. I spent a few hours playing through what currently exists of the game, making notes of all the situations where sound effects were missing or obviously placeholder. I also noted down some new features that it'd be nice for the sound system to have.

I previously wrote about the audio systems here (basics), here (music, reverb) and here (expanded features).

Reverb Zones

Previously, the game supported reverb but only for entire areas of a level. I added the ability to instead specify individual zones where the reverb should occur.





In this video, on the left side there's no reverb. As Leilani goes into the cave, the echoey reverb effect kicks in.

The FMOD API made this easy; it has a ready made system for setting up reverb properties and then applying them to either whole groups of channels (which is what I do for the level-wide reverb) or to individual channels (which is used here). I didn't showcase this in the video, but the reverb is on a per-sound basis - so even if Leilani is in the reverb zone, if a sound occurred outside the zone, the reverb wouldn't be applied to it.

This feature is a bit overkill! There's a specific level with a mix of outside and cave areas where I make good use of it, though. As I make more levels I'll see if there are other appropriate places to use reverb.

New sounds: Rainbow drop sequence

The rainbow drop sequence was previously entirely silent! I've done a pass over it adding some sparkly, bubbly effects.





Audio design isn't my strong suit - I take a long time to get anything done, and I'm not always able to even describe to myself what I want a sound to be, let alone have the skills / tools / knowledge to make it. As such all sounds in the game are considered possibly-placeholder with the idea that I may find a sound designer to work with at some point in the future.

However for now, I have a few tools that I use. I source some sounds (such as the sparkly sound used here) from Freesound. I'm maintaining a list of all the sounds that I grab from there, and where I used them in the game, so I can double check licenses and attribution in the future. If I edit sounds I usually use GoldWave or occasionally Audacity.

I also synthesise some sounds. The bubbly sounds in the above video were made in LabChirp. I also use the old favourite BFXR.

I don't want the effects in the game to be overly 8-bit-sounding, so those are the most likely candidates to be replaced further down the line.

Data-driven Sound Controls

While working on the rainbow sequence above, I added another new feature to the audio system.

I'd like to focus on the RainbowAppear sound. It's a looping sound. When the rainbow begins to appear, I play the sound. When the rainbow finishes appearing, I stop it.

Code:
<Sound name="RainbowAppear"
filename="Sparkle.wav"
loop="1"
sustain="1.0"/>

In the XML data for the sound, I add a one second sustain which causes the sound to fade off nicely even after the rainbow's code has stopped the sound. However, I don't really have any more control over the sound. I could alter the pan, pitch or volume, but only for the entire sound.

The effect I want is for the sound to increase in pitch over the duration of the rainbow's animation, and also pan from left to right as it goes across the screen. It would sound really flat to play a monotone looping sound for the whole animation!

One possible solution would be to author a unique sound for this situation, tailored specifically for the rainbow's animation. I don't use this solution for various reasons. It doesn't suit my limited audio editing skills - it would take too long to tweak the sound to behave how I want. It's wasteful as the sound file can't be reused for other purposes, as well as the sound itself being longer than a short looping sound is. It's also not flexible; if I decided to change the length of the rainbow anim, the sound would need to be remade.

The previous solution I would use was to hard-code all this behaviour. The code for the rainbow, which starts and stops the sound, would also calculate the appropriate pan and pitch changes to make and apply them to the animation. Some pseudo-code to demonstrate this:

Code:
// Progress the rainbow appear anim from 0-1
anim += deltaTime;
anim = Clamp(anim, 0, 1);

// Apply visual effects
...

// Alter sounds
float pitch = Lerp(0.5f, 1.5f, anim);
float pan = Lerp(-1.0f, 1.0f, anim);
SoundSystem.SetChannelPitch(rainbowSound, pitch);
SoundSystem.SetChannelPan(rainbowSound, pan);

This works, but has slow iteration times. If I need to tweak one of the values, I have to stop the game, compile the code, and relaunch the game.

I've now made this data-driven. The sound XML data can contain a new feature called a Control.

Code:
<Control name="RainbowAppearProgress">
<Pitch>
<Keyframe input="0.0" output="0.5"/>
<Keyframe input="1.0" output="1.5"/>
</Pitch>
<Pan>
<Keyframe input="0.0" output="-1.0"/>
<Keyframe input="1.0" output="1.0"/>
</Pan>
</Control>

The control maps a single float value to multiple sound changes. This simplifies the code, and moves all the tweakable numbers into data. If I want to change the numbers, I can just edit the XML and hit a button to reload the level, without any compilation needed.

Code:
// Progress the rainbow appear anim from 0-1
anim += deltaTime;
anim = Clamp(anim, 0, 1);

// Apply visual effects
...

// Alter sounds
SoundSystem.ApplyControlToChannel(rainbowSound, "RainbowAppearProgress", anim);

As I continue my sound effect improvement throughout the game, I'll be changing old cases of hard-coded sound alterations to use this new system.

Semitones

One final thing! You'll notice in the rainbow drop video that the pitch of the sounds increases throughout the sequence. It could be done by specifying pitch multiplication values directly, like so:

Code:
<Sound name="RainbowDropCollect1"
filename="RainbowDropCollect.wav"
pitch="1.0"/>
<Sound name="RainbowDropCollect2"
filename="RainbowDropCollect.wav"
pitch="1.2" />
<Sound name="RainbowDropCollect3"
filename="RainbowDropCollect.wav"
pitch="1.4" />
<!-- etc -->

However this can end up sounding really wonky. Numbers that look nice on paper - increasing the pitch by 0.2 seems like it should sound good - don't tend to sound good in practise.

I have a little helper code in place to calculate these pitch values for me based on the idea of semitones. In music, the notes (ABCDEFG) form an octave. In a single octave there are 12 semitones (in piano terms this includes the white and black keys in the octave). The difference between octaves - for example between note A on one octave, and note A on the next octave up - is that the pitch is doubled!

So to change the pitch of a sound by one octave, or 12 semitones, we double it. It's a little more tricky to change the pitch by individual semitones. For this we need a calculation that I pulled off the internet.

Code:
pitchMultiplier = 1.059463 ^ semitoneChange

1.059463^0 = 1.0 (same pitch, no change)
1.059463^1 = 1.059463 (1 semitone increase)
1.059463^6 = 1.414 (6 semitone increase. The result here is also the square root of 2.)
1.059463^12 = 2.0 (doubled the pitch, gone up one octave!)

In the XML I specify the pitch change for each collection sound in semitones:

Code:
<Sound name="RainbowDropCollect1"
filename="RainbowDropCollect.wav"
semitoneChange="0.0"/>
<Sound name="RainbowDropCollect2"
filename="RainbowDropCollect.wav"
semitoneChange="1.0" />
<Sound name="RainbowDropCollect3"
filename="RainbowDropCollect.wav"
semitoneChange="2.0" />
<!-- etc -->

And, the result of this is a more pleasant-sounding increase in pitch for each sound. I recommend making use of this trick where possible!
Logged

oahda
Level 10
*****



View Profile
« Reply #1086 on: February 24, 2020, 08:40:15 AM »

Aww, the pearled sprites!! Kiss Kiss

And that audio stuff and the attention to details with the rainbow sound is so neat.
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #1087 on: February 25, 2020, 05:11:18 AM »

I just realized that this is the first time I heard this game. I'm really curious what the rest sounds like!
Logged
Ishi
Pixelhead
Level 10
******


coffee&coding


View Profile WWW
« Reply #1088 on: February 25, 2020, 12:00:45 PM »

I just realized that this is the first time I heard this game. I'm really curious what the rest sounds like!

I don't tend to post videos containing sound effects - especially not general gameplay videos - due to the placeholder nature of them. Here are a couple of videos that I think both previously appeared on the devlog, if you're interested:

The end of level sequence, which is timed with the music. First with music, then without. The second time also shows the audio debug mode which prints the name of each sound in the position it's being played.





The intro sequence for a factory level. Most of the sounds are placeholder (especially the factory door opening and closing), they're on the list for a revamp as part of my current audio pass.





And then because it's always worth reposting, Woofle's Soundcloud has a playlist containing some music samples!
https://soundcloud.com/leila-wilson-woofle/sets/leilanis-island
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #1089 on: February 26, 2020, 04:30:39 AM »

The music syncing up with the lights going on in the factory
Logged
nova++
Level 4
****


Real life space alien (not fake)


View Profile
« Reply #1090 on: February 26, 2020, 04:31:43 AM »

This game is going to be a masterpiece.

edit: fixed

That reverb gives me good tinglies. It's so good. It's all so good
Logged

oahda
Level 10
*****



View Profile
« Reply #1091 on: February 26, 2020, 10:08:57 AM »

Oh my god yes the lights
Logged

Ishi
Pixelhead
Level 10
******


coffee&coding


View Profile WWW
« Reply #1092 on: February 28, 2020, 10:56:17 PM »

Such nice comments, thanks <3 The lights syncing with the music is one of those crazy extra features that I didn't need, but had to put in once I had the idea. I don't really have any more music-syncing things in the game at the moment (aside from the end-of-level and end-of-boss sequence) but may try to find some more to add.

Sound overhaul continues

I've not had much time to work on the game throughout this week - been busy with normal work and other events - but spent Friday continuing to add and improve sounds.

Menus

One area that has been given some attention is the menus. They previously used various unsuitable game sounds - such as playing the 'jump' sound when you pressed a button - which sounded terrible. I've gone for a kind of tactile wooden feeling which feels much better, I think.





Per-sound delay

The one new feature added this week is the ability to add a delay to sounds. For 'Pause' and 'Resume' it plays the same sound three times with a slight delay, with pitch and volume changes to create small jingles. This kind of shortcut allows me to author sounds more quickly and makes the sound system more flexible for if/when I improve the audio more in the future.
Logged

nosferathoo
Level 1
*


indiedev from Poland


View Profile
« Reply #1093 on: March 07, 2020, 11:25:40 AM »

This looks like a insanely polished game - would love to play it as it reminds me of Shantae series.
Logged

Ishi
Pixelhead
Level 10
******


coffee&coding


View Profile WWW
« Reply #1094 on: March 07, 2020, 05:09:52 PM »

This looks like a insanely polished game - would love to play it as it reminds me of Shantae series.

Thanks! Smiley

Factory door / Boss sounds

The ongoing sound overhaul continues, again! No real new features for the audio system this week - just lots of authoring and hooking up of new sounds.

The factory door sequence has been improved. The boss fights are also a major area of improvement this week. The boss intro cutscene used to be entirely silent, but now has appropriate sounds triggered by the various animations throughout the cutscene. The boss itself also has a lot of new sounds including a first pass at an engine noise. Also little details like adding a sound when Kuila slams her fists on the tank after taking damage.





Here's a video of the factory intro and boss fight, with the usual disclaimer: there are still plenty of placeholder sounds in here! The sound volume is also probably not very well balanced.
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #1095 on: March 08, 2020, 10:26:25 AM »

 Hand Any Key Kiss Hand Joystick
Logged
Ishi
Pixelhead
Level 10
******


coffee&coding


View Profile WWW
« Reply #1096 on: March 14, 2020, 09:36:59 AM »

Continued Audio progress

As always, audio work continues. I decided to count the items on my todo list and the current completion rate is...

67 / 162 = 41%

That's after one month. I expect I can finish the rest of the list within another month!

Instagram long screenshot

Rather than just posting about audio I thought I'd mix things up a little. I was recently inspired to try posting a long, multi-image screenshot on instagram! The source of the inspiration was this cute Animal Crossing pixel art by _t3nshi - I loved the idea of being able to scroll through a single long image. I don't put any serious effort into my instagram account but it can be fun to post things now and then. I've shied away from posting non-photographs on there before, but the multi-image thing seemed like it'd be a good fit for instagram.

To start with I needed my long screenshot. I could take multiple screenshots and stitch them together later, but the parallax backgrounds would make this awkward, because they scroll at a different rate to the main scenery and wouldn't line up. Instead, I just changed the game's display size to make it super wide!



It was fun to see the game running like this! Next I cropped the image down to a 960x240 area - enough for 4 square images. I read that 1080x1080 images are best for instagram, so I scaled the image up using the same two-step process that the game does, to keep the pixels looking sharp - first a 400% nearest neighbour scale (to 3840x960), then a bilinear filtered scale up to 1080 high (4320x1080). After cutting this into four, it produces nice clean images.

The final step was to use my phone to post the images, since instagram only supports posting via the app.

On the website the images look quite nasty thanks to the compression - but thankfully when viewed on the app they come out much sharper and cleaner.

Logged

oahda
Level 10
*****



View Profile
« Reply #1097 on: March 14, 2020, 10:54:35 AM »

So neat! Kiss So when are we getting the Mac touch bar build of the game so we can play it in this super wide screen glory? Well, hello there!
Logged

Ishi
Pixelhead
Level 10
******


coffee&coding


View Profile WWW
« Reply #1098 on: March 14, 2020, 11:10:02 AM »

So neat! Kiss So when are we getting the Mac touch bar build of the game so we can play it in this super wide screen glory? Well, hello there!

Now that would be wide, I feel like you could see the whole level :D Although at 30 pixels high you wouldn't get much detail...

Logged

Ishi
Pixelhead
Level 10
******


coffee&coding


View Profile WWW
« Reply #1099 on: March 21, 2020, 12:51:01 PM »

Audio overhaul progress update!

Last week: 67 / 162 = 41%
This week: 91 / 177 = 51%

I'm happy with that progress this week. Especially as I spent a lot of time on another new feature for the audio system.

Waterfall sounds

I wanted to tackle the problem of playing audio for waterfalls. They're big features, which may be partially off screen, and there may be a lot of them on screen at once!

The basic implementation - playing a single sound for each waterfall - can easily run into issues. The video below demonstrates some of these issues. Note that the implementation is very basic - I'm just playing one sound for each waterfall without adjusting the volume based on the actual size of the waterfall. However, it's good enough as a demonstration.





When multiple waterfalls are on screen, the sounds overlay with each other strangely, making it very noisy. The general volume also just gets loud when many waterfalls are present.

I could turn down the volume of the sound played by each waterfall - but then it might be so quiet that a single waterfall isn't audible in the way I'd like.

To fix it, I introduced a new system:

Area Sounds

This system is designed to play sounds for large features like waterfalls. The general idea is that each waterfall requests to play a sound, and provides the area in which to play it - the rectangular bounds of the waterfall. The sound system uses this information to play a single sound at an appropriate volume and position (note: the position is used to pan the sound to the left/right and also to reduce the volume further as the sound goes off screen).

Let's see it in action. The green rectangle around each waterfall is the area of the sound it's playing. The white text shows the single waterfall sound that moves around the screen. Headphones recommended so you can hear the left/right panning in action!





The sounds are much less noisy now because it's just the single looping sound, rather than multiple sounds overlaid on each other.

The position of the final sound is calculated based on the centre of mass of all the rectangles of the waterfall sounds. So a larger rectangle will pull the position more in that direction. (Note that there are also some calculations in there so that rectangles that are offscreen, but still in the audible zone, have less affect on the position calculation.)

To calculate the volume of the final sound, I make use of the Sound Control feature that I added recently. The total area of the rectangles of sound is calculated, and fed into a sound control, which decides the volume.

Code:
<Control name="WaterfallMainLoopAreaControl">
<Volume>
<Keyframe input="0" output="0.0"/>
<Keyframe input="10" output="0.3"/>
<Keyframe input="30" output="0.6"/>
<Keyframe input="120" output="1.0"/>
</Volume>
</Control>

This gives me loads of control over the volume of the waterfalls, in a non-linear way. A small waterfall with an area of 10 (so could be a 1-tile wide x 10-tiles high waterfall, or 2-tiles wide x 5-tiles high) is played at 30% volume.

Triple the size of waterfalls to an area of 30, and the volume only doubles to 60%.

Quadruple that again to an area of 120, and the volume maxes out at 100%. Beyond that, the volume will be 100% regardless of the number of waterfalls.

This means small waterfalls are audible while huge waterfalls don't result in enormous volumes of sound.

I made a diagram to try and better explain the flow of how the multiple sound sources get combined into a single final sound.



Future uses

I have more planned uses for this system! Firstly, the waterfalls themselves are still in need of more sounds, such as impact sounds when hitting the ground or water. I plan on using the Area Sound system for these too, to get the same benefits. In this case I would just generate a 1x1 tile area of sound at the waterfall's point of impact, rather than for the whole waterfall.

There are other potential use cases too, for example something like the sound of a missile flying through the air. This quickly gets noisy when many missiles are present on screen so would be a prime candidate for using this system to balance out the volumes and clean up the sounds.

Thanks for reading!
Logged

Pages: 1 ... 53 54 [55] 56 57 ... 67
Print
Jump to:  

Theme orange-lt created by panic