Godot

5924 readers
195 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
401
 
 

Hello, friends of #Godot and its shading language. This time, I would focus on something slightly more complicated. We will simulate an old #CRT monitor with all of its imperfections. #GodotEngine #godot4 #GodotTips #devlog #shaders

402
 
 

@[email protected] had some dyslexic problems at https://lemmy.ml/comment/4564704

So I fired up Godot and obliged. And I managed to create a funny little game despite Long Covid. Have fun!

403
 
 

Recently updated my destructibles C# plugin for anyone who's interested, it makes it easy to convert shard scenes made with blenders fracture into packed scenes of rigid bodies + scaling, position and rotating them. They can be pre-generated before into a packed scene or generated during runtime with custom fade effects as well.

404
29
submitted 1 year ago by mac to c/godot
405
 
 

I'm following this tutorial for implementing translations into my game. While importing though, I get this block of error messages:

The csv I have in the file system contains this data:

and it uses UTF 16. It seems as if Godot expects a UTF 8 file for some reason, even though these files don't support speciala characters (which are used heavily in different languages). Does someone know what is going on here?

406
407
5
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/godot
 
 

Hey y'all, throwing a little project together in Godot 4.1 to practice stuff I learned after a tutorial project. I've set up two markers as my projectile spawn points, but the shots are spawning slightly off from the markers and I can't figure out why. Code and pics below. ~~I "fixed" it by shifting the player sprite2D 5 pixels to the right. Not sure why the spawns are being offset though.~~ NVM that only fixed it at the starting position, the shots are way off when rotating. In editor you can see the markers at the two tips on the ship.

In game you can see the shots spawning just to the side of the markers.

Edit: I broke the formatting posting on mobile 🙃

This snippet is from the player script

` var player_direction = (Globals.player_pos - $FixedHardpointDirection.position).normalized()

if Input.is_action_just_pressed("fire_primary") and can_shoot and Globals.laser_ammo > 0 and hardpoint_type == 0:

	Globals.laser_ammo -= 1

	var hardpoint_positions = $ShotStartPositions.get_children()

	can_shoot = false

	$Timers/LaserTimer.start()

	for i in hardpoint_positions:

		player_shot_fixed_weapon.emit(i.global_position, player_direction)

`

And this is from the level script

` func _shoot_fixed_weapon(pos, direction):

var laser = laser_scene.instantiate() as Area2D

laser.position = pos

laser.rotation_degrees = rad_to_deg(Globals.player_rotation)

direction.x = cos(Globals.player_rotation)

direction.y = sin(Globals.player_rotation)

Globals.fixed_hardpoint_direction = Vector2(direction.x,direction.y)

print(Globals.fixed_hardpoint_direction)

laser.direction = Globals.fixed_hardpoint_direction.rotated(-1.5708)

$Projectiles.add_child(laser)

`

408
 
 

I recorded a short tutorial about creating a third-person controller in Godot 4, using an animated 3D model. Check it out!

409
7
Godot by Junferno (www.youtube.com)
submitted 1 year ago by dwraf_of_ignorance to c/godot
 
 

Introduction to Godot (not a tutorial)

410
14
submitted 1 year ago by popcar2 to c/godot
 
 

Casey Yano, one of the devs at MegaCrit (Slay the Spire devs) just released a blog post on his initial impressions for Godot after exploring it with their 3-week jam game Dancing Duelists

TextMeshPro is phenomenal though. I miss it. Please, just let me vertically center my auto-sizing min/max set font text into a clean rectangle.

I feel this. Still upset there's no toggle to vertically center text. I also generally agree that sprite/texture atlases more complicated to use than they should be. The rest of the blog post is pretty positive and insightful, it's a good read.

411
 
 

412
413
414
415
 
 

I have a min and max position of an object and I want to represent an arbitrary point between them as a float between 0.0 and 1.0. This feels relatively basic math, but I can't quite figure out what I need to do with this. Is there a special name for this sort of thing? Also, are there any built-in methods that would be useful for this?

416
 
 

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

A devlog on switching from Unity to Godot and then to Bevy.

417
418
419
420
 
 

It would be very good if Godot had better starting options for newcomers.

As in, some example games that people can start playing around with.
Yes, there are official demos, but those are just for showcasing specific functionality of the engine.
What Godot needs is more projects that showcase gameplay mechanics. Some simple demonstrations of how a popular game genre would be implemented with Godot.

Unreal Engine has Lyra and Unity has FPS Sample.
Liblast is probably the best such project for Godot, but in my opinion it misses the point, as developers went way too hard on shiny graphics instead of focusing on variety of weapons and game modes.
I'm sure that there are many other projects of similar sort that I am not aware of.
So please, feel free to provide any relevant links.

It should be in the interest of Godot community to provide game templates for as many game genres as possible.
My taste in video games might be stuck in the past, so my list of "popular game genres" probably does not reflect the modern state of what people like to play.
So it would be good if figuring out priorities would be a community effort. Example games for which genres should be developed first, so that we gain more interest from newcomers.

If I find some time, i will go through my list of starred repos and post links to all relevant projects that I came across over the years.

Overall, I would love to hear your thoughts on this.

421
 
 

Why is there a load() at all?

422
 
 

I had this issue back in Godot 3.5 and hoped that it'd be gone, but Panels and some other Control Nodes still resize magically when executing another scene. This is such weird behaviour, that I have no idea where it might come from. Has anyone ever seen such a thing happen before? Here is a video of the bug in acton: https://piped.kavin.rocks/watch?v=79DYDT5qngk

423
 
 

I am using Godot 4.1 and after I added the first rigidbodies to my game, I noticed the physics seem really unstable. The floor is a StaticBody with large and 1m thick BoxShape. I have RigidBody objects with simple BoxShape colliders and the thinnest side is 0.3m. Often when I knock them on the floor they do not come to rest, but keep vibrating indefinitely. They are not on top of each other, this happens when a single object is only on top of the static floor. Increasing physics ticks per second to 120 seems to help, but I am not sure how it affects performance and what will be my final targets. Is it normal for the physics to be so unstable and jittery in such a case I would assume to be very simple and mundane at 60 ticks per second?

424
 
 

Is there a way to run python scripts in Godot (4)? I'm trying to build a user interface for using some spaces on HughingFace. I would do that through the gradio_client library for python. I want to export the project to Android, but I don't think that android comes with python pay default... How would I go about running some.python script at runtime?

425
 
 

In this episode of Tech Over Tea podcast, @BrodieOnLinux has invited Emilio Coppola, Godot Foundation Executive Director. Tune in, fetch some drink and have a good hear!

@godotengine

view more: ‹ prev next ›