Godot

7740 readers
8 users here now

Welcome to the programming.dev Godot community!

This is a place where you can discuss about anything relating to the Godot game engine. Feel free to ask questions, post tutorials, show off your godot game, etc.

Make sure to follow the Godot CoC while chatting

We have a matrix room that can be used for chatting with other members of the community here

Links

Other Communities

Rules

We have a four strike system in this community where you get warned the first time you break a rule, then given a week ban, then given a year ban, then a permanent ban. Certain actions may bypass this and go straight to permanent ban if severe enough and done with malicious intent

Wormhole

!roguelikedev@programming.dev

Credits

founded 3 years ago
MODERATORS
1
2
3
 
 

Hello, everyone! Let’s again create a spatial shader for a 3D object. This time we'll create a simple flag, make it wave gently in the wind, and demonstrate how we can dynamically control this effect in the vertex function.

4
5
 
 

I'm making a game where the player moves through an endless scrolling 2D world. Currently, I want the terrain to represent a sine wave, as shown in the provided illustration.

How should I setup my terrain scene to generate this terrain with collision? Or should the terrain generation be in the main game scene? If the later, what node structure should I use for my terrain?

6
 
 

In your time with Godot, have you stumbled across something useful but hard to find, like:

  • Godot features
  • Edge cases/issues of Godot features
  • Libraries/assets
  • Open source projects
  • Tutorials, Guides, Blog posts

Or anything else you wish you'd found earlier? If so please feel free to share it here!

7
8
9
 
 

Hi everyone! Let's make something simple, because it's the beginning of July, and I'd rather relax than program overly complex shaders. We'll create a simple image warp effect that fits into a single line of code. So let’s go ahead and program that one line.

10
11
 
 

Not surprising, but glad they pick a more sensible approach than other open source projects.

12
 
 

Hello, everyone! In this tutorial, I’d like to return to simple effects that don’t require any image input. This time, we’ll create something like an animated nebula, which can be an interesting visual enhancement for many space games.

13
 
 

cross-posted from: https://programming.dev/post/52632331

Hi everyone!

I'm excited to finally share the current progress of my solo indie racing game, Asphalt Dreams, built with the Godot Engine.

After months of learning, experimenting, and improving the project, I've reached a point where I'm comfortable calling it Pre-Alpha. There's still a long journey ahead, but I'm happy to finally start sharing the game with the community.

Current Pre-Alpha Features:

• 🚗 10+ drivable vehicles • 🌍 3+ unique environments • 🚦 AI traffic system • 🎨 Vehicle customization (currently in development) • ⚡ Performance optimizations for smoother gameplay • 🛣️ Endless arcade-style traffic racing


This is only the beginning. I still have many features planned, including better AI, improved graphics, additional gameplay mechanics, new vehicles, and plenty of polish before release.

I'd genuinely love to hear your thoughts, suggestions, or feedback. Every comment helps me make the game better.

Discord Community: https://lnkd.in/gvWz2dFg

Thanks for checking out Asphalt Dreams, and I hope you'll enjoy following its development! 🚓

14
15
 
 

A lot has changed since the last update.

I've added a new desert environment, traffic vehicles, car customization, and spent quite a bit of time optimizing things behind the scenes.

The roads finally feel alive instead of looking like empty test scenes 😂. Seeing traffic drive around while speeding through the desert is starting to feel like the game I originally imagined.

⚡ Performance has also improved quite a bit, reaching around 300 FPS on my Ryzen 3 3200G while driving through traffic.

🎨 I also changed the player car from white to black, which stands out much better against the bright desert environment. There's still plenty left to do, but it's exciting to see everything slowly come together.

And yes, it's been a while since my last update — I've been busy making the game 😂

🔜 Next Up More environments Smarter traffic behavior More polish and world details Main menu and UI improvements

💬 Discord Community: https://discord.gg/BnKWASD8R

16
 
 

Hello, everyone! After the previous huge tutorial, where we reached a new record of 25 parameters in a single shader, let’s take a look at something simpler. We’re going to create an effect that belongs to the category of scene transitions and resembles wiping a blackboard with a wet sponge.

17
 
 

Godot's AStarGrid2D is a ten-minute read and a month of gotchas. The API page is small, you skim it, and then your path comes back empty, your units cut through wall corners, or your weighted swamp gets ignored. None of it is a bug. It's the gap between knowing the method names and knowing which handful of settings actually decide the behavior.

The five that get almost everyone:

  • You forget update(). Change the region or cell size, skip the rebuild, and you get an empty array with no error.
  • update() wipes your point data. It clears every solid cell and weight, so you have to set those after you call it.
  • Diagonal corner-cutting. DIAGONAL_MODE_ALWAYS lets units squeeze diagonally between two walls. You usually want ONLY_IF_NO_OBSTACLES.
  • jumping_enabled silently ignores weight scale. Turn on JPS and your weighted terrain stops mattering. It's in the docs. People still lose an afternoon to it.
  • Manhattan overestimates with diagonals. On an 8-direction grid it counts a diagonal as two steps, so your "shortest" path isn't. Reach for Octile.

So I wrote the reference I actually wanted (every property and method, the gotcha attached to each, version-honest across Godot 4.0 → 4.7, checked against the official docs and the C++ source), and built an interactive sandbox for the parts you have to see: drag the goal, paint solid and weighted cells, flip diagonal modes, toggle jumping, and watch the path recompute live. (It's a browser illustration of how AStarGrid2D behaves, not the engine itself running in a tab.)

Full reference and the sandbox: https://vav-labs.com/blog/astargrid2d-complete-reference/

If any of it's wrong or out of date for your version, tell me. The API moved across Godot 4.x, and I'd rather fix it than leave you debugging my mistake.

18
 
 

Font fallback mechanisms have more counterintuitive quirks than one might think. For example: I needed a few pictograms to mark land and sea access for some UI element. The obvious solution — using Unicode mountain and anchor glyphs — led to an interesting adventure. The font I use (DIN1451 for Latin), of course, lacked the needed glyphs. Not a problem, you might say: just add them to the font file and be done with it. Turns out it's not that straightforward. While the mountain "letter" (U+26F0) worked fine, the font engine stubbornly refused to use my anchor (U+2693) glyph. The eventual solution was to move both glyphs from their standard codepoints (26F0 and 2693) to the so-called Private Use Area (U+Exxx). After that, the font engine started using whatever the font actually has.

Still not sure whether this is a Godot quirk, a system font engine quirk, or a Unicode nuance.

19
20
21
22
 
 

Build and manage your SETI infrastructure to complete the search for extraterrestrial intelligence.

Made with Godot of course. Playable in the browser. 100% free. No download required.

23
24
25
 
 

Hello, everyone! This is the second part of the tutorial in which we create a shader for simulating old film projection in Godot 4. You can find a link to the first part in the description of this video. This time, we will complete the entire effect by enhancing it with various scratches, stains, and other types of damage that can appear on film strips.

view more: next ›