Godot

5908 readers
1 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

[email protected]

Credits

founded 1 year ago
MODERATORS
1
 
 

I have heard many times that if statements in shaders slow down the gpu massively. But I also heard that texture samples are very expensive.

Which one is more endurable? Which one is less impactful?

I am asking, because I need to decide on if I should multiply a value by 0, or put an if statement.

2
3
 
 

Hi everyone! Do you remember the shader I unoriginally called the Line Effect Shader and published a tutorial on creating it about nine months ago? Today's effect will be somewhat similar, with some horizontal structures twisting around and creating the impression of something liquid or almost plasma-like. Let’s take a look at how it’s programmed.

4
 
 

I and a few friends worked on this as a passion project. We hope you'll enjoy it!

https://store.steampowered.com/app/2499500/Haunting_Hijinx/

https://github.com/zibetnu/haunting-hijinx

5
43
submitted 1 week ago* (last edited 1 week ago) by [email protected] to c/godot
 
 

I'm so happy about how this script that generates a roller coaster track from a Curve3D turned out!

You can find the code on GitHub.

Be sure to download track.gd, track_generation.tscn and meshes/track_sleeper_rollercoaster.res and fix the path to the mesh on the code.

The roller coaster will be part of my game horror Delta Park , adding to the creepy atmosphere.

6
24
submitted 1 week ago* (last edited 1 week ago) by FencerDevLog to c/godot
 
 

Hello everyone! We continue the series of effects that we can apply to a selected texture or even the entire screen. This time, we will create a simple effect of breaking an image into hexagons, shifting the crop in each of these tiles, and the final composition of the entire image or, conversely, the decomposition, which can be quite a useful function.

7
71
submitted 2 weeks ago by popcar2 to c/godot
8
9
 
 

Hey everybody! This time, let's try something really simple, something that works more as a one-time effect, or an exercise for understanding some of the algorithms we often use in shaders. And who knows, maybe even such an unusual effect could find a place in some extravagant game.

10
 
 

Link to the PR that was merged for this: https://github.com/godotengine/godot/pull/97257

11
 
 

I posted this question on the godot forum, but that has been overrun by bots like crazy, it's all random characters, so probably some AI.

I want to edit the text of the current script editor without modifying the internal undo-redo of the editor.

So essentially I want this to be possible:

  1. User writes some code
  2. Program modifies it, maybe imroving the formatting and such...
  3. Program then reverts to previously written code
  4. User is able to undo their last code addition, without the programmatically inserted stuff to show up as the last undo-step.
12
 
 

I posted this question on the godot forum, but that has been overrun by bots like crazy, it's all random characters, so probably some AI.

I want to edit the text of the current script editor without modifying the internal undo-redo of the editor.

So essentially I want this to be possible:

  1. User writes some code
  2. Program modifies it, maybe imroving the formatting and such...
  3. Program then reverts to previously written code
  4. User is able to undo their last code addition, without the programmatically inserted stuff to show up as the last undo-step.
13
31
submitted 3 weeks ago by FencerDevLog to c/godot
 
 

Hey everybody! As a complement to the shaders we used to generate rain or a star field, we will create some nice snowfall. It's true that I have already programmed snow once, but that was in a 3D scene and with particles. This time, I'll use a 2D shader, but with a nice spatial effect using several layers, as you can see in the background right now. Let's get to it.

14
 
 

I want to integrate the online documentation a bit nicer into the editor itself. Is it somehow possible to query that page and get the contents of the searched-for entries?

Best case would be, if we can get the queried site content as JSON, that'd be nice, but very unlikely I think.

15
16
 
 

https://www.fab.com/megascans-free

Edit:

  • added direct link to the store page
17
13
submitted 1 month ago* (last edited 1 month ago) by [email protected] to c/godot
 
 

Godot 4.2.2

The tools/scripts available in the engine dont seem to work.

Godot Whisper uses openCL, which doesnt load on android. It works just fine when i run the program in the godot editor on my computer, but gives a black screen when exporting to android.

SpeechRecongition (script/tool available in the godot asset lib) kind of works with android but you need to use C# and my project is using gdscript.

Speech2Text is just using godot whisper i think, so same issue with openCL.

Im trying to make a mobile app that takes user voice input as an answer to a prompt and judges correctness. (Kids game where animal images are presented for the kids to guess the name)

Any recommended paths forward? Id rather not abandon android. Im going to research how hard it would be to create my own plugin for godot... or maybe using C# is the path of least resistance... Maybe i should look at other development platforms like android studio to interact with androids/google's built in voice recognition?

18
 
 

Hi everyone! Let's improve the Vertical Drops shader. As I promised at the end of the corresponding video, we can achieve an entirely different effect if we convert the algorithm into polar coordinates and make a few minor adjustments. Yes, we will create exactly what you now see on the screen, which can be used in the game as a hyperspace jump or warp speed acceleration. Let's get to it.

19
 
 

Here's a tutorial I wrote on using components to help keep your code organized.

20
88
submitted 1 month ago* (last edited 1 month ago) by jupiter to c/godot
 
 

(this is my first post on lemmy, I hope this works like I expect it does. critique and advice are very welcome and appreciated)

a cartoon fennec swinging a giant brush, painting a rainbow

fennecs 🔗

Hello, I'm tiger (aka jupiter), and since earlier this year I've been working on a free, libre, and open source Entity-Component System in pure C# that aims to minimize boilerplate and dependencies, works without code generators, and give decent flexibility and performance.

Who is it for?

ECS are an architecture to apply game or other logic to large numbers (ballpark: tens and hundreds of thousands) of objects or actors in an interactive game or simulation, and ECS libraries usually enable expressive composition that go beyond the the intrinsic optimizations of keeping data close together in memory.

fennecs is lightweight and works well with Godot 4.x, The NuGet package is going into its 0.6.0 release soon (about 20 releases so far - see the roadmap)

fennecs is made to operate in just about any sufficiently advanced .NET environment (.NET 8 or later), sadly this precludes using it with Unity for about another two years - but it was created after I spent around five years working with DOTS and coming to the conclusion that it is just too heavy on boilerplate for small teams or solo developers.

There are two simple demos for Godot, a demo for the Stride engine, and when I or one of the other contributors get around to it, demos for raylib_cs, Flax, MonoGame, and others are coming, as well as more demos for Godot.

Possibly ShapeEngine and especially Murder Engine are first in line, though.

What would I like?

Easy - I'd love to hear your thoughts or questions about it if you find the time. It means the world to me to hear other viewpoints or discuss features and contributions with the wider public.

Performance?

Funny you should ask. Everywhere I post, somehow with ECS this appears to be the first question.

Even though top performance isn't the focus (minimum boilerplate is!), thanks to its compact memory layout, fennecs is doing quite all right in Doraku's synthetic C# ECS benchmarks; of which you can find an excerpt on fennecs's github. Performance hardliners can rest assured that another optimization pass comes with the 0.7.x release cycle, after the SIMD interfaces are made available.

Unique traits

fennecs is relational, allowing grouping entities by data-backed relations with other entities (bob owes alice) that are automatically cleaned on entity despawn; by link objects (in physics world P); and soon by arbitrary typed secondary keys (version 0.6.x).

Its Stream Views allow code to access the contiguous storage components are stored in in various ways (including just the raw memory to submit to GPUs or game engines),

Batch operations can modify whole groups of entities or components at once, in a fast and intuitive way.

a cartoon fennec splashing purple paint onto the screen with the word "BLIT" written into it

The SIMD operators currently in development are likely to keep fennecs at the forefront for a wide variety of typical tasks, such as integrating positions and accelerations, matrix transforms, increments, etc.

SIMD ops internally use AVX2, SSE2, and AdvSIMD intrinsics to vectorize their operations where possible, and more complex operations can be composed by sequential ops.

This field is where fennecs' "low boilerplate" design goal doesn't clash with actual high performance and systems programming, and it is great for the optimization stages in game development.

Each release has close to 100% unit test coverage, and because it's pure C#, debugging, inspection and refactoring tools work very well with it.

One last, hidden advantage of being pure C# is that fennecs keeps its data in the .NET domain. Potential performance drawbacks of this are compensated very well by having to marshal function calls and component data back and forth much less frequently than many native-code ECS with C# bindings would.

21
 
 

Hi everyone! In this video, I would like to show how we can create a shader that works like a fish-eye camera or deforms part of the image using a magnifying glass. The shader will be fully configurable, so we'll be able to adjust the magnifying glass's radius, the level of distortion, or crop the edge to simulate looking through a peephole in a door.

22
35
submitted 1 month ago* (last edited 1 month ago) by [email protected] to c/godot
 
 

Video descriptionUser selects code and presses a shortcut (Shift+Alt+E) and window pops up with the selected code on the left, and empty code box on the right and another text box on the bottom. The user types "Please separate the code into more managable chunks" and magically, chunked code appears on the right bit by it. The user presses on a button "Accept Changes", the window closes and the chuked code replaces the originally written code in the script editor.

Easily clean up your code with GoPilot.

GoPilot available some time soon on the AssetLibrary!

This is kinda a crosspost to Mastodon

EDIT: Updated the video description EDIT 2: Added info to crosspost

23
 
 

After working on it for two years, I've finally released Minimal Slide on Steam.

When I started making it, Godot 4 was almost out, but I wanted to made the game with Godot 3 not only because I already had a bit of experience with it, but also to celebrate what I thought was already a very cool engine.

If you're interested, I've made a thread on my BlueSky account to show the numbers a game with little to none advertisement can pull (spoiler: I'm far from earning enough the recoup the Steam Direct fee).

Anyway, thanks for reading. Let me know any thought you have about the game!

24
 
 

Hi everyone! Welcome to the second part of the tutorial, where we create a space sky shader in Godot 4. In the previous video, we made a skybox with a generated sun that illuminates half of the surface of a rotating red planet. This time, we'll continue by adding clouds above the planet's surface, and finally, a moon that will orbit it and cast a shadow.

25
 
 

There's been surprisingly little fanfare for this but I guess most of the Godot community are hobbyists anyways.

Prices: https://www.w4games.com/w4consoles

view more: next ›