Customise Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.

No cookies to display.

[ad_1]

DDRKirby(ISQ)


Degree 5-1

I’ve accomplished work on degree 5-1, tentatively titled “Gleaming Glassway”! That is the primary degree in world 5 (Crystal Caverns). I’ve obtained a =ton= to speak about for this degree, however first, here is a video of a full playthrough of it:

Mechanical Identification

World 5 goes to concentrate on the inexperienced “combo” enemies the place you must press assault and soar concurrently. There are a bunch of various methods by which these can be utilized, equivalent to:

    By themselves
    In the midst of an air soar sample
    Mixed with the start of a flight path (press assault + maintain soar)
    Mixed with the tip of a flight path (press assault + launch soar)
    Together with a spike enemy
    Blended in with water zones / ghost enemies

I am hoping to introduce these slowly over the course of the world, particularly the flight path-related ones since these could be difficult to get a deal with on.

Musical References

I have been attempting to mull over musical type concepts for world 5 for some time now, and solely not too long ago had a lot success selecting one thing. I do not know precisely the right way to describe it succinctly, but it surely attracts slightly bit on “kawaii bass” influences, that includes huge synth chord stacks which might be sidechained to the kick drum.

World 4 was fairly “lush” and “atmospheric” in its general sound so I wished to distinction that slightly by going for one thing slightly extra punchy and crisp. Not “dry” just like the 8-bit type of world 3, however one thing slightly extra “upfront” if that is sensible. I referenced issues just like the vibe of the refrain in nachi – 賢者の極北 (Nhato Remix) and particularly the huge chords within the drops of Snail’s Home – Pixel Galaxy and did a

throughout One Hour Compo. That sketch labored out very well, so I took a lot of the similar concepts and put them into the monitor for degree 5-1.

Block Chords

The primary refrain options these attribute chord stacks that I used to be mentioning earlier, together with some added arps to spice issues up a bit. After releasing ourselves from the pentatonic scale limitation that I utilized in world 4, it is good to return to utilizing 7ths and 9ths in every single place in these chords:

https://rhythmquestgame.com/devlog/50-chords.mp3

One attention-grabbing subject that got here up with writing these sections was the rhythmic construction of the second refrain, which initially appeared like this with a “4 on the ground” beat:

https://rhythmquestgame.com/devlog/50-fouronthefloor.mp3

It sounds okay, however within the context of the sport, these first three quarter word chords (pink enemies) are fairly boring. In reality, the assault/soar patterns right here go together with the principle rhythm of the block chords, so there’s actually just one factor occurring, which makes it very…monotonous, rhythmically. I ended up altering the drum beat round, including one other bassline layer, and ended up with this as an alternative:

https://rhythmquestgame.com/devlog/50-interestingbeat.mp3

The tweak is delicate, however I feel having two completely different rhythmic issues occurring without delay actually helps make it much less boring and one-note.

Musical Cues

Writing Rhythm Quest music is fascinating as a result of there are tough guidelines that I discover and uncover for myself, however they often aren’t very strict. There are frequent patterns that I will use loads — for instance, flight paths are often represented by sustained notes — however these aren’t at all times true: flight paths are generally represented by arpeggio patterns as an alternative.

It is the identical factor with these inexperienced enemies. Typically I symbolize them within the music with chords (soar + assault on the similar time = 2 notes on the similar time), however I’ve additionally developed sixteenth word rhythms that I’ve began to make use of for them as an alternative:

https://rhythmquestgame.com/devlog/50-16ths.mp3

Different Particulars

I really actually love all the pieces occurring on this tune, there are such a lot of little particulars right here and there that I wish to speak about that I loved placing in.

One is that this washed out glassy synth layer within the background that fills all the pieces out and supplies one other aspect of rhythmic distinction. This is what the primary refrain appears like =with out= that synth:

https://rhythmquestgame.com/devlog/50-withoutlayer.mp3

And here is the model with it added in (pay attention for it!):

https://rhythmquestgame.com/devlog/50-withlayer.mp3

Listening to the primary instance you won’t suppose that something is “lacking”, however I actually really feel like this aspect helps fill within the area successfully despite the fact that it is within the background.

Only one extra audio snippet for you all:

https://rhythmquestgame.com/devlog/50-outro.mp3

You may discover that a number of the leads have completely different timbres right here than in earlier worlds — I’ll be attempting to make use of alternate waveforms for my leads in world 5 to interrupt away from the heartbeat/sq. waves that I take advantage of on a regular basis.

Actually love the excessive filtered noise fill that occurs halfway by way of this snippet as properly, that is only a easy synthesizer utilizing white noise that goes by way of a high-pass filter. Additionally, there’s that glassy synth line within the background once more!

Visible Identification

World 4 used plenty of these translucent cloud layers (straightforward to attract!) to offer plenty of depth and including extra colours to the scene with out really growing the variety of colours in my essential palette (nonetheless at all times restricted to 4 or 8 at a time!):

I knew I wished to do one thing completely different in world 5, however I nonetheless preferred the translucency results, so I made a decision to take a unique spin on it and as an alternative of clouds, thought of different giant clear shapes, like bubbles and gem stones:

So right here as an alternative of getting giant vivid cloud layers, I am utilizing geometric shapes (triangles, circles, diamonds) and utilizing ornamental outlines with translucent fill areas.

You may discover plenty of parallax scrolling with the sunshine beams, which I feel actually makes the scene click on visually. They differ in width, sorting layer, and coloration/depth, so that they create good delicate visible attraction once they scroll previous / by way of one another.

One thing else you will discover is that the bottom can also be partially clear right here! I occurred to encounter this concept and I feel it actually works for this world to set it aside from the others. It additionally makes it a lot simpler to create visible curiosity on the underside half of the display because you get to see the (mirrored) backside half of all of the backdrops now.

I really bumped into some points once I first applied this, since my degree technology code beforehand generated overlapping floor areas in some instances. This wasn’t a problem when the bottom was only a single opaque coloration, however when it is translucent, it is an issue:

Fortunately, these instances weren’t too tough to trace down and repair.

Throughout the refrain sections, I spawn easy diamond-shaped particles that fade out and in as they scroll by. Easy impact, but it surely matches the aesthetic of the extent properly and supplies one other aspect of parallax scrolling so as to add depth.

Menu Work

Since this can be a new world, I additionally wanted a brand new menu theme for it. This is a video of the transition between world 4 and world 5, so you possibly can see what that sound like if you unlock world 5:

Once more, you possibly can hear using block chords and sidechaining right here, similar concepts as throughout the degree itself. I actually like how completely different the entire menu themes are; you possibly can really hear my types evolving and shifting over the course of the years as I work on the sport and experiment with new sounds.

That is it for now! Subsequent up goes to be degree 5-2, which might be going to begin concerning inexperienced enemies + flight paths!


Logged

DDRKirby(ISQ)


Ranges 5-2, 5-3, 5-4

The dangerous information is that it has been 2 months since my final devlog put up! The excellent news is that I’ve completed 3 complete ranges in that point:

https://www.youtube.com/watch?v=IGpfwxg46F8

Degree 5-2

This degree introduces inexperienced enemies which might be positioned at first of a flight path, so you must fairly each buttons and maintain down the soar button as you do:

As with degree 5-1, I wished to attempt utilizing giant partially-translucent shapes for the backdrop. One in all my experiments whereas drawing degree 5-1 was these giant round bubble shapes that I did not find yourself utilizing, so I used them right here as an alternative, together with an “undersea” theme.

Degree 5-3

On this degree now we have inexperienced enemies mixed with spike enemies:

We additionally get inexperienced enemies plus water columns:

Visually, I made a decision to stay to the commonly “geometric” theme for backdrops (matching degree 5-1 fairly intently) and simply used a bunch of thick strains at 45-degree angles that kind a kind of maze-line sample. Once more, there’s giant translucent shapes at play right here.

Degree 5-4

Degree 5-4 introduces the difficult notion of inserting a inexperienced enemy on the =finish= of a flight path, so you must launch the soar button whereas urgent the assault button. This may be fairly difficult to get the cling of, so I made positive to dial the tempo again for this degree to compensate.

For the visuals right here I stored issues fairly easy and simply used translucent rectangle shapes with coloured borders. It could appear to be I am being lazy right here, however a minimum of I’ve managed to get away from the large cloud layers that I used to be seemingly utilizing in each degree for worlds 2 and 4!

The patterns in world 5 really introduce a brand new bodily tapping movement, so I can see the potential for combined reception of the charts and mechanics right here — one thing that I will should show out and take a look at in future person exams. For now, although, there’s just one extra degree to finish in world 5, which suggests I am about 80% executed with the entire 30 essential ranges within the recreation! Degree 5-5 will not have any new mechanics, simply placing collectively all the pieces on show that we have encountered to this point.

Sadly there are some extenuating circumstances occurring in my life which might be pulling my consideration slightly bit away from Rhythm Quest. This is not something new (I had comparable “actual life” stuff to take care of in January, and late final 12 months as properly), simply thought I might word it in case anybody wonders why issues would possibly really feel slightly extra quiet round right here for a bit. My present focus remains to be on ending out the 30 essential ranges earlier than I flip again towards polish and different recreation options.


Logged

DDRKirby(ISQ)


Degree 5-5

Regardless of not having plenty of time/vitality to throw round this month, I someway managed to complete engaged on degree 5-5, tentatively titled “Sensible Boulevard”:

As is common with the final degree in every world, there are not any new mechanics right here, so it is simply combining all the pieces from the earlier ranges and amping up the problem. The tempo is considerably sooner than the slower-paced degree 5-4, which makes the chart much more dense when it comes to inputs.

For visuals, I experimented considerably aimlessly with completely different shapes till I settled on this kind of “spiked” design, mirroring the highest and backside so it seems like stalactites and stalagmites. It is paying homage to the design from degree 5-1, simply with completely different shapes. Once more my lack of visible “complexity” is displaying right here with the simplistic shapes — the visible element actually lies within the layering (translucency!) and parallax scrolling.

I additionally experimented with having syncopated / offbeat spike enemies within the tail finish of this degree (to this point they’ve solely been on downbeats). Usually this can be a little exhausting to learn, however including the inexperienced enemies really makes it advantageous because it provides you a static marker to learn the rhythm (even when the spike enemies had been invisible you can nonetheless play this part advantageous):

That is a type of curious cases the place including extra obstacles (having inexperienced enemies, as an alternative of simply rolling spike enemies) really makes the chart simpler, not more durable. There are numerous sorts of doable problem in Rhythm Quest charting (“random” notes that lack patterns can be extremely awkward and troublesome to learn), however I am following fairly particular charting philosophies to be able to function problem within the “proper” methods — a minimum of, for the principle marketing campaign.

That wraps up everything of world 5, which suggests subsequent up I will have to search out some kind of musical and visible id for world 6, the place I am speculated to introduce triplet-based pace zones!


Logged

DDRKirby(ISQ)


Degree 6-1

I am persevering with to only roll forward with ranges! It is humorous, I really feel like there was a protracted time frame when engaged on new ranges and eager about the mechanics felt intimidating, so I might simply procrastinate on it and work on different miscellaneous issues. However now I feel it is the other (most likely partly as a result of all of my mechanics are identified now), the place I’ve gotten into the behavior of simply engaged on solely ranges. It is good although, the degrees are one thing that should be executed 100%.

In any case, I went straight forward and completed up the primary degree in world 6, degree 6-1!

Pace Zones

World 6 introduces one new mechanic, the pink “pace zones” that improve scroll pace and alter up the rhythmic meter into triplet patterns (quarter word triplets) quickly:

As with a few of my different mechanics, this would possibly get combined preliminary reactions from gamers (or a minimum of, that is the expectation I am establishing for myself…). For individuals who do not “get” triplet meter, it may appear kind of like an arbitrary changeup/speedup that is exhausting to react to. I experimented with having a kind of 2-beat “lead-in” to prep you for the brand new meter, however I used to be fairly sad with how that sounded (messy…) so I took it out. (Perhaps that’ll be an non-compulsory toggle sometime?)

For now I am simply attempting to provide the participant some straightforward pace zones at first in order that they’ll hearken to and get used to the rhythm, earlier than I throw precise quarter-note triplets at them:

You won’t have seen it till I pointed it out (now it’s going to stick out like a sore thumb…), however not one of the pace zones have any peak ramps — they’re all utterly flat. I could not actually get the “conveyor belt” graphic to look fairly good at an angle, so I simply determined so as to add that as a restriction (the extent generator will most likely be actually confused if you happen to attempt to add ramps in the midst of it). I am completely happy with that although, it makes them easy to learn…and I even have the identical restriction for spike enemies (they’ll journey throughout ramps, however the precise soar must be on flat floor), so it is probably not a brand new factor. I assume technically I can assist peak adjustments within the type of air soar combos and flight paths, however these have not come up but.

Visible Identification

This one was straightforward since I had already been pondering for a very long time to do an outer area theme for world 6 (possibly kind of a trope to have the ultimate space be space-themed?). One of many worries right here is that the entire degree backdrops are simply going to look comparable since they will all simply be darkish skies with stars, however hopefully I could make them slightly bit distinct by experimenting with completely different foreground components and such.

For this degree I went with kind of a “spiral galaxy”-type drawing with a vivid orb within the center. In hindsight, I most likely might have drawn it greater…however I assume this fashion it is extra of a single aspect fairly than filling a lot of the display, which works too. It seems like there’s all types of colours in there, but it surely’s actually simply the 8-color palette, however with a bunch of translucent layers. It was really fairly enjoyable to attract, because it felt like extra of a painterly (impressionistic?) strategy throwing blobs and dots of colours in every single place fairly than the geometric shapes from world 5. You can too see that I am making heavy use of the spraypaint device for the primary time right here, notably within the gentle “nebula”-like patterns within the background.

As common, I attempted so as to add in some quantity of variation within the coloration palette relying on the completely different sections of music. Right here I swap to a very black background coloration for the primary “essential” part of the tune to up the distinction degree slightly bit:

I am hopeful about this artwork type for world 6! Hopefully I will be capable of draw some good backdrops by experimenting with this basic route. I used to be a bit apprehensive at first since I really feel like “area” artwork tends to not do properly with such restricted coloration palettes, but it surely’s turning out advantageous with intelligent use of dithering-like results and translucency.

Musical Identification

Not like with world 5, I did not do a complete ton of musical exploration earlier than beginning off on this degree…I kind of simply “winged it” and went with some tough concepts, seeing what got here out of them. I knew I wished to attempt taking part in round with whole-tone scale melodies, however I used to be additionally inquisitive about exploring extra assorted bass sounds (possibly even dubstep-esque), in addition to that includes outstanding use of arpeggios and low-pass/high-pass filter automation.

This is a snippet showcasing the “wub” bass featured on this monitor, in addition to a triangle wave synth that performs a complete tone scale sample. I dunno, someway wobbly basses and triplet rhythms virtually looks as if a little bit of a musical trope…

https://rhythmquestgame.com/devlog/53-wholetoneandbass.mp3

This is one other snippet, displaying off some low-pass filter automation on gated chords, in addition to an arpeggio that has some lengthy reverb on it (spacey!).

https://rhythmquestgame.com/devlog/53-arpfilter.mp3

And here is an extended snippet of the principle buildup within the tune. I take advantage of a unique (however still-prominent) bass right here, and slowly open up the filter because it builds. As with world 5, I am making heavy use of triangle-wave tom fills to intensify the rhythmic changeups.

https://rhythmquestgame.com/devlog/53-buildup.mp3

Degree Choose

A brand new world additionally means a brand new degree choose theme! This is a brief video the place you possibly can hear that in motion:

I had a number of false begins on this one earlier than I landed on the thought, but it surely sounds nice! I like how the main IV -> minor iv development works right here. You possibly can hopefully hear the low-pass filter automation on the chorded synth, in addition to the reverbed quick arpeggio sample — similar concepts as within the degree.

There’s nonetheless a bunch extra to discover with pace zones and the way they mix with the opposite mechanics, which must be attention-grabbing to determine over the course of those subsequent 4 ranges! I may need to tread a difficult stability since quick rhythms (e.g. double-hit enemies) are =actually= quick in pace zones, so these will solely be possible if I take the general tempo down a notch…


Logged

DDRKirby(ISQ)


Backdrop Optimizations

Considerably unexpectedly, I took a break from engaged on ranges this month to focus as an alternative of **efficiency and reminiscence optimizations**. This was introduced on by the truth that I made some launch builds for the primary time shortly and located that my iOS construct crashed on startup as a result of it was operating out of reminiscence loading the principle menu!

The primary perpetrator? These enormous backdrop texture atlases…(this one is 64 MB!)…

The Downside

Your first thought upon seeing these atlases is that they are actually wasteful. Why is there a lot empty area within the upper-right? Nicely, that one is as a result of the feel atlases should be even powers of two in dimensions (1024, 2046, 4096). I might, after all, have every layer be separate, with out packing them right into a single atlas, however then I might lose all of the efficiency advantages of having the ability to batch the draw requires the entire background layers collectively.

The higher query is why does every backdrop layer have a lot vertical padding? Nicely, I did not wish to make any assumptions concerning the participant’s side ratio, decision, or zoom settings, so the best means for me to unravel that was to only writer all of my backdrop layers with a great deal of vertical leeway, so that they’re going to at all times be totally in view.

Every separate layer is exported at 500×1200 pixels (very tall!), after which tiled horizontally by the sport. A few of the ranges have upwards of 10 or 15 separate backdrop layers, in order that’s numerous pixels…

Texture Encoding

The very first thing I wished to do was see if I might simply retailer the textures extra effectively with out altering something about my authoring workflow. You might have seen that the feel atlases are all grayscale (no coloration). It is a change I made a very long time in the past, again once I determined to make use of a palette shader for the backdrops. Basically, I solely actually need to symbolize indices into my coloration palette (presently, certainly one of 11 colours), so throughout my export I simply use grayscale colours that the pixel/fragment shader can learn after which interpret as coloration 0, coloration 1, and so forth. I additionally generally have partial transparency, so the alpha worth can also be vital.

Nevertheless, the textures are nonetheless encoded as 32-bit RGBA, which suggests 8 bits are assigned to every of the pink, inexperienced, blue, and alpha channels! That is fairly wasteful, so I wished to look into whether or not Unity helps different lossless texture codecs (throughout a number of platforms). It does, in truth you possibly can really use the “R 8” texture format, which completely encodes a pink channel (nothing else!), and solely makes use of 8 bits per pixel (25% of what I used to be presently utilizing!).

That appeared good, as actually all I wanted was grayscale values in any case. The one drawback was that I nonetheless wanted to retailer alpha values to deal with partial transparency. May I someway pack each the colour index, and the alpha data, into 8 bits?

Since I solely have 11 completely different colours in my coloration index, 4 bits is sufficient to encode that (2^4 = 16). That would depart the opposite 4 bits to retailer alpha data, which might imply I might have 16 completely different doable alpha values. That is greater than sufficient for my functions, so I went forward with this technique of utilizing 4 bits for coloration encoding and the opposite 4 bits for alpha values:

To get this all working, I wanted to first write a python script to take all of my unique backdrop exports and encode them into an 8-bit pink channel such as you see above. Then I wanted to change my palette shader to do the reverse: take the 8-bit encoding and parse it right into a coloration index and an alpha worth.

After a bunch of shader math debugging and fussing round with bit arithmetic, it was all working (all the pieces seemed the identical as earlier than) and the iOS construct was not crashing. Hooray!

Texture Cropping

We are able to nonetheless do higher, after all. The following step was to see if I might eliminate the entire additional padding on the highest and backside of many of those photographs. Take this cloud layer for example:

Ideally we might solely retailer the precise texture information that basically issues (the center part). The highest half is all clear, so we are able to simply discard that, after which for the underside half we are able to simply “clamp” the feel lookup in order that the bottom-most opaque row is basically repeated indefinitely.

Doing the crop itself is easy sufficient — I simply modify my python image-processing script to research the rows of the picture and trim it accordingly. We find yourself with this good cropped model of the picture:

The trickier half is that we now must render this in the identical means as the unique texture. There are a few issues with this…

First, the brand new origin/middle level of the sprite is completely different than earlier than, since we trimmed an unequal quantity of rows from the highest and backside, so it will be offset from the place it was speculated to be drawn. To repair this, I added processing to my script to maintain monitor of how a lot the brand new cropped sprite is offset by. I additionally monitor another vital metadata, equivalent to whether or not the highest or backside sections (or each) must be repeated transparency, or a repeated opaque row. Then I output that each one to a C# file that I can learn in:

{ “level2-5_background_4”, new Entry {
    Offset = -62.5f,
    TopTransparency = true,
    BottomTransparency = false,
    OpaqueBelow = 1,
    OpaqueAbove = 55
} },

My backdrop tiling script is chargeable for taking the saved offset metadata and shifting the middle place of the rendered sprite accordingly.

The second subject is that whereas Unity helps texture coordinate clamping, there isn’t any means to do this when the sprite in query is certainly one of many sprites packed right into a texture atlas! Unity’s sprite renderer solely handles tiling in a really particular means, which not utilized to what I wished to do, so I needed to modify my fragment shader to deal with the feel clamping half.

With a purpose to do that texture clamping appropriately, I additionally wanted my fragment shader to know what UV texture coordinates it was speculated to be working with inside the feel atlas. Usually the fragment shader is totally oblivious of this — the Sprite renderer is chargeable for handing it a set of UVs to render after which the shader simply does the feel lookups blindly.

It additionally seems that you do not even have entry to the sprite UV metadata from inside your fragment shader =/. So I wanted to move these into the shader, =and= I could not use uniform variables since that might break batching. Fortunately, Unity occurs to show a SpriteDataAccessExtensions class which lets you write to the UV texture coordinates of the sprite mesh utilized by a sprite renderer internally.

Along with permitting you to change the principle UVs, it additionally helps you to set extra texture coordinates on the mesh (TexCoord1, TexCoord2, TexCoord3, and so forth.). I used these to move additional information to the vertex shader — after which by way of to the fragment shader — together with the sprite UVs from the feel atlas.

This took much more debugging to get proper, however on the finish of all that, it was working! This is the brand new model of the feel atlas from earlier than (in all its red-channel glory), which is 1024×1024 as an alternative of 4096×4096, and 1 MB as an alternative of 64 MB!

Assuaging Overdraw

Rhythm Quest is not actually a performance-intensive recreation, so it runs advantageous on most methods. That stated, there are a few areas the place it might probably get into efficiency points on lower-end gadgets (surprisingly, the Nintendo Swap is the principle perpetrator of this to this point).

One main efficiency bottleneck entails overdraw, which is a time period used to explain when pixels should be rendered a number of occasions — sometimes a problem when there are numerous completely different clear / not-fully-opaque objects rendered in the identical scene (*cough* backdrop layers *cough*).

Not like in a generic 3d scene (the place we’d attempt to render issues from front-to-back, to attenuate overdraw), for our backdrop layers we have to render issues from back-to-front to be able to deal with transparency appropriately:

Sadly, this outcomes elements of the display being rendered to many occasions time and again, notably the decrease areas (all of these overlapping cloud layers…). The excellent news is that the cropping we did above already does some work to alleviate this a bit. Earlier than, the massive clear parts of backdrops would nonetheless must undergo texture lookups and be rendered by way of the fragment shader, despite the fact that they had been utterly clear (i.e. did not have an effect on the output). However now, we have cropped these areas out of the sprite rendering completely, so they don’t seem to be a priority.

We are able to nonetheless perform a little extra optimization, although, for opaque backdrop sections! Take this layering of opaque cloud layers from degree 2-5 for example:

There’s plenty of overdraw taking place on the underside sections of the display. What if we had been good about this and stored monitor of which parts of the display are being utterly coated by every layer, front-to-back? That will allow us to render smaller display sections for the entire again layers:

We are able to deal with this by having our picture processing script retailer some extra metadata (the “OpaqueBelow” and “OpaqueAbove” fields) so we all know at which level a background layer obscures all the pieces above or beneath it. We then want to change the backdrop script to regulate the drawing rect and UVs accordingly (simpler stated than executed…)…

The top results of all of that is…that all the pieces seems precisely the identical as earlier than…

However! It is considerably extra environment friendly each when it comes to reminiscence utilization and rendering time. I will should patch the prevailing demo builds with this optimization in some unspecified time in the future, however the Swap construct is already displaying some enhancements, which is sweet.

We’re not utterly executed with efficiency although, as proper now the rendering of the water sections are additionally fairly inefficient! I could attempt to sort out that subsequent…


Logged

DDRKirby(ISQ)


Gamepad Rebinds, Odds and Ends

I am persevering with my break from engaged on world 6 ranges for now. I’ve despatched out the present construct to some inside beta testers to get some suggestions on the problem scaling and reception to the newer mechanics, so I wish to give myself an opportunity to let that suggestions are available in and stew on it for a bit earlier than I proceed on with the final 4 ranges of the sport.

Within the meantime, I have been attempting to sort out some enhancements and fixes which have been laying round in my backlog for some time…

Gamepad Rebinds

This one has been desired (and requested) a protracted whereas in the past, however I stored on placing it off as a result of I wasn’t positive precisely how I wished to deal with it.

I already had management rebindings working simply advantageous for keyboard controls, which have a single key assigned to every motion:

The issue with gamepad bindings is that by default the gamepad controls have many various bindings: to leap you should use the d-pad, the left analog stick, the south or east face buttons, and even the left shoulder button.

I used to be kind of at a loss for the right way to take care of this, each when it comes to the UI (the right way to present the mixed default bindings?) and when it comes to implementation (the right way to override the complete set of bindings without delay?).

Like many different difficult issues I’ve run throughout in Rhythm Quest, letting it sit behind my head for some time allowed me to provide you with a unique strategy:

Gamepad and keyboard bindings now every have their very own standalone submenu (not out there on platforms the place they do not apply). Extra importantly, there’s a person setting that toggles between a “default binds” set and a “customized binds” set. The default binding set options a number of binds, whereas the customized binding set solely has two (that may be overriden by the person). This elegantly (?) solves the difficulty I discussed above.

This additionally lets me illustrate the controls in a hand-drawn diagram, one thing that is most likely simpler to parse than “Leap: DPad, Left Stick, Left Shoulder, A, B, …”

Utilizing the identical system, I am even in a position to detect whether or not a (supported) gamepad is plugged in in any respect, and dynamically replace the display accordingly:

I adopted the identical tech for the keyboard bindings display as properly (had a little bit of enjoyable attempting to attract a keyboard format):

You may discover that I made a decision to additionally increase the default bindings to only embody the complete left/proper half of the principle keyboard keys. Unity does a fairly good job (?) of detecting keys based mostly on bodily location, so this could work even if you happen to use a nonstandard key format like I do. I am unsure what’s going to occur for non-ANSI bodily layouts, however I am assuming the customized binding system will suffice for any odd edge instances.

For now I am offering two customized binding slots for every motion (an enchancment over earlier than the place you can solely use one key), in case you wish to alternate keys for sooner sections.

As common, there is a ton of foolish little particulars that should be dealt with with enter rebindings, and as common, Unity supplies simply sufficient performance to be useful, but additionally forces you to work with a ton of abstractions like “InputControlPaths”, “InputActions”, and “ControlSchemes” that find yourself making your head spin when you consider them an excessive amount of. That you must, for instance, ensure that a rebinding may be cancelled by way of both Gamepad OR Keyboard enter (the enter system by default solely lets you outline a single cancellation binding…)…

Rendering Artifacts

It is a actually foolish one, the form of factor that you just’d by no means think about can be a problem, however someway it’s. Rendering the sport to a width or peak that is an odd quantity (e.g. 1013×533) causes bizarre visible artifacts:

That is brought on by digicam scaling and such — right here, the decision is 501×301 and the sport has determined to render the pixels at 2x, which suggests the bottom decision is 250.50×150.50, which does not work out too properly.

I attempted to deal with this earlier than by mechanically resizing the sport window and forcing it to be a a number of of two, however that did not work too properly. My new resolution is to deal with the rendering correctly by shifting the digicam by an identical fractional quantity, so right here we merely shift the digicam over by a half pixel and thankfully that works to make things better.

Launched Early/Late

Instructed by certainly one of my playtesters — the “Too Early / Too Late” textual content for holds is now extra particular in calling out “Launched Early / Launched Late”. A brilliant straightforward repair that hopefully helps readability a tiny bit:

I am glad I obtained round to a few of these enhancements and fixes (which must be coming to the demo quickly), however I really feel like I’ve solely simply scratched the floor of the work that must be executed. Even for the gamepad rebinding system, I nonetheless want to check the way it works on Swap / for different sorts of gamepads, and will even stand to attract completely different graphics (particularly for the Swap joycons). There’s additionally some tweaks that I’ll be attempting to take a look at after seeing how playtesters fared with the present construct…

The 12 months is about midway over and sadly my progress hasn’t been tremendous nice — I’ve solely managed to complete off 6 ranges in that point, plus some optimization work/and so forth. In fact, I had some actual life stuff occur that drew my consideration away, however that is additionally kind of true within the upcoming months as I assist mentor for a online game event. That “finish of 2023” date is beginning to really feel actually scary once I give it some thought…


Logged

DDRKirby(ISQ)


Gameplay Modifiers and Extra

Regardless of what it’d appear to be, I’ve really been engaged on numerous various things for Rhythm Quest not too long ago! Let’s get proper into it…

Recreation/Music Pace Mod

Now you can change the pace of the music to make the sport roughly troublesome:

A few of you could be questioning why this took so lengthy to return to the sport, contemplating how this has really been a debug-only function for some time. Altering the pace/pitch of the music is not really very exhausting, the issue is getting the entire music synchronization (and respawn, and pause) logic to work correctly in tandem with it.

I am completely satisfied to report that this has been applied correctly now! It is undoubtedly not so simple as it may appear…each time you modify the setting within the pause menu, what I might =like= to do is to right away improve the pace of the currently-playing pause music loop, then modify the audio timing variables accordingly. However there isn’t any means to do this in a means that respect the audio synchronization completely, for the reason that audio timings are all operating individually.

As an alternative I’ve one other copy of the pause music which is about to play on the new pitch/pace. As an alternative of attempting to play that one instantly, I schedule it to begin taking part in 0.2 seconds from now (scheduling sounds prematurely is the one means to make sure that they set off at a exact time on the audio timeline). Sadly, I can not schedule a “cease” command in the identical means for the primary model, so as an alternative I merely look forward to roughly 0.2 seconds after which do a flip the place I set the amount of the primary loop to 0 and the second to 1 on the similar time. Doing all of this lets me preserve the beat synchronized with all of my timers appropriately.

In fact, for the reason that complete course of does take slightly little bit of time (0.2 seconds), I additionally wanted to implement a easy wait, in case you set off the button twice in fast succession — the second music pace change does not happen till the primary one is completed.

In any case, this shall be out there within the upcoming 0.28.0 patch, so gamers can both use decrease speeds to follow / get by way of troublesome sections of the sport, OR use larger speeds to provide themselves an additional problem.

Timing Home windows

I even have a model new setting for modifying the lenience of the timing home windows for obstacles:

This impacts the collider sizes of the varied obstacles within the recreation. This is how that appears for a primary flying enemy:

Initially I had a loopy half-baked concept in my head that to implement “additional leniency” I might really buffer inputs for you and delay them mechanically to “auto-correct” your early inputs…and for late inputs, I might simply “freeze” the character in place for a cut up second to provide you additional time to hit the proper button. I noticed, although, that this might make empty jumps and assaults (those you do for no cause) really feel actually sluggish and awkward. I might try to do some methods to right for it, however in the long run I figured that modifying the sizing of the colliders was less complicated and simply as efficient, whereas sustaining the tie between your enter and the sport reacting instantly.

One cool factor is that the setting works for jumps too, despite the fact that you would not suppose they’ve a “collider” to change. It’s because each soar (even when it is only a regular one over a pit of spikes) has an invisible set off object (that is what spawns the blue “spinning sq.” visible impact). So long as you soar whilst you’re within that set off zone, my soar logic will autocorrect the size of your soar to make you land within the acceptable spot. I additionally already applied “coyote time” jumps that may can help you soar even after operating off a cliff (so long as you are still throughout the right set off space), so all of it simply works. This is that in motion with the additional huge timing home windows:

Ghost Helpers

I obtained to see and/or hear about quite a lot of play experiences once I did my final inside playtest. I will not lie: the design of Rhythm Quest is nearly completely pushed by my very own sensibilities, but it surely’s nonetheless helpful to see different views so I could make small course-corrections and admissions once I really feel crucial.

Curiously (or possibly this should not actually be shocking), completely different individuals appeared to battle roughly with completely different facets of the sport — for some, the water zones actually threw off their capacity to learn the charts, whereas different individuals talked about the ghost enemies being troublesome to learn since they felt like they wanted to react to every of the brand new positions.

For individuals who battle with the ghost enemies, I’ve added a brand new helper possibility that may show pointers for the second and third positions of the ghosts:

This does, after all, take away from the complete conceit of the ghost enemies to start with (with the helpers, it is no completely different than three pink enemies), however I actually do not thoughts including these types of modifiers when the implementation is so easy (and I am not busy engaged on different issues). You possibly can play Rhythm Quest nevertheless you need!

Efficiency Settings

I already did a bunch of labor on efficiency optimizations in a earlier stint of labor, however I am completely satisfied to report that I’ve additionally made the rendering of the water sections extra performant: beforehand, the render textures used to implement the “wavy” water shader had been means greater than they wanted to be…now they do not prolong previous the peak of the display, and dynamically shift based mostly on the digicam to be extra environment friendly.

Nevertheless, I additionally wished to provide a nod to some lower-end gadgets, and ended up including a graphics high quality toggle that may disable the flowery water shader completely, in addition to reduce out a number of the translucent backdrop layers (that I choose by hand) in an try to make rendering extra performant. I additionally added one other engine-level setting for controlling body queueing. These all stay on a brand new sub-settings web page that comes full with a quick-and-dirty FPS counter and a few water zones within the background so you possibly can see the consequences of the settings stay:

Different Stuff

Some miscellaneous different stuff was added too, like a “screenreader” command-line flag that may drive the sport to begin in screenreader mode even when it does not auto-detect that one is enabled.

In an try so as to add slightly extra discoverability to the store menu, I additionally made that accessible from the “Extras” menu along with the traditional place within the degree choose display. I additionally renamed “Cheats” as “Recreation Mods” since I am throwing in the entire timing and visible modifications that I’ve added there. Most of these are additionally accessible by way of the in-game menu, which may be useful if you happen to want a short lived help for a troublesome checkpoint that you just’re struggling on.

I feel that about covers it for what I have been engaged on these days!


Logged

DDRKirby(ISQ)


Degree Editor, Scoring Rework

I have been kinda radio-silent over the previous month. The primary a part of that was attributable to merely not getting that a lot executed, however within the latter half of the month I had a greater (and extra thrilling) cause for foregoing updates: I have been exhausting at work constructing out the preliminary skeleton of the Rhythm Quest Degree Editor!

Altering My Thoughts on the Degree Editor

These of you who’ve been following alongside for some time will most likely know that I’ve at all times had plans to construct out a Degree Editor for Rhythm Quest, however that I had initially pegged it as a post-release function — one thing that I might construct after the discharge of the preliminary recreation. I wished to ensure that I centered my efforts on bringing the principle recreation to a completed state, even when it meant sacrificing some additional options that could not make the reduce. Constructing a degree editor isn’t any small activity and I wasn’t even positive precisely how I might be capable of do it. Would it not be a wholly separate software? What would the interface seem like? Would I’ve to refactor the complete degree technology course of once more? What codecs would ranges be saved in? How would I load in exterior music recordsdata? How ought to I deal with copyright disclaimers?

Regardless of my robust perception that Rhythm Quest ranges work finest when you’ve got somebody (like me) rigorously crafting each music and charting collectively, and making certain that the degrees comply with canonical Rhythm Quest charting conventions, I perceive that the extent editor is a popularly-request function and will actually assist to deliver pleasure to the sport in a mess of how. However the cause that I made a decision to vary my thoughts and begin engaged on the extent editor now (as an alternative of post-release) is way less complicated: I merely obtained inquisitive about constructing it.

On-Demand Degree Era

Like so many different challenges that I’ve come throughout in engaged on Rhythm Quest (like the brand new coin/medal rework, which I will speak about later), the extent editor conundrum was a type of issues that kind of simply sat behind my thoughts for a very long time till I had lastly devoted sufficient spare idle cycles to it and was starting to have some concepts of the right way to really get began engaged on it. There may be after all one thing to be stated for maintaining function creep down, however I’ve discovered that “engaged on no matter I am enthusiastic about” is often an excellent strategy for maintaining me going.

Rhythm Quest ranges are authored as strings of occasions. This is how the charting for degree 1-3 is written out, for instance:

“Obstacles”: [
    “#… …. *… *… *… *…”,
    “#^.^ .-11 .^.^ .+11”,
    “#+.- .*.* .+.- .*.*”,
    “#.11 ..^1 ..^^ 1111”,
    “#*.* .*.* .111 1.11”,
    “#.^^ ..** ..^^ ..**”,
    “#.^^ ..** ..^^ ..**”,
    “#1.+ .1.^ .1.- .11*”,
    “#1.+ .1.^ .1.- .1**”
],

The completely different symbols listed below are a illustration of several types of occasions. ‘#’ represents a checkpoint, for instance, whereas ‘1’ is a primary enemy, and ‘^’ is a standard soar. (‘*’ is shorthand for a soar adopted by a flying enemy.) When the engine parses this string, it converts it into its respective sequence of timed occasions, so one thing like:

_events = {
    new EventData(0.0f, EventType.Checkpoint),
    new EventData(8.0f, EventType.NormalJump),
    new EventData(8.5f, EventType.SingleEnemy),
    new EventData(12.0f, EventType.NormalJump),
    new EventData(12.5f, EventType.SingleEnemy),
    …
};

This (together with different metadata concerning the degree) then will get handed off to the extent technology process, which is chargeable for processing the entire occasions so as and constructing the precise degree out of them. Usually that is all executed ahead-of-time once I writer the degrees (in a course of I name “baking” the degrees), so the tip degree objects are saved into the scenes on to optimize load time.

Now, the way in which that the (work in progress) degree editor works is just by sustaining an identical record of occasions that compose the extent being edited, and re-generating the extent once more each time there’s any change. It may appear terribly inefficient to maintain rebuilding the extent in comparison with simply enhancing the ensuing degree objects instantly, however there’s plenty of the explanation why it is sensible to do issues this fashion. For instance, altering a listing of occasions is solely extra environment friendly than having to fret about enhancing the precise degree objects (transferring flooring round, and so forth). and I have already got the code to do all of this, so I simply have to fret about offering an interface to visualise these adjustments properly.

Testing the Prototype

A part of the rationale I wished to dive into engaged on the extent editor straight away was just because I used to be curious whether or not this strategy would even be possible in any respect. I used to be apprehensive that re-generating the extent at every change could be too sluggish, for instance. So I created a fast editor scene and made a script to carry a listing of occasions, populated with some take a look at information. I might then invoke the extent technology course of at runtime from there…

…and have all the pieces be completely damaged. The entire objects within the recreation are all constructed assuming that if the sport is operating, the extent is meant to be taking part in. In addition they assume {that a} tune is taking part in, that they’ll question for the present music time, {that a} participant occasion exists, and so forth. So I needed to do a bunch of refactoring to deal with this unplanned-for case the place now we have all of those degree objects, however they are not actively updating as a result of we’re within the degree editor.

One factor I wished to shoot for was to have the ability to immediately soar from the extent editor into taking part in the extent, with out having to undergo any kind of scene transition or something like that. So I wanted to ensure the extent enhancing scene additionally contained all the pieces wanted for the bottom recreation, together with the participant occasion, the music controller, and so forth. I additionally wished to see if I might efficiently load in audio recordsdata specified by the person. This is what all of that appears like in motion:

After doing all of those refactors, I had a easy prototype and I might add in primary enemies or floor ramps by urgent a key on the keyboard. One of many first issues I did after that was to see what the efficiency was like once I triggered degree technology, particularly after I added a ton of occasions and made the extent longer. To my delight and shock (particularly as a result of the total degree baking course of usually takes a bit), the efficiency was really fairly acceptable! I used to be initially anticipating to see like 1-2 second pauses as soon as the extent obtained longer, but it surely appeared prefer it was solely a minor hiccup more often than not.

That is additionally with none kind of optimization — of which there might be many. Apart from simply uncooked “cache issues, do work forward of time, make the code sooner”, there’s additionally the truth that most occasions should not require the =complete= degree to be rebuilt. Sure, a change within the floor ramp early on does imply that the peak of the remainder of the extent will change, however a minimum of you possibly can skip re-generating all the pieces that got here earlier than that. And including or eradicating enemies should not require the complete remainder of the extent to vary. If it got here all the way down to it, I might drive you to work on just one checkpoint part at a time. Nevertheless it seems like I haven’t got to fret about any of these optimizations (but).

Enter Timeline

There’s going to be plenty of work for me to do within the upcoming weeks for implementing varied instruments in order that the editor can really present sufficient performance to create a full degree — each when it comes to the entire precise degree obstacles (water zones, flight paths, and so forth.), in addition to the extent metadata (music BPM, scroll pace, background palettes). One factor I did within the meantime was to implement what I am calling an “enter timeline” function, the place the anticipated inputs are displayed as coloured diamonds in a separate monitor beneath the extent. I added this principally to be used within the degree editor, however I additionally made it operate in-game in case you wish to use it there:

The precise look of it will most likely should be adjusted (not very colorblind-friendly proper now both), however this can be a actually helpful view for the editor already, and can most likely turn into much more vital as soon as I look into extra superior enhancing options (enhancing by way of keyboard or perhaps a “file” type stay play). One factor about this enter timeline is that you may see simply how boring of a recreation Rhythm Quest is when it comes to the uncooked inputs. An enormous a part of the attraction of the sport (to me, a minimum of) is parsing the platformer-like obstacles into rhythmic components; if the chart is simply specified by entrance of you want this it is actually not too attention-grabbing.

Scoring Rework

I did this some time in the past however by no means wrote about it. Even if I’ve already tweaked the coin / respawn / medal scoring system a number of occasions (at varied time limits it is alternatively been based mostly on respawns and cash), I’ve iterated on the system as soon as once more. I used to be by no means proud of how the medal thresholds felt each arbitrary and likewise not very seen, so I labored out a “progress bar”-style animation within the degree finish display to point out that off visually:

The thresholds are actually simple and simple to recollect based mostly on the visible (25% = bronze, 50% = silver, 75% = gold, 100% = good). Beforehand you had been awarded a bronze medal merely for finishing a degree, however I’ve modified that, so you will simply haven’t any medal if you happen to completed with lower than 25% cash.

Together with this, I am attempting out a brand new system for coin loss quantities. Beforehand you at all times misplaced a hard and fast quantity (5 cash) on each respawn, however this often led to individuals both getting very near good, or shedding virtually all of their cash on a selected part or two that they’d hassle on, even when they carried out very properly by way of the remainder of the tune. I’ve at all times wished one thing that scales extra cleanly, like for instance each time you respawn you lose 50% of your cash, however that by itself does not work properly as a result of it is extraordinarily punishing for single errors which might be made late in a degree.

The best way it really works now could be extra sophisticated, however ought to hopefully be extra “balanced” when it comes to coin losses. The brand new system internally maintains two completely different coin numbers — the cash that you’ve got not too long ago collected, and the cash that you’ve got “banked”. At each checkpoint, half of the cash you’ve got readily available are put into the “financial institution” and might by no means be misplaced from then on. And at each respawn, half of your non-banked cash are misplaced. The concept is that this technique rewards you for performing properly, and might’t totally “take away” that reward even if you happen to mess up loads afterwards. It is a bit obtuse in that it is a fairly hidden mechanic, however I just like the simplicity of implementation and the truth that I am not utilizing some actually random quantity like 5. We’ll should see the way it works in follow, although!

That is going to do it for now. I am attempting my finest to get the extent editor off the bottom…it is plenty of work, but additionally attention-grabbing and thrilling since there’s so many little methods that should be written, for the primary time! There’s sadly an excellent probability that it will find yourself pushing again my launch date to 2024, however…I am hoping you will all agree that the customized ranges that may come out of this shall be well worth the wait.


Logged

DDRKirby(ISQ)


Degree Editor Progress

I have been persevering with to attempt my finest to clock in some hours towards fleshing out the Rhythm Quest degree editor! This is some fast demos of what’s now doable within the editor:


Extra Instruments

The extent editor has a LOT of performance that must be constructed out, so plenty of the time was spent simply towards implementing extra instruments, which you’ll be able to see within the demos above. A no-so-short record of what I ended up implementing tool-wise:

  •     “Insert Ground” device to insert clean sections of monitor
  •     “Delete Ground” device to delete sections of monitor + included obstacles
  •     Undo/Redo, (with Ctrl+Z / Ctrl+Shift+Z/Ctrl+Y keyboard shortcuts)
  •     “Leap” device which inserts both floor jumps or air jumps
  •     When inserting or deleting jumps, the opposite obstacles modify (e.g. floor soar turns into air soar)
  •     Visualization for soar arcs (additionally supplies one thing to click on to delete jumps)
  •     “Flight Path” device helps you to click on and drag to insert flight paths
  •     “Ghost Enemy” device for purple multi-hit enemies
  •     “Edit Ramp” device for adjusting the slope of floor / flight paths
  •     “Checkpoint” device for including checkpoints
  •     “Spike Enemy” device for including spike enemies
  •     “Scroll Pace” device for adjusting the relative scroll pace of every part
  •     “Water/Pace Zone” instruments allow you to click on and drag to insert these zones

Character Preview

One thing cool you will discover within the gifs is an animated character preview that goes by way of the extent. It isn’t too fancy, because it does not really work together with any of the obstacles, but it surely’s a enjoyable little visible preview that did not require a ton of effort to make occur.

Throughout degree technology I really already calculate the complete participant path by way of the extent — that is wanted to know the place to position obstacles equivalent to cash, flying enemies, and the like. (That is really simply certainly one of a number of such calculated paths; there’s one other one for the digicam, for example) You possibly can see that on this debug view in pink right here:

Since I have already got this path readily available, it was easy to only create a preview sprite that traced alongside the identical path on the right pace. The one different work I wanted to do was to set off the suitable animations based mostly on the impediment timings. There is not any collision detection or something like that, so it is quite simple!

Tooltips and Notifications

One other factor you might have seen is that I’ve added tooltips for the completely different buttons within the editor! Proper now most of them are on a giant palette on the left (with some extra ones on the bottom-right), and so they’re simply icons, so I believed it will be good to point out slightly tooltip if you over over every button:

Together with that, I additionally applied a notification system on the high of the display! This not solely provides you slightly extra context for the right way to use every device (a few of them contain dragging, others simply require clicking), but additionally shows data on actions equivalent to undo / redo historical past:

I wished this to look good, so it helps the flexibility to both present a number of notifications without delay (mechanically scrolling them as they fade out), or exchange an present notification. The best way this works is that there are completely different “slots” for notifications, so for instance if there’s already a device choice notification displaying, it’s going to simply exchange that present one as an alternative of displaying a model new one.

Menu Hookup

I additionally took a second to make the extent editor accessible from the principle menu:

Proper now the “Customized Ranges” menu is empty in any other case, however ultimately there’ll should be some approach to import / browse present ranges (extra work for later…).

As a facet word, the buttons in the principle menu now modify their peak dynamically as an alternative of at all times being the identical. It’s because the principle menu really has roughly buttons relying on a complete slew of things:

  •     The “Stop” button is not proven on net or cell builds
  •     The “Wishlist” button is just proven on demo builds
  •     The brand new “Customized Ranges” button may additionally have some restrictions (?) (TBD)

I do not know why I did not do that earlier, but it surely was easy sufficient to arrange with Unity’s format teams. I nonetheless wished the “Begin Recreation” button to be slightly bigger than the others, however I used to be in a position to set that up utilizing customized LayoutElement elements, so now that one is 125% the dimensions of all of the others, and all of it occurs mechanically. Yay!

Waveform Rendering

I additionally ended up taking slightly detour determining the right way to take a music file and calculate + render a waveform right into a texture to show on the display:

This activity entails a shocking quantity of technical finesse! A 1.5-minute tune has some 4 million stereo audio samples, so clearly attempting to plot and course of all of that information is slightly difficult to do in a performant and wise means. Making an attempt to attract a line between every of the 4 million factors is fairly futile, so I did not even hassle doing that.

As an alternative, a standard strategy is to separate the audio samples into chunks — on this case, one chunk for every column of the ultimate output texture. Then for every audio chunk we are able to merely take the min and max sign amplitude for all of these samples and draw a line representing the magnitude of that. (you can additionally use different metrics, equivalent to the typical sign magnitude)

Since you’re processing 4 million samples, this works OK, however remains to be slightly sluggish. The opposite drawback is the right way to really draw the entire strains / pixels into the ensuing texture in a means that is extra environment friendly than merely calling Texture2D.SetPixel(…) hundreds of hundreds of occasions.

It is a uncommon case the place I really dug into the technical particulars of the right way to optimize the efficiency right here — fortunately, there is a Unity weblog put up from earlier this 12 months that describes some particulars of the right way to write to textures effectively, and there is a hyperlink offered to some pattern code that leverages the parallel job system and burst compiler to hurry that up. It appears slightly bit black-magicky, but it surely did the trick and I will generate that texture on the fly and not using a noticeable hitch in framerate (woohoo!).

Proper now since I am simply testing, the waveform seems as an ominous black-and-red texture behind the stage (haha), however ultimately I hope to combine this show into some kind of UI (?) that may show you how to tune the BPM and beat offset of the audio that you just load into the editor. In case you are questioning, the feel is red-and-black as a result of I am utilizing the light-weight one-byte-per-pixel R8 texture format (the identical one I talked about in my backdrop optimizations put up).

Subsequent Steps

Regardless of the entire good work that I have been in a position to accomplish, there’s nonetheless no scarcity of labor wanted to be able to deliver the extent editor right into a fully-functioning state (to not point out a slew of additional quality-of-life options that I’ve considered already). Chief amongst these is the menu interface for adjusting tune timing properties (BPM/beat offset), which is why I began wanting into the waveform rendering tech…however, there’s additionally issues like export/import performance, backdrops, coloration palettes, particle results, (the record goes on…). Hopefully I will have much more to point out off the subsequent time I write an replace!


Logged

DDRKirby(ISQ)


Music Loading, Automated Beat Detection

It appears like I have been actually inconsistent with these devlog entries, however wanting again it looks as if I’ve been principally placing out one per thirty days fairly commonly, so possibly it isn’t as haphazard as I believed!

Music Adjustment UI

Final week I talked concerning the waveform show that I applied utilizing some fancy parallel burst compilation. My essential use case for that performance was to construct out a UI for loading a music file and (extra importantly) specifying and adjusting the tempo and begin time for that file.

After plenty of work, here is what I ended up with:

It is working fairly properly! You possibly can preview the tune, zoom into the waveform, and drag across the beat markers to regulate the timing to your liking, or just kind within the tempo and begin time manually if you have already got it readily available. There’s additionally a built-in metronome operate so you possibly can confirm your work.

This seemingly-simple UI widget actually concerned plenty of completely different transferring items and little quality-of-life touches. There’s easy scrolling and zooming, and I wanted to ensure that the beat markers seem and disappear as you scroll by way of the monitor. Dragging the beat markers previous the tip of the present view additionally makes it scroll mechanically, and a number of the beat measures fade out if you happen to zoom out far sufficient (to keep away from muddle).

It is value noting that I took a number of the performance that I developed alongside the way in which and added it in different places. For instance, since I wanted to implement a metronome to provide audio suggestions on whether or not your tune timings are right, I additionally added that as an possibility to make use of in-game. I additionally added the waveform show to the background of the enter timeline whereas enhancing, to function a further reference:

Automated Tempo Detection

Whereas the “respawn loop” button does nothing in any respect but (that’s speculated to be a separate dialog that lets you present an non-compulsory quick audio loop that may play throughout respawns), the remainder of this huge devlog put up goes to be speaking about that different fairly inconspicuous button, “Auto-detect”.

You may need already guessed it, however clicking this button performs a complete bunch of math and sign processing to be able to procedurally analyze the music file and try to mechanically decide each the tempo and begin time of the music file. This is a brief video of that magic in motion!

It is undoubtedly not good, and it takes a number of seconds to churn by way of the entire calculations (video above has that processing time skipped), but it surely really does a reasonably good job in plenty of instances! It seems straightforward because it’s only a single magic button, however I ended up diving fairly deep into the rabbit gap of audio sign processing and beat/tempo detection algorithms to be able to implement this…

Earlier than I begin explaining the methodology right here, I wished to level out one thing which may shock you a bit. You would possibly suppose that my objective with this automated tempo detection is to make it work so properly that manually setting the timing information for a tune is not crucial. That is a pleasant hope to have, however I am probably not assured I can try this. Quite the opposite, I really suppose for me that it is the different means round: I would like the guide beat-setting interface to work so properly that the automated tempo detection is pointless! In that sense, you can say that the automated detection is absolutely only a secondary nice-to-have function that I might actually have dropped altogether. However, I am a perfectionist, and I discovered the issue attention-grabbing, so I dove in…

Assets and References

Whereas Unity supplies primary entry to audio information (get the samples out of an audio clip as a looooong array of floating level numbers), doing any kind of extra concerned operations (normalization, convolution, filtering) is one thing you will wish to use a specialised C# library for (do not reinvent the wheel!). NWaves was by far probably the most user-friendly and wise one which I personally discovered (although I did find yourself re-implementing explicit elements utilizing Unity’s job/burst methods, for efficiency causes). NWaves was an enormous boon for me and let me do issues like Brief-time Fourier Transforms with out having to be taught a bunch of latest sophisticated math and try to implement it from scratch.

Additionally, I not often discover myself doing this, however for this explicit drawback I ended up consulting a complete bunch of analysis papers which have been written concerning the subject, a few of which had been extraordinarily useful.

“Evaluating the On-line Capabilities of Onset Detection Strategies” by Böck et al specifically supplies a reasonably good survey of assorted approaches to detecting word onsets — this isn’t 100% equal to tempo detection however is intently associated.

Correct Tempo Estimation based mostly on Recurrent Neural Networks and Resonating Comb Filters, additionally by Böck et al, was one of many different extra useful reads.

Detecting a Tempo

The method of tempo detection principally consists of the next steps at a excessive degree:

    Do some preliminary processing on the audio sign to arrange it for additional steps
    Run the audio by way of some kind of detection operate(s) that’s designed to spotlight beats/onsets
    Decide what tempo finest strains up with the detected beats

Preliminary Processing

This step is fairly boring, we principally ensure that the audio is normalized, and transformed from stereo into mono. I additionally add some silence to the start as a buffer and scale the audio ranges a bit (apparently working in a logarithmic scale tends to carry out higher).

In some approaches the audio is filtered and cut up into a number of elements — for instance one copy with solely low frequencies, one other with mid frequencies, and one other with larger frequencies. I did not discover this to work tremendous properly for me and it additionally provides extra processing time since every filtered copy must be processed individually, so I simply caught with a single unified copy of the audio. Nevertheless it’s value noting that filtering is a comparatively frequent method right here, and your mileage could differ.

Spectral Evaluation

Now we have to take the music monitor and provide you with some approach to detect onsets or “robust assaults” within the audio.

The very first thing you would possibly consider is to take a look at the locations within the audio the place the amount is loudest. Which may work decently properly for a single part of music with an remoted instrument that appears like this:

However for a loud tune that has many various components occurring on the similar time, the waveform seems extra like this:

A part of the issue right here is that the entire completely different sound frequencies that make up the tune are represented collectively in a single waveform (one huge array of floating level numbers), so it is virtually unattainable to isolate completely different musical occasions.

The Fourier Rework may also help us right here by changing a single audio sign right into a breakdown of the completely different frequencies that comprise that sign. For those who’ve ever seen any kind of spectrum visualizer like this one, the Fourier Rework is what’s getting used to guage how tall every “bar” within the spectrum is:

This is the identical advanced waveform from earlier above, however this time displayed alongside its spectrogram (generated utilizing a type of the Fourier Rework). Discover how one can not solely see a vertical line sample (equivalent to the large kick drum hits), however you may as well see distinct horizontal bars that correspond to completely different notes being performed on the lead melody synth.


Onset Detection

NWaves can carry out “Brief-Time Fourier Transforms” to be able to generate the equal of the above spectrogram, which is nice. Nevertheless, we nonetheless want a programmatic approach to get from the spectrogram to some kind of analysis of the place word/beat onsets are.

There are numerous approaches to doing this. In reality, a number of the finest outcomes are executed utilizing neural community strategies…which sadly are slightly too far out of my wheelhouse for me to implement.

As an alternative I went with a less complicated (properly, form of) strategy, detailed in this paper. I principally take every of the sinusoidal frequencies (which might be given by the Fourier Rework) and at every time limit, consider the change in vitality and part of that frequency. So if the vitality degree in a sure frequency goes up all of a sudden, that is an excellent indicator of a word beginning. Equally, if the part of that frequency adjustments considerably, that is additionally a indicator of a word beginning or altering. I add up the entire “change quantities” for each frequency and find yourself with a single quantity for that second that describes “how a lot did the frequencies change in whole at this second?”

This is a tough visualization of what that “whole change quantity” seems like, together with the opposite sign representations. The yellow spiky line is the uncooked “whole change quantity” information that I take advantage of for the remainder of the computations, the inexperienced graph is only a smoothed out model of that to point out that it does certainly map onto the beats of the tune.

This is a less complicated instance the place you possibly can see it slightly extra clearly:

In some approaches, you’re taking this “change quantity” and attempt to run some kind of thresholding to select discrete onset/beat occasions. I selected not to do that and as an alternative depart the sign as a steady one. As you will see within the subsequent part, we do not really need to select discrete beats to be able to discover the tempo. (One benefit of that is that we are able to additionally make use of knowledge that lies in between beats.)

Comb Filtering

The following step is to search for regularities within the onsets (the yellow graph) so we are able to decide the precise tempo. The best way I do that is merely to attempt many doable tempos (all the way in which from 60 BPM to 180 BPM) and see which one(s) “matches” the graph finest.

How can we measure how properly a given tempo “matches” the graph? The best way I selected (referenced in a number of the literature) is to make use of comb filters. A suggestions comb filter is principally a elaborate means of claiming we’re going to put an echo on the sign.

I run the onset graph by way of many various comb filter delays (echo lengths), corresponding to every candidate tempo. The hope is that if the delay matches the precise tempo of the tune, then we find yourself getting extra suggestions resonance than if not, so the ensuing sign amplitudes shall be larger. That finally ends up being true! Within the beneath graph the blue/cyan line represents the comb filter output for an incorrect tempo, and the inexperienced line represents the filter output for an identical tempo.

Each of them begin out comparatively comparable, however you possibly can see that because the resonance kicks in, there is a suggestions impact on each beat (since there tends to be word onsets there extra typically), which causes the next sign amplitude.

After calculating the comb filter output for all doable tempos, I merely undergo and select the tempo whose comb filter values are highest greater than the entire different ones. Typically there may be a couple of completely different tempo that’s larger than the remaining — typically occasions this occurs when the tune has robust syncopated patterns, so for instance as an alternative of 120BPM the detector might additionally discover 160BPM as a sound candidate. Proper now I simply have it choose the highest one, however sooner or later I might construct some kind of UI to recommend a number of tempos when it is not fairly positive.

Detecting Beat Offset

Now that now we have our tune tempo calculated, the subsequent order of enterprise is to try to work out what the beat offset is. I am nonetheless engaged on tweaking this half slightly, however what I do proper now could be take the comb filter output and course of it much more utilizing averages and thresholding. I find yourself with a extra discrete choice of peaks:

I take advantage of varied guidelines for choosing these peaks — for instance, the sign at that time needs to be a lot larger than its common, it must be the very best level in some proximity, and there cannot be two peaks too shut to one another. Observe that this tried “peak choice” is not good, and often tosses away some otherwise-relevant data (which is why I did not do it within the earlier step). However so long as I get “sufficient” of the proper beats, it is advantageous!

The final step is solely to undergo the entire doable beat offset values and see which certainly one of them strains up most with the peaks from this step. I simply do that by including all of the on-beat amplitudes that might outcome from a given beat offset.

It Works!

Amazingly, the complete system works pretty properly more often than not! It nonetheless has some troubles with sure songs, and sometimes the beginning time is fallacious by half a beat (I am guessing it’s because off-beats are typically featured prominently as properly), however there are at all times going to be exceptions like that. Once more, even when it is fallacious, it often has the proper possibility as its second or third selection.

After I ironed down the principle algorithmic implementation, I ended up doing a move over a lot of the computation logic and rewriting it to utilize Unity’s parallel job / burst compilation system, which helped pace issues up drastically. Proper now the algorithm seems on the first 30 seconds of a tune, which is over 1,000,000 floating level samples, so there may be numerous information to parse by way of! Earlier than the optimizations this course of was taking on ~10 seconds, but it surely’s now down to only a few seconds at most.

I might go on and on attempting to fine-tune the entire completely different parameters within the system (there are loads…), and I really discovered a few foolish bugs and noticable enhancements even whereas scripting this devlog (hooray!). Nevertheless, it is about time that I name it a wrap on this explicit system and get again to creating positive that all the pieces else within the editor is well-integrated…


Logged

DDRKirby(ISQ)


Customized Degree Browser, Stats/Metadata

Oops, I missed my month-to-month devlog put up for November. On the plus facet, I have been doing plenty of good work over the previous few weeks! I’ve discovered that my time and motivation for Rhythm Quest tends to oscillate slightly bit over time — generally it is as a result of different elements of my life are busy, different occasions it is as a result of I am engaged on one thing that is more durable to get motivated about. However I do my finest to only preserve plugging away slowly and steadily…

It is slightly loopy to suppose that ~3 months in the past the Rhythm Quest degree editor did not exist in any respect! Now we have got a complete editor device palette UI, notifications, undo/redo, saving and loading, enter timelines, waveform shows, animated preview sprites, automated beat detection, degree validation, … There are like, infinity various things that go into customized degree assist, which is why I initially wished to place it off till post-release…however I am really having plenty of enjoyable growing all of it, in order that’s nice!

Customized Degree Browser

Most not too long ago, I have been doing a bunch of labor on a customized degree browser that may allow you to navigate by way of the customized ranges you have downloaded:

Loads of it’s already working fairly properly! It is in a position to parse the entire tune recordsdata within the customized degree folder, present them as choices, and even can help you drill down into subfolders in case you wish to set up your customized ranges into varied completely different directories. For the reason that menu is dynamic (can have any arbitrary variety of buttons), I made a decision to go together with a scrolling menu format. It really works merely sufficient with keyboard/gamepad, however if you happen to’re utilizing a mouse you may as well scroll to a given tune by clicking it (and even use the scroll wheel!).

You may discover on the left panel that choosing a degree brings up a bunch of particulars concerning the degree, together with a stats show of what number of obstacles of every kind are within the degree. These weren’t too exhausting to derive and save as a part of the extent metadata, and they need to hopefully present a pleasant means of judging the flavour of a chart, or in case you wish to simply keep away from any ranges which have pace zones or inexperienced enemies or no matter. It is slightly busy, when it comes to the visible look, however I do suppose that it is helpful data to show. (Perhaps there might be a toggle for it?)

There’s nonetheless some extra work that must be executed right here…for one factor, I am not an enormous fan of the way in which that folders are dealt with…as an alternative of drilling into separate submenus, it will most likely make extra sense to only have all songs be listed as one (indented?) record after which be capable of open and collapse folders from there. I additionally do not have a approach to entry the store or change characters/pace settings simply from right here but. =(

I additionally want to consider dealing with music previews…the straightforward factor to do can be to only load the complete tune on-demand and begin playback, however that is actually sluggish, so I will should as an alternative stream the music from disk. In fact, ideally you’d be capable of edit which area of the tune will get performed within the preview…

Problem Estimation Curve

There is a new “estimated problem” scale from 1-100, which is mechanically calculated based mostly on the density of actions required for the extent. In fact, it is exhausting to be very exact in figuring out how a lot hassle any given participant could have on completely different ranges, however I figured it will be good to a minimum of have some tough estimation out there.

Having a problem scale go from 1-100 is definitely an attention-grabbing conundrum as a result of there isn’t any theoretical restrict on how troublesome a tune may be (you possibly can simply add obstacles on each half beat and improve the tempo larger and better). Proper now the first heuristic I take advantage of for figuring out problem is the variety of button presses required per second, which ranges from 0.86 for degree 1-1 all the way in which to three.79 for degree 5-5 (and doubtless slightly larger by way of the tip of world 6).

I might after all simply choose an arbitrary most restrict (5.0?) after which provide you with a linear scale, the place 0 presses/second = 1 and 5 presses/second = 100, however I do not suppose that might be a fantastic scale, as a result of the differentiation throughout the high and low ends of the dimensions can be fairly ineffective. Does it actually make sense for degree 1-1 to have a problem of 17/100? It feels just like the decrease numbers beneath 15 would simply by no means get used. Additionally, perceived problem is not actually linear based mostly on presses per second both — the soar between 1 and 1.5 presses per second is not practically as huge of a deal because the soar from 3 to three.5 presses per second.

So as an alternative of a linear mapping, I attempted to search out some kind of non-linear operate that I might use to estimate problem. Ideally I wished one thing that might ramp up very slowly from 0, then improve extra quickly towards the center finish of the vary, after which taper off in order that the loopy charts with 5 or 6 presses/second can simply all be lumped within the 90s or no matter. In different phrases I wished one thing that form of has horizontal asymptotes…

For those who’ve studied sufficient trigonometry (sorry, sure, math is again) you’d do not forget that the graph of y = tan(x) has vertical asymptotes. Which after all, signifies that the inverse, y = arctan(x), has horizontal asymptotes. The inverse tangent operate graphs like this:

Which is just about what I used to be envisioning! All that was left was to use some scaling constants to shift and scale all the pieces round, after which I had my non-linear problem curve from 1-100 (presently caps out at round 4.8 presses per second):

Listed here are some values and what they map to, so you may get a way of how this non-linear problem compares to what a linear mapping would supply:

Degree | Actions/Second | Linear Problem | Arctan Problem
 1-1  |    0.859375    |   17 (Simple)       |   3 (Simple)
 1-5  |    1.560284    |   31 (Medium)     |   9 (Simple)
 2-3  |    1.718750    |   34 (Medium)     |  11 (Simple)
 2-5  |    1.984972    |   40 (Arduous)       |  17 (Simple)
 3-4  |    2.195684    |   44 (Arduous)       |  20 (Medium)
 4-5  |    2.761905    |   55 (Arduous)       |  41 (Arduous)
 5-5  |    3.345877    |   67 (Knowledgeable)     |  70 (Knowledgeable)
      |    4.000000    |   80 (Unattainable) |  93 (Unattainable)
      |    5.000000    |  100 (Unattainable) |  100 (Unattainable)

In fact, that is only a first try, so it is undoubtedly doable that it will want some tweaking or shifting round…

Degree Metadata Editor

I additionally put collectively this display for inputting the entire metadata that you just see within the degree browser:

Not an excessive amount of to say right here besides that I needed to program within the capacity to load in a customized picture that you just present, after which mechanically crop it to the proper dimensions when displaying it. This picture may also be used for if/if you add the extent to the Rhythm Quest Steam Workshop (should implement that in some unspecified time in the future, too…).

Numerous Different Stuff

The brand new degree browser was the principle thrilling piece of labor, however I’ve additionally been doing a ton of different issues as properly…for example, I applied a blur filter for the background that you’ll allow within the display filter settings:

Normally this kind of fast and easy post-processing impact tends to interrupt the clear look of pixel artwork, however I will not decide you if you happen to simply suppose it seems cool and wish to simply allow it for regular gameplay. It does have a tendency to assist with foreground/background readability, for positive.

I additionally applied the flexibility to pull obstacles round utilizing a transfer device. It is a little much less simple than you would possibly suppose…you are basically doing a delete adopted by a brand new motion, however you must validate that the brand new motion will make sense after the delete and deal with the preview accordingly.

The identical device additionally helps you to resize flight paths, water zones, and pace zones, by dragging the left or proper facet of them. In fact, the opposite obstacles must all modify based mostly on the change…

The extent finish object mechanically strikes if you insert new obstacles previous the tip of the extent. You can too transfer it round now!

Water zones and pace zones will now mechanically merge collectively in the event that they overlap or are positioned end-to-end:

The soar device now options a number of subtools for specifying whether or not you wish to desire (when doable) inserting winged air jumps, grounded jumps, or grounded jumps with a vertical peak distinction:

What else…? I will preview this sooner or later, however I additionally added an preliminary set of editor sound results, so you possibly can hear a pleasant little [pop!] if you place one thing. There was additionally a ton of labor executed on minor issues with degree validation logic, in addition to basic UI polish (the way in which that grid snapping labored, and so forth.).

I nonetheless must launch this within the subsequent patch, however I additionally lastly applied the flexibility for separate keybindings to work independently as an alternative of being summed collectively, which suggests it’s going to work if you happen to press a second assault key with out releasing the primary one — this one ought to assist gamers out with sooner charts or if you happen to’re taking part in with a excessive pace mod.

Extra Work to Come

As we strategy the tip of 2023 I wish to thank anybody who cares about my recreation sufficient to maintain studying these devlogs. I could or could not take slightly break from updates over the vacation season, however both means I will be persevering with to chug alongside as at all times with sluggish progress towards the mountain of labor to be executed. Typically I begin to get actually self-conscious of the entire expectations individuals should have concerning the recreation — like, ~18,000 Steam wishlists and ~700 Discord members, that is slightly ridiculous for my little mission, is not it?

Cultivating an energetic group presence is absolutely not a robust level of mine, however I am optimistic that when the time comes the extent editor will be capable of encourage plenty of new content material and pleasure. We’re nonetheless a protracted methods from that, although, so I might finest not rely my chickens earlier than they hatch…


Logged

[ad_2]

Leave a Reply

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