r/godot • • 11h ago

help how do i make this stupid shader transparent?

Post image
296 Upvotes

transparent in the sense that like, it will account for the transparency of the texture its on, cuz like look rn its just doing the whole mesh instead of just the texture its REDICULOUS.

shader_type spatial;
render_mode unshaded;

uniform sampler2D texture_albedo : source_color;
uniform sampler2D screen_texture : hint_screen_texture, filter_linear_mipmap;

uniform float scale = 1.0;
uniform float alpha_value : hint_range(0.0, 1.0) = 0.5;

uniform int blend_mode : hint_range(0, 8, 1) = 0; 

void fragment() {
    vec2 screen_uv = SCREEN_UV * scale;
    vec4 tex = texture(texture_albedo, screen_uv);
    vec3 blend = tex.rgb;
    
    vec3 base = texture(screen_texture, SCREEN_UV).rgb;
    
    vec3 res = blend;

    if (blend_mode == 0) {
        res = blend;
    } else if (blend_mode == 1) {
        res = base * blend;
    } else if (blend_mode == 2) {
        res = 1.0 - (1.0 - base) * (1.0 - blend);
    } else if (blend_mode == 3) {
        res = min(base, blend);
    } else if (blend_mode == 4) {
        res = max(base, blend);
    } else if (blend_mode == 5) {
        res = abs(base - blend);
    } else if (blend_mode == 6) {
        res = base + blend - 2.0 * base * blend;
    } else if (blend_mode == 7) {
        res = base / max(vec3(1.0) - blend, vec3(0.0001));
    } else if (blend_mode == 8) {
        res = 1.0 - (1.0 - base) / max(blend, vec3(0.0001));
    }

    ALBEDO = res;
    ALPHA = tex.a * alpha_value;
}

r/godot • • 20h ago

projects Godot project ready for test

187 Upvotes

i everybody , i releases a small demo ......feeel free to test on your handheld.. and i would to here if you have issue install it ...this is godot game


r/godot • • 9h ago

projects I missed 90s NetMech so much I started building a MechWarrior tribute in Godot

152 Upvotes

Grew up on MechWarrior 2 and NetMech, and for a while now I've been building a free fan tribute project.


r/godot • • 12h ago

help How could I stop this from happening when I play a scene?

116 Upvotes

Hi guys, I have a skeleton here with jiggle modifications on it, and as you can see the bones with jiggle go all over the place when opening the scene. I've tried looking it up and found a few posts about the same issue, but no one answered those people.

I've tried delaying when modification is enabled but still the same thing happens, I've tried turning up the stiffness / damping which sorta works...when I turn it way up and jiggle isn't noticeable anymore in general which I don't want.

I'd prefer it doesn't move all that much when first opening the scene but still keeping the amount of jiggle for the character is moving around and stuff in general.

sorry if this is a dumb question.


r/godot • • 17h ago

free tutorial Godot Threads - part 1: basics

Post image
93 Upvotes

r/godot • • 15h ago

projects I'm making a jetpack FPS set on floating temples above the clouds

58 Upvotes

It's called Pilgrims of a Solar Deity. You jetpack between floating shrines, fight drones, and have to manage your jetpack fuel before you run out.

I'm making it solo in Godot 4.6. There's a free Windows demo if you want to try it: https://ritabratamaiti.itch.io/pilgrims-of-a-solar-deity#demo

Any feedback is welcome :)


r/godot • • 13h ago

fun & memes I was trying to bake a lightmap and uh...

Post image
42 Upvotes

idk if this is gpu artifact or not but its only happening on the godot window, that's why i could screenshot it. looking kinda horror-ish. it was fine again after a restart.


r/godot • • 16h ago

projects Changing sports in real-time

41 Upvotes

Still balancing out how this applies to the stage's ranking and the different challenges on them.


r/godot • • 15h ago

fun & memes I've gone a little bit insane

37 Upvotes

r/godot • • 9h ago

projects Gameplay for POOP DECK made in Godot 4.6

34 Upvotes

Hi All,

Just wanted to share some gameplay of my first game made with godot: Poop Deck. The game is about keeping a ship deck clear of seagull shit while trying to survive their onslaught.

At this point I'm pretty deep in development and can see the end in sight. Although, there are still more bosses, weapons, and events I'd like to add to the game before releasing it. It would be a huge help if I could get some feedback on the gameplay so far. I have fun playing it, but that's because I created it 😆.

This is my first game so I don't have experience with other game engines, but godot has been awesome to work with. I started working on the game in godot 4.1 and have since upgraded to 4.6. The features and improvements to the engine made in that time has been amazing, thanks to all the contributors to the engine. I hope one day to contribute.

If you are interested in the demo: https://ajschleg.itch.io/poopdeck

Thanks for looking!


r/godot • • 15h ago

projects Supernatural events in my Wild Game

33 Upvotes

The game is literally called "Wild Game," and I’ve been developing it for a little over a year. It’s a psychedelic, team-based, open-world multiplayer shooter.


r/godot • • 21h ago

free plugin/tool It is satisfying seeing my own Interactable Node get accepted into the Asset Library!

Post image
30 Upvotes

What started as a reusable component for myself evolved into being refined, refactored and shared to the Godot community, and I can't help feel immense pride and joy in it!

Here's the link if you are interested: https://godotengine.org/asset-library/asset/5634


r/godot • • 9h ago

projects Our Godot 4.6 ARPG Noctara is now playable in pre-alpha: a boss fight from the second dungeon

29 Upvotes

Follow-up to our previous post. Since then we've changed a lot of the art style and improved how the bosses behave. This is a boss fight from the second dungeon, captured in-game, no HUD.

Still pre-alpha, so very rough around the edges, but you can already play it. Servers in Argentina and the US. We'd love to hear what you think.

itch.io: https://genima.itch.io/noctara · Discord: https://discord.gg/ApPPC8a9XJ


r/godot • • 18h ago

projects Does this enemy AI feel threatening?

27 Upvotes

Enemy formation from our turn-based hex tactics deckbuilder (Godot 4.5, C#). Two shieldbearers wall off the front, pikemen thrust over the top, and they close in until there's nowhere to go. This one beat me.

Does it feel threatening to you, or just unfair?


r/godot • • 1h ago

free plugin/tool Fast procedural scattering tool + path/river creation for Terrain3d

Thumbnail
youtube.com
22 Upvotes

r/godot • • 10h ago

help Bullets occasionally evade the detection of the target's hitbox.

18 Upvotes

The general setup I have going on has a bullet flying towards a cursor for 0.15 seconds before being removed (queue free'd), with its velocity increasing the further it has to travel from the gun. If the cursor is hovering over a target when the bullet is fired, the target will activate its area2D monitoring for 0.15 seconds, matching the window in which the bullet is active and ensuring the player does not accidentally hit the target. When the target is hit, both the bullet and the target are removed. For the most part, this works fine, however if I fire at a near edge of the target, the hit does not register. I'm pretty sure this is due to the bullet moving and deleting too fast for the target's hitbox to properly register it, of which has been affirmed by this effect being worsened when I'm firing at a target even further away, causing the bullet to travel even faster (i think? this may be only part of the issue). I have tried extending the amount of time the target's hitbox is active, reducing the velocity/increasing the flight time of the bullet but it hasn't helped much, and I don't want to extend the bullet flight time any further. I know this is sort of a confusing thing I've set up so if you need any more info just let me know. Thank you for you help! (also pardon low frame rate on video, at 60fps you can see the bullets reach the target).

bullet script
target script

r/godot • • 10h ago

projects Rebels secret hideout is a bar. Does it feel right?

15 Upvotes

Hey /godot!

I just finished implementing all the features for the Hub where Players will land after every run. It's "Spectre", a Bar which also serves a purpose of being actually a hideout for rebellion against Tairum Corporation. Every room serves a purpose, either mechanical or environmental. In some Players can install cybernetic enhancements in Aug Bay, can boost stats of their Operatives in Nexus or upgrade their augments in Dirty Hands clinic. It even have a Doggy who is the companion of the Class that is controlled on the recording.

I tried to sell the vision of regulars vs rebels working together in the same place. Do you think it can be 'felt', or does it miss something in your opinion?

P.S. I will also post a run gameplay soon, for now I wanted to focus more on environment and overall artistic style, since that's a bit chunk of Tairum's identity we want to present.

I am right now preparing for public demo, currently I welcome everyone test it on private Playtests, if you're interested, hit me up on Discord: https://discord.gg/VDeHk36p9X

You can also wishlist on Steam: https://store.steampowered.com/app/5043840/Tairum/


r/godot • • 16h ago

projects I feel like the burning art style doesn't fully match with the games style, any tips?

Post image
15 Upvotes

How it works:
• A canvas_item shader takes a progress uniform and a FastNoiseLite NoiseTexture2D. Each pixel compares its height plus noise against the burn front: below it is gone, right at it are embers, a bit above it is scorch, and above that is paper.
• One parallel Tween drives both sheets sliding, a tween_method that sets progress, and a CPUParticles2D emitter that is moved onto the front every step, so the embers lift off the actual flame line.


r/godot • • 15h ago

discussion STRANDED few screens

Thumbnail
gallery
13 Upvotes

r/godot • • 23h ago

projects Shooter Prototype

13 Upvotes

Hi folks,

I am just experimenting with Godot, it's a nice package. I've put together a little shooter proto-type, as you can see from the awesome graphics, my skills in Krita are somewhat lacking... but that's a problem for a different day. Just interested in peoples thoughts on the prototype, and maybe even a suggestion of a theme, there are lots of space shooter around, and snapping a spaceship to a grid is just something a little different.

There are three types of enemies, that can merge and become bigger if they collide on the grid, few little boosters I have added for some fun.

Cheers


r/godot • • 11h ago

help (solved) Programming issue- Please help

Post image
12 Upvotes

I'm learning Godot to make a platformer game, but this error popped up while trying to make player movement. (this is using a 2d animated sprite)

I looked everywhere online I could and tried even getting rid of it, but the error just moved to another line instead. What do I do to fix this?

Tried:

Passing, Removing the line, Checking Commas and Parenthesis

EDIT: THANK YOU SO MUCH!!!!! I indented everything, and it fixed it. it's hard to believe i nearly had a crashout and all i needed to do was indent T-T. I am eternally grateful and bow down to your wise experience


r/godot • • 12h ago

projects Squirrel Season over the past year! Happy anniversary!

12 Upvotes

r/godot • • 2h ago

projects I'm building a space MMO on my own. Here's the first cinematic trailer, all real in-game footage

10 Upvotes

I'm building Starmarch, a space MMO, on my own. The client is Godot, the server and all the game logic are Rust. The Rust side is also built as a GDExtension library that the Godot client loads, so the heavy stuff doesn't live in GDScript and client and server share the same code for things like the ship data and the rules.

A few things from the Godot side that might be interesting:

The asteroids can be mined by hand. You fly close, hold the beam on a spot and it breaks pieces off until the rock collapses into chunks. The craters come from the server, so every player sees the same hollowed out rock, and it's saved with the field.

For the ships I wrote a small tool inside the project, a "Ship Studio" scene, where I place engine nozzles and weapon hardpoints on each model by hand and save them as JSON next to the ship. Way faster than doing it in a 3D tool.

The trailer was the fun part. My first captures stuttered: the frame recorder read the viewport back every frame with get_image(), which blocked the main thread and held the game at 25 fps while I was writing 30 fps video. Now the client runs with --fixed-fps 30, reads frames back asynchronously with texture_get_data_async, and every video frame is exactly 1/30 s of game time. Zero repeated frames, even at 2560x1440.

Happy to go deeper on any of it, especially the Rust/GDExtension setup.

Alpha and Discord: starmarch.mindsaver.io


r/godot • • 18h ago

help (solved) Hello! New Godot user here with a question

Post image
10 Upvotes

So, i want to make a game where i can build a circuit from a tile map, and when I run the game, the wire tiles would check if they had battery or a wire adjacent to them and switch the tile to be turned on. I'm new, and I wondered how I would be able to do something like this?