Godot

5885 readers
53 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 1 year ago
MODERATORS
426
 
 

I’m just curious about which is the most efficient way of doing this kind of node enumiration:

for i in something():
    o=[var1,var2,var3,varN][i]
    o.new()
    o.do_something_based_on_number_of_loops()
    add_child(o)

or

for i in something():
    match i:
        0:
            o=var1
            o.new()
            o.do_something_based_on_number_of_loops()
            add_child(o)
        1:
            o=var2
            o.new()
            o.do_something_based_on_number_of_loops()
            add_child(o)
        2:
            o=var3
            o.new()
            o.do_something_based_on_number_of_loops()
            add_child(o)
        N-1:
            o=varN
            o.new()
            o.do_something_based_on_number_of_loops()
            add_child(o)

or

var items = [var1,var2,var3,varN]
for i in something():
    o=items[i]
    o.new()
    o.do_something_based_on_number_of_loops()
    add_child(o)

Or is there a more efficient way of doing it?

Edit: Sorry if that wasn't clear. Is it better to constantly get something from an "unstored list", store the list in a variable, or not use a list and use a match statement instead? Do they have any advantages/disadvantages that make them better in certain situations?

427
10
submitted 1 year ago* (last edited 1 year ago) by Smorty@lemmy.blahaj.zone to c/godot@programming.dev
 
 

How would I go about creating a pixel art theme for a game? I don't want to lower the resolution of the game, as it is supposed to render the game in the native resolution and I want crisp effects and text. Currently Godot makes a single pixel of the ui a single pixel on the screen. How would one go about fixing that? UI looks like this currently:

Do I really have to scale every control, or can I set it up for controls to automatically display its textures bigger?

EDIT: Here is a zoomed in version of the picture above. This should clarify of what I want to achieve (without having to zoom in)

428
 
 

I picked up the Zenva bundle from Humble and I've done the first two classes and I feel like I learned a little, but the classes have failed to actually teach me much of anything about GDScript. I don't understand why I typed what I typed or how to use the code I did "learn" so far.

Any recommendations for other tutorials or something I could read to learn more? Maybe a book or a website of written tutorials.

I'm going to continue with the courses, but I feel like I'm not going to get much out of them.

429
 
 

https://www.youtube.com/@Brackeys/about


Text version, thanks to @CorneliusTalmadge@lemmy.world:

Image Text

BRACKEYS

Hello everyone!

It’s been a while. I hope you are all well.

Unity has recently taken some actions to change their pricing policy that I - like most of the community - do not condone in any way.

I have been using Unity for more than 10 years and the product has been very important to me. However, Unity is a public company. Unfortunately that means that it has to serve shareholder interests. Sometimes those interests align with what is best for the developers and sometimes they do not. While this has been the case for a while, these recent developments have made it increasingly clear.

Unity has pulled back on the first version of their new pricing policy and made some changes to make it less harmful to small studios, but it is important to remember that the realities of a public company are not going to change.

Luckily, there are other ways of structuring the development of software. Instead of a company owning and controlling software with a private code base, software can be open source (with a public code base that anyone can contribute to) and publicly owned. Blender - a stable 3D modelling software in the game dev community - is free and open source. In fact some of the largest and most advanced software in the world is built on top of open source technology like Linux.

The purpose of this post is not to denounce Unity because of a misstep, to criticise any of its employees or to tell anyone to “jump ship”. Instead I want to highlight the systematic issue of organizing large software projects under a public company and to let you know that there are alternatives.

I believe that the way to a stronger and more healthy game dev community is through software created by the community for the community. Software that is open source, democratically owned and community funded.

Many of you have been asking for us to produce new tutorial series on alternative engines such as Godot, which is currently the most advanced open source and community funded game engine. I don’t know yet if this is something that we can realise and when.

I can only say that I have started learning Godot.

Best of luck to all of you with your games, no matter what engine they might be built on!

Sincerely,

Asbjern Thirslund - Brackeys

430
431
 
 

I'm not terribly proficient with making materials yet, but I was wondering if something like this is doable and if so, what it might involve. I basically want to make a part of a creature appear beneath the ice in 3d. but I don't know how to approach it or what I should be looking at.

432
 
 

TL;DR:

Before:

An image showcasing the old de-noiser

After:

An image showcasing the new de-noiser

These images are 2 weeks old and there have been some changes to it, as well as a slider to adjust de-noising. Notice how much more pronounced the ambient occlusion is, and how much better the overall shading is. It's also faster than the older implementation.

On the scene I used for testing this out, the overall rendering time went down from 3 minutes to just over 1 minute in an RTX 3090 Ti with an 8K lightmap.

Bonus: This PR shaves off a massive chunk of the codebase (about 10% apparently.) Expect faster build times and a smaller engine size in 4.2!

An image showing a diff of +304 and -114,449

433
 
 

Is there a way to disable it, so that, when I switch from godot to my browser it does not type my search in godot instead of my browser?

434
435
436
 
 

This adds AMD FSR 2.2 scaling to Godot, where it previously only supported FSR 1.

437
438
 
 

One of the big winners of the Unity debacle is the free and open source Godot Engine, which has seen its funding soar to a much more impressive level as Unity basically gave them free advertising. Certainly helps that Godot ended up launching their new funding platform on the same day Unity announced their hated Runtime Fee system.

Initially when the Godot developers announced their new funding platform they only had around €25K per month from 438 members. This has now exploded up to €50,323 per month from 1,458 members. A much better and more sustainable amount considering they're building an entire game engine.

They also recently gained Terraria developer Re-Logic as a Platinum sponsor, as Re-Logic donated $100K along with $1,000 a month in ongoing funding. On top of that developer Robot Gentleman of 60 Seconds! has also upped their support of Godot and no doubt plenty of others.

Hopefully this is going to be a turning point, where developers look more to open source tools where feasible instead of locking themselves into proprietary game engines with predatory business practices. Unity has proven multiple times now they're willing to break developer's trust like their messing around with Terms of Services.

439
 
 

I am trying out Godot and I've noticed that when I export the game to linux, the result has a much longer boot time

I'm talking about an 80mb executable for a 3d game and the difference between windows and linux is 0.x seconds vs 10 seconds (the windows computer is more powerful but not by that much...)

I wouldn't care much about that, but during that load time the scene's ready() is triggered and music is played. This causes the cutscene to be desynced with the music and is quite jarring.

Does anyone know why this is happening? Version is 4.1.1 btw

EDIT: after some trial and error I've finallly found the issue. Surprisingly the cause of it was the world environment, more specifically the sky settings, which I had set to high. Bumping them down pretty much fixed the issue.

It's probably a bug, but hey, it works now 🤷

440
441
 
 
  • Stylized 3D Test & Pho King My Life
  • Galaxy Drift
  • The Adventures of Sir Kickalot
  • War of the Fourteen Dynasties
  • Seedlings
442
 
 

Wildmagic Wizardry is a Spell Mixing, Dice Rolling, Strategy roguelike where you Mix the elements from your magical dice to create powerful spells and fight your way through groups of enemies.

Currently available on both Windows and Linux, so please give the demo a try and let me know what you think! 🙂

https://heffy.itch.io/wildmagic-wizardry

443
 
 

My game has options for player customization, it's a number of .png files that are not loaded with the game startup, save for the default ones. Instead, if the player clicks a button, it will load the next file for that part (like, say, hair-2.png)

This works fine on the editor, but I've just tested an exported version and it doesn't work there, completely failing to find any files within the .pck. If I move the executable back to the project's folder, it works as expected.

Trying to figure out the why, I've also exported via Export ZIP/PCK, and found out it doesn't actually export any of the .png files, it only exports the .import files. The actual images are stored in the .godot/imported folder, each with a long, random(?) string attached to their name: hair-1.png becomes hair-1.png-t3g9r2he7783y9hut.tcex

I haven't figured out a way to export the .png files as is, so what are my options here? Besides coupling all of the parts in a single image and separating it by frames of animation, which will require both code and art rework

Tested on both Godot 4.1.1 and 4.1.2-RC1

444
 
 

Hey guys, unity refugee here:

I'm gonna try to port my 7 year game to Godot, lets see how it goes. Since it's a massive project and I am coming to unity I have decided to use C# instead of GDScript (which I did try for a while and may even use in some scripts).

I have had two crazy last days working on how to set up intellisense and Debugging on my linux machine for Godot (it should work similar for windows) for C#. So here is a guide of how I managed, in case someone else faces the same problem to save them some headaches:

1.Follow this guys tutorials which are amazing especially to sort the debugging out:https://www.youtube.com/watch?v=xKjfjtLcWXw&t=279s (Linux)

https://www.youtube.com/watch?v=c_cdAYDHR0E&t=58s (windows)

He will tell you to only install the C# extension on VSCode

If you still have issues you may try the following:

  1. if you have many different versions of .net uninstall themFrom discover I installed .net core sdk only one, otherwise the variables get mixed up.

  2. I also uninstalled Vs code and all the configurations and settings https://code.visualstudio.com/docs/setup/uninstall, and installed Vs code from the snap store.

  3. Put the exec file shortcut:

    Open the Editor Settings

    Select Text Editor > External

    Make sure the Use External Editor box is checked

    Fill Exec Path with the path to your VS Code executable

    /snap/bin/code (for Linux)

    Fill Exec Flags with {project} --goto {file}:{line}:{col}

5 .A the key part is when/if you lose instellisense, press ctrl+shift+P-> .Net generate assets to build and debug

Let me know if you need more help or I am missing something please. I so glad this is working now :)

445
 
 

After nearly three years, it's finally time: My @godot remake of https://twitter.com/strongbadactual 's Stinkoman 20X6 is complete! Every level, every cutscene, and a whole lot more. To celebrate, I've put together a little trailer. https://ratheronfire.com/projects/stinkoman/ https://youtu.be/MitDNlfcgeM #godotengine #stinkoman

446
447
448
 
 

Hey guys I've recently been looking at Godot since Unity has set itself on fire. I'm liking it so far but I've run into a small issue that disrupts my usual workflow. I like to store multiple meshes as separate objects in a single .blend file for meshes that are very related to each other like pieces of a build kit. I was able to split the meshes into separate scenes by opening the .blend scene, right clicking and allowing children to be editable, then exporting each branch to a new scene. This works as expected with one problem. The exported branches don't update their mesh when I save changes to the blend file. Is there a fix for this?

If not I can always split the blend into multiple files. Its just less convenient. Perhaps exporting to colladae would work too? I didn't try that yet but ideally I would like to keep using blend files only to avoid exporting every time I make a change.

449
 
 

Hello all!

Like most people I find myself a recent refugee from the Unity fiasco. I've been trying to prototype a project in Godot and I've been running into an issue I would think would be pretty easy to find a solution to as it seems to be a pretty fundamental building block of any project in Godot. Perhaps I'm misunderstanding how to accomplish this in Godot, but essentially I'm instantiating a number of tiles to be used for a grid system in my game. I want these tiles to be able to emit their index and transform values and then have other scripts pick this information up as needed. From what I've read signals are the way to do this, however whenever I try to send a signal with or without parameters nothing seems to happen. I seem to be able to connect to the signal just fine but the method doesn't seem to be called.

Here's an example of me defining the signal and then emitting it:

signal index_transform()

index_transform.emit()

And here's how I am connecting and attempting to call the method in a secondary script:

func _ready() -> void:
	var hexGrid = get_node("/root/Main/Map/HexGrid")
	hexGrid.index_transform.connect(Callable(self, "_get_hex_index_transform"))

func _get_hex_index_transform():
	print("I'm Connected")

And when I'm passing parameters from what I understand I should only have to include the parameters like so:

signal index_transform(index, transform)

index_transform.emit(tile_index, tile_coordinates)
func _ready() -> void:
	var hexGrid = get_node("/root/Main/Map/HexGrid")
	hexGrid.index_transform.connect(Callable(self, "_get_hex_index_transform"))

func _get_hex_index_transform(index, transform):
	print("I'm Connected")
	print("INDEX: ", index," POS: ", transform)

However neither of these seem to work. What am I doing wrong?

450
 
 

For example if you want pretty effects like areas being lit by projectiles will Compatibility provide lower of options than Forward+ ?

Can you use materials (normals, reflect, etc) on textures in Compatibility to have light show up as it's passing by?

I'm still getting a grasp on things, nothing serious yet, but I'd like to know what to expect and your experience. More of a food for thought type of question.

view more: ‹ prev next ›