Godot

6612 readers
4 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 2 years ago
MODERATORS
1
2
 
 

Junkyard Space Agency is an upcoming co-op space agency simulator that the developer said is like a "scrappier, multiplayer version" of Kerbal Space Program. It's being made with Godot Engine

3
 
 

Hey everybody! Let's go back to two dimensions, and take a look at how to create the effect you're currently seeing in the background of this video. It's basically something like a kaleidoscope, for which we need a source image and parameters like the number of segments, or the rotation speed. So let's go ahead and program this shader.

4
31
Godot Showcase - Somar (godotengine.org)
submitted 6 days ago by [email protected] to c/godot
5
 
 
6
7
 
 

Hey everyone! This time, we'll be playing with fire. It's not the first time I've created a fire shader, but back then, I used a noise texture and a curve as a parameter, which significantly simplified the whole process. Now, we'll try it without such tools and generate a candle flame, which, as always, will have plenty of parameters for further adjustments. So let's get to it.

8
41
submitted 1 week ago by Stefh to c/godot
 
 

A few days ago, I saw a post on Reddit that inspired me to create a new local multiplayer game for me and my friends. After some late-night coding sessions, I’m excited to share Horse Race: a chaotic, fast-paced game perfect for game nights (or even solo play).

How it works:

Each horse is assigned to a specific button: the button you press to join the race. Your button is your key to controlling your horse throughout the race:

Attacking Opponents: to attack an opponent, simply press your button when you're in front of them.

Changing Direction: to adjust your horse's direction, press and release your button.

I’d love for you to try it out and share your thoughts. Any feedback or suggestions are more than welcome. Let me know what you’d like to see added or improved.

Play embedded here: https://stesproject.itch.io/horse-race

Have fun!

9
 
 

I'm going to try posting here interesting Godot dev updates I find on Mastodon. I am in no way associated with this game.

10
11
12
13
78
Here from reddit (self.godot)
submitted 2 weeks ago by KnightMan to c/godot
 
 

Hey y'all, I'm here from reddit after getting falsely permanent banned and I'm wondering if the community is good?

14
 
 

Some objects sticks with each other when those use CharacterBody2D, and moves like those are sticking together.

So, what do I need to do to solve this issue?

15
9
submitted 2 weeks ago* (last edited 2 weeks ago) by xolatgames to c/godot
 
 

Hi, folks! So, I have the problem with making materials as unique.

Image

I need effects, such as painting of ships in red color, will applies only where particles will spawns. But... As you can see those effects can applies also into other ships.

I've already set these materials as "Local to Scene" into inspector tab.

And have create script for making those materials as unique:

func _make_ship_materials_unique() -> void:
	for i in ship.get_children():
		if i is MeshInstance3D:
			for n in range(i.get_surface_override_material_count()):
				i.mesh.surface_set_material(n, i.mesh.surface_get_material(n).duplicate(true))

But it given me few results 😕

If it can help, here's the script of applying of ships painting:

func damaged_spec_effect() -> void:
	for i in ship.get_children():
		if i is MeshInstance3D:
			for n in range(i.get_surface_override_material_count()):
				_create_fade_in_then_out_effect(i.mesh.surface_get_material(n), Color.RED)
func _create_fade_in_then_out_effect(material: Material, final_color: Color) -> void:
	if material is StandardMaterial3D:
		material.albedo_color = Color.WHITE
		var tween = get_tree().create_tween()
		tween.tween_property(material, "albedo_color", final_color, EFFECTS_DURATION / 2)
		tween.tween_property(material, "albedo_color", Color.WHITE, EFFECTS_DURATION / 2)

So, what do I need to do for solving my problem? 🤔

16
 
 

Hey everybody! Recently, we created a shader that simulated an analog clock using polar coordinates, and we'll stick with this type of display a little longer. This time, I'll demonstrate how to program a fully customizable spinner based on similar principles. So, let's start coding!

17
 
 

I'm new to Godot and game dev and I've decided to make my first project (having already finished some tutorials) to implement the Diplomacy board game in Godot.

Creating the logic of the game will be the easier part for me as I've been a professional systems programmer (C++/Python) for several years now.

What I'm struggling with right now is how to create the map and the tiles that represent that game board (online example: https://imgur.com/bfnEMup). Since I will want the game to react to a click anywhere in a particular region, I assume I need to have some Area2D that matches the region's shape. The problem is that it's irregularly shaped and I don't know what the best way to accomplish my goal would be.

The options I've thought of so far:

  1. Import the entire map. Then in Godot, create the areas to approximate the regions.
  2. Import the map into some graphics program. Split the map into a sprite for each region. Somehow save the offsets. And import the regions into Godot, each as its own asset. I assume generating a shape from an imported asset is pretty easy.

Any advice or recommendations?

18
 
 

Hi everybody! I hope the previous episodes have piqued your interest and that you're motivated to learn more tricks for rendering a 3D scene in 2D shaders. As you may have noticed, so far we've been able to change the camera's position, but not the direction it's facing, meaning it was fixed straight ahead, which has been somewhat limiting. In this video, we'll solve this problem, so that by the end, we'll be able to aim the camera anywhere or even set it up as an orbiting camera. So, let’s do it.

19
 
 

How is it? I'm eager to hear any and all feedback.

If any of you are on macOS, I could use your help testing out the add-macos branch. What's currently there is just me guessing at what might work.

20
37
submitted 1 month ago by popcar2 to c/godot
21
 
 

Hi everybody! And welcome back to our miniseries dedicated to rendering 3D scenes in shaders using the ray marching method. In the third episode, we will bring the previously static scene to life – adding combinations of objects, rotations along different axes and pivots, multiple lighting sources, and morphing using the so-called smooth minimum.

22
 
 

I have instances of this area2d object that spawns and is added to a group dynamically. when they collide I want them to say their name and the group they are in. right now they report their name but not their group and I can't figure out why, when they instantiate they report the group they are in so it looks like they're in their group but when they collide the group is missing.

var type_groups = [ "pluto", "moon", "mercury", "mars", "venus", "earth", "neptune", "uranus", "saturn", "jupiter", "sun" ]

func set_type(t): type = t

# Adjust for paths or hierarchy
var shape = get_node_or_null("CollisionShape2D")
if shape:
	shape.scale = Vector2(type_sizes[t] * 5.5, type_sizes[t] * 5.5)
	
var detect = get_node_or_null("Area2D/CollisionDetection")
if detect:
	detect.scale = Vector2(type_sizes[t] * 5.7, type_sizes[t] * 5.7)
	detect.add_to_group(type_groups[t])
	print("added to group: ", type_groups[t])
	
var sprite = get_node_or_null("Sprite2D")
if sprite:
	sprite.scale = Vector2(type_sizes[t] * 1, type_sizes[t] * 1)
	sprite.texture = type_textures[t]

func _on_area_2d_area_entered(area): print("Collision detected by: ", get_name(), " | group: ", area.get_groups()) set_contact_monitor(true)

23
24
 
 

Hello!

So I installed an addon and saw that it made a license, readme and so on on the main folder. At the moment I didn't had those files there since I'm still very early on the game but shouldn't this files be inside the addon folder instead of the whole project?

The addon is as simple as check for the TODO on the comments but I want to do this properly. Where should I move this files of the addon? Or my License would substitute the one there if it's stronger?

Thanks!

25
 
 

Hi everyone! Do you remember the digital clock shader I created here some time ago? It was one of the first 2D shaders I used in a 3D project, and the result looked very usable. I think a shader simulating a classic analog clock could have a similar application, and that's exactly what we'll be creating today.

view more: next ›