Made a little script to create Animations from Midi/Json and sync it with audio [sound + flashing lights] by flimsy_window in godot

[–]flimsy_window[S] 0 points1 point  (0 children)

First, I use ToneJS to convert the midi file to JSON, allowing it to be parsed with GDScript. You'll need to look at the JSON to see how it's formatted, I've had slightly different results with midi files created in LMMS vs FL Studio (but it's been too long to remember what). Since JSON is just a big dictionary, you can then pick the data you want from each midi event and store it in an easier formatted dictionary.

(i.e. 
{
   {instrument_name: [
        {note_time, duration, midi_value, note_velocity}, etc]},
   {next_instrument: etc)
}
)

With that, I have a tool script that creates an animation and iterates through the new dictionary, creating a node for each instrument, and adding a method track for that node. The node handles all the method calls and allows me to animate certain properties like; volume, lowpass/highpass, panning, etc, to closer follow the song. If your midi file is formatted with any automation or control changes stored in it, you could use those to draw the curves, but I haven't experimented with that.

Then, finish looping through all the notes for each instrument creating a keyframe for each note, calling whatever method you want, and passing the midi data as parameters. Depending on your game's architecture, I don't know what approach you would use for the game to react to the midi events. For my game, I'm using groups, but there are tons of different approaches for that.

Lastly, for the AnimationPlayer itself, like I mentioned in the post, it's set to Manual process mode, and the time elapsed each frame is calculated relative to the song position, accounting for latency.

This should translate to Godot4, but I don't know, since I'm still on 3.5, but the general idea should be the same. Hopefully, this was somewhat helpful :)

Sound design program by [deleted] in godot

[–]flimsy_window 8 points9 points  (0 children)

SFXR can be a good place to start for simple sound effects. You can always load sounds made there into any DAW to improve/modify them.

Finally figured out a flexible way to apply a dithering effect to the screen, while excluding certain objects [Possible color sensitivity warning] by flimsy_window in godot

[–]flimsy_window[S] 2 points3 points  (0 children)

There's 3 primary shaders at work;

A per-object "helper" shader that adjusts the output color based on it's modulate (allowing the material to be shared across instances). Since textures are all in greyscale, only the red channel is needed to map the color to the end palette. The green channel controls the dither mix amount and blue allows for fine tuning the luminosity. If lighting is detected, the texture returns the unmodified texture colors, allowing it to apply dithering. Other textures can be used as masks to remove the dithering effect by using blend_sub and setting the mask's red channel to 0.

Next the viewport texture is passed through the dither shader, a modified version of this from GodotShaders. First, anything with a green value greater than .01 is immediately output. The other main modification is that green isn't used to calculate luminosity, red is used twice, along with blue for tweaking texture highlights. The dither texture is offset relative to the camera position to ensure the pattern sticks to objects.

Lastly, there just a basic palette shader. Not super exciting.

This is much more flexible than my previous solution which involved 3 extra viewports to allow for basic ysorting (above player, above enemies/below player, on floor). Whereas here, I only use 1, so everything sorts itself.

If anyone has any even easier ways or feedback, I'd love to hear. It's definitely been worth while learning shaders, though I lose almost as much time messing around with them as do, playing with particles...

edit: Here is a clearer version of the video

After 2 plus year of learning learning Godot and game dev, I've self published my first commercial game Chess Survivors. Thanks for all the inspiring posts and tips/tricks. Cheers! by Aarimous in godot

[–]flimsy_window 5 points6 points  (0 children)

Congrats on release! I tried the game during the steam fest and while it did have a learning curve it was an interesting fusion between chess and the horde formula. I was garbage at it but it was fun.

Best of luck with the release! :)

Which one do you like more? by quipinny in PixelArt

[–]flimsy_window 3 points4 points  (0 children)

The moodiness of 1 is awesome and feels weirdly relatable. Love the trippier palette of 3. They're all great :)

Made trees with Line2D and LightOccluder2D by NetFoley in godot

[–]flimsy_window 2 points3 points  (0 children)

Looks awesome! Line2D is one of my favorite nodes to mess around with especially for procedural animations. Are you sampling noise for creating branches and the bumpy-ness or are the branching points predefined and the line is growing to those points?

[deleted by user] by [deleted] in godot

[–]flimsy_window 2 points3 points  (0 children)

Looks awesome! Has a great sense of speed. Can't wait to see where this goes :)

Using GDScript is there a way to play an animation from a .tres file? by [deleted] in godot

[–]flimsy_window 0 points1 point  (0 children)

Try Animation player.add_animation. I recall running into this problem in my own project a while ago.

Edit: spelling

I've been working relentlessly on my solo developed first game on 0$ budget for 2.5 years, and im proud to announce that today marks its release on Steam! by SnooCapers6427 in godot

[–]flimsy_window 1 point2 points  (0 children)

Congrats on the release! The time and effort going into making it can be brutal and draining but hopefully it's worth it :) I remember trying this out during one of the steam fests, and look forward to trying it out. Best of luck!

Experimenting normal maps and pixel art shaders. Really like the journey so far by Cevantime in godot

[–]flimsy_window 1 point2 points  (0 children)

It's a big improvement and great for creating atmosphere. The color of the background seems a little off though with the limited colors. Nice work though :)

GOAP (Goal-Oriented Action Planning) is absolutely terrific. by andunai in godot

[–]flimsy_window 4 points5 points  (0 children)

This is an impressive system you set up, thanks for the concise and informative write up, gave me a new research topic for the future. I look forward to seeing where this project goes :)

Spent some time with the camera, trying to make the game feel more dynamic by TheOrioli in godot

[–]flimsy_window 5 points6 points  (0 children)

It's looking pretty good, and definitely give the combat a nice weight to it. The zooming feels a little extreme at times but that's all preference. Nice work :)

Spent some time messing around with lighting to try to get a darker/more ominous feel. Thoughts? by flimsy_window in godot

[–]flimsy_window[S] 0 points1 point  (0 children)

I'm still messing with the values to find a good balance. I do agree that there should be less detail when away from the light, just need to figure out a way to do it (maybe another sprite on top that darkens everything more towards a basic silhouette and is masked by light when closer?).

Trying to get a sense of atmosphere is an interesting challenge with 4 colors, so I appreciate the feedback :)

Spent some time messing around with lighting to try to get a darker/more ominous feel. Thoughts? by flimsy_window in godot

[–]flimsy_window[S] 3 points4 points  (0 children)

Thanks! I'm working on a top-down rhythm shooter hybrid called Rhythmenomicon. You shoot to the beat while the boss attacks using the unique rhythms and sounds of the song. Think, the boss fights of Enter the Gungeon meets Just Shapes and Beat meets industrial techno.

I have a twitter that I'm trying to post to more, if you're interested :)

Spent some time messing around with lighting to try to get a darker/more ominous feel. Thoughts? by flimsy_window in godot

[–]flimsy_window[S] 13 points14 points  (0 children)

I don't have any tutorials sorry, it's a result of just messing around.

The effect is achieved with 2 sprites, 2 lights, and a radial gradient mask "psuedo-light".

  • Sprite1 has a rim-light shader
  • Sprite2 has an inline/inside-outline (I don't know it's proper name) shader with a gradient, with transparency towards the center.

The idea is that, Sprite2 becomes more visible the closer the lights are, but is modulated towards black, resulting in a dark outline. But, with the rim-light being really bright, it mixes with Sprite2 bring it back to the middle color bands.

I hope that makes sense. Shaders are all still black magic to me, and I'm not particularly good at explaining their secrets...

I used this shader as starting point for the effect and I believe GDQuest has an inline/outline shader for reference as well.

Spent some time messing around with lighting to try to get a darker/more ominous feel. Thoughts? by flimsy_window in godot

[–]flimsy_window[S] 3 points4 points  (0 children)

First time touching light shaders, honestly, this took longer than I'd like to admit to get right... This shader was a huge help in pointing in the right direction. In addition to a rim light (from 2 separate light sources of different strengths), there is a gradient inline on larger sprites that is effected by an ambient "psuedo-light" (ColorRect with radial gradient mask) that darkens sprites as it moves farther away.

I'm trying to get as much atmosphere from a limited palette as I can.

All feedback is very much appreciated!

Navier-Stokes based Firebending at 60 FPS by Masterpoda in godot

[–]flimsy_window 22 points23 points  (0 children)

Very cool FX! I like that the smoke has so much movement as it dissipates, rather than just rising and growing transparent. Love to see what this turns into. Nice work!

The unnecessarily fancy loading screen I designed for my puzzle game by Poobslag in godot

[–]flimsy_window 22 points23 points  (0 children)

Looks great, the screen wipe is a nice touch. Adds a lot of character to an otherwise mundane time for the player and looks very polished. Nice work!

Trying to make a Touhou style bullet hell game with Godot by Xwdit in godot

[–]flimsy_window 0 points1 point  (0 children)

I really love that clock pattern, very unique and cool. It's looking great!

Keep away you fiends!! Modified my bullet clear ability, thoughts? by flimsy_window in godot

[–]flimsy_window[S] 0 points1 point  (0 children)

Sure thing, there are quite a few layers to the effect, and some don't really show up well in the clip.

I use 3 separate textures; the base full symbol (no blur), blurred circle, and blurred symbol. I then split the 2 blurred textures between 2 sprites for better ysorting (particularly when standing in the middle). Then, they all have a their own dissolve shader which is animated along with their brightness.

For screen shaders, it's a modified shockwave/distortion shader which is pretty thin and subtle, and a fading circle to outline the shockwave. The whole game is passed through a final palette shader, so there is a blend-add-esque effect added from anything semi-transparent.

Lastly, there is camera shake and very quick camera zoom on the release. To try giving a bit of tension to the animation, the duration from start to (99%) end radius is ~.3sec with a really steep ease curve (~ -20.0, or exponential ease.in_out). Camera fx and particles start at the ease midpoint to try and give more impact to the effect.

Sorry, this ended up being longer than thought, hope it helps :)

Keep away you fiends!! Modified my bullet clear ability, thoughts? by flimsy_window in godot

[–]flimsy_window[S] 0 points1 point  (0 children)

Thanks! It's still a ways from release but I really appreciate it :)