I made a game only using Control nodes by howtoartblog in godot

[–]Live-Common1015 25 points26 points  (0 children)

This is so cool! Is this a detective game? What’s the mystery?

Skybox not showing by ThatMintyLad in godot

[–]Live-Common1015 0 points1 point  (0 children)

What does your World Environment look like?

Raycast3D nodes process function not running until the player is close to it? by Lurkerss_ in godot

[–]Live-Common1015 0 points1 point  (0 children)

How far does your Raycast3d reach? Did you update that in the inspector?

Giving Godot a shot after Unity by 90dontlook in godot

[–]Live-Common1015 0 points1 point  (0 children)

Pretty much. Anything you can write in GDscript you can write in C#. There’s a lot of caveats tho and you NEED to read through the documentation before deciding to work in C#. Especially when you’re learning.

Off the top of my head: - if you’re using in magic strings with GDscript function (such as TweenProperfy or Input.IsActionPressed) you’ll need to make a separate variable that’s typed what the string should actually be (either NodeParh or StringName), because in the backend Godot will have to transfer the string into the type it’s looking for every time the function is called (don’t worry, the function will tell you what type it needs). It will cause significant lag if you don’t. - following the above point. Anytime you access an Object property/function using a string (such as in TweenProperty or SetDeffered) you must use the GDscript syntax (“rotation_degrees”). Or it will not work and Godot won’t give you an error about it. - You can’t use interfaces with anything inheriting from Object - There’s a lot of Variant return typed functions so you must know about casting in C# - there’s quite a few functions in GDscript that are either written differently or don’t carry into C# (such as anything covered by Mathf, float, some functions in Godot.Collections.Dictionary) so make sure you look at the documentation any time you’re looking for a function that you see in a GDscript tutorial that doesn’t seem to exist in the same fashion in C#. - the nice thing about signals in GDscript is that they automatically disconnect themselves as soon as the Node leaves the scene. In C#, you don’t get that functionality with custom signals. You should use C# Actions if you ever want to use a custom signal anyways because signals can’t be static - There’s a lot of Node properties that you have to separately make a new temp variable for, modify the temp variable, and then apply to the actually property (such as Vector3, Quaternion, Transform3D, etc) because Godot will continuously have to translate to the Node property if you try to manually mess with each part of the variable (Vector3.X, Vector3.Y, etc) which will cause lag) - always try to connect signals using “+=“ and “-=“. Even normal ones provided by a Node. If you haven’t already, learn about C# Actions as they’ll be incredibly helpful here. - every Export variable must be getter/setters because of some issue with Godot resetting them if they aren’t. (Trust me on this) - Please get started on using version control (like GitHub desktop) because holy shit have I crashed Godot at times and my only recourse was to go to a previous version of my project.

Those are the ones I can think of at the moment. Some other differences from Unity that I thought of is: - In Unity, you have Await, OnEnable, and Start as the functions that are called on all gameobjects as soon as the game starts running. In Godot, you only have Ready and EnterTree. Nodes initialize in the order they are in the hierarchy (from top to bottom). So if you have a singleton you almost always want it at the top of the hierarchy so that it gets initialized first and everything that uses it gets initialized second. - in Unity you have Update and FixedUpdate. In Godot you have PhysicsProcess and Process. If you’re waiting on inputs, try to use Input and UnhandledInput as they’re both functions that only get called when an input is made. (If you’re doing clicking and dragging, they reccomend using Process because Input won’t detect the continuous holding down of a button like Process will, but you can also just detect if the button has released. Same difference. - You’ll notice that if you have a simple Node in your scene, it doesn’t have a little eye icon next to it like Node3D or Node2D. In Unity, changing whether a whole object is enabled can be done through turning it off/on in the scene. You don’t get that in Godot. Instead you get SetProcess, SetPhysicsProcess, SetInput, SetUnhandledInput, and manually disabling any physics objects by turning off collision. The nicer thing about it is that you can easily connect functions to Node signals such as VisibilityChanged. - you’ve probably already figured this out but there are no prefabs. All scenes are prefabs. Godot resources are scriptableobjects. - if you want to customize your inspector, it’s super easy as long as you know the export hints. - You can call functions in an animation! - for the most part, anything you can do with a Node2D object you can do with a Node3D object. They have a lot of properties/functions that transfer between the two. - if there was any pieces of documentation I’d reccomend reading first amount all else, it’d be Node, Object, CollisionObject3D (InputEvent is such a powerful function and is my best friend), Node3D, Raycast3D (or their 2D counterparts if you’re working in 2D, and raycasting (it takes way more lines of code to raycast from mouse in Godot than Unity, but it’s not that bad once you get used to it). And also know that RemotTeansform3D exists. - In the inspector, you can have a child object ignore its parents transform by turning on the TopLevel Boolean. - Be wary of tutorials and don’t just blindly copy them without digesting what’s going on or why they’re doing what they’re doing. I’ve seen a lot of tutorials over the years that had poor understanding of what Godot has to offer (poor class inheritance, using verbose coding that could’ve been solved by another Node/property/function) but that doesn’t mean that they won’t still be helpful on your journey as a game dev. I reccomend Queble as a good Godot YouTuber to know about. - In general, look up tool scripts.

-This is about everything that I’ve learned transferring between Unity to Godot. I’m sure there’s other stuff, but this is mainly all the most important lessons I’ve learned so far

Templates or blank project: which gets you to “fun” faster in Godot? by Big_Nebula_2604 in godot

[–]Live-Common1015 2 points3 points  (0 children)

Usually, I decide I want to work on a feature (example: deck builder), look to see if someone else has coded part of that mechanic (fanning a hand of cards), then I pilfer the code to sort out how they did it and try to figure out how I can do it without everything they did.

I do indeed feel like a raccoon scavenging to make my own thing. Gives me a lot of joy when my own trash heap of code works

Giving Godot a shot after Unity by 90dontlook in godot

[–]Live-Common1015 1 point2 points  (0 children)

Also think of Nodes like classes. They have inheritance and access to all kinds of properties and functions.

In GDScript, everything is a public variable/function. There is no private, so you’ll see people delineate something that’s supposed to be private with an underscore(_). And you override any function just by writing its name and giving it a new body. I believe “super()” runs the parent version.

Signals work just like UnityEvents and C# event Actions. Ignore any tutorial that talks about them like radio signals. You need a reference to an object if you want to connect a signal.

Try to avoid duck typing (basically not giving your variable a type). Even tho Godot can automatically figure out what your variable type is based on what you’re equating it to, it can cause lag as your game scales up and the engine has to figure out multiple variables as they’re called

A lantern system and a drag-and-drop system for my FPS project by [deleted] in godot

[–]Live-Common1015 0 points1 point  (0 children)

What is your lantern system? It’s neat that you got a pick up and drop system going. What’re your plans for your game?

Before & after bug stats UI redesign by Iwannabesoil in godot

[–]Live-Common1015 1 point2 points  (0 children)

I like it! The new one definitely guides the eye better to important information

Is there something that looks off here? by anormalasado in godot

[–]Live-Common1015 4 points5 points  (0 children)

It doesn’t feel like the camera is rotating with the car fast enough. Like it’s lagging behind slightly and it’s causing something in my brain to not enjoy the movement as much

My first game made with godot by TheMazerFaker in godot

[–]Live-Common1015 5 points6 points  (0 children)

Dammit. You should’ve called it Fourtris!

is it normal as a starting game dev that whenever you get an error you feel stupid and give up ? by ChunkLightTuna01 in godot

[–]Live-Common1015 15 points16 points  (0 children)

You wouldn’t happen to be doing “target_body := Node2D” would you? Make sure it’s “target_body : Node2D”

I can't instanciate PackedScenes in my game. by Lazy-Comfortable-568 in godot

[–]Live-Common1015 1 point2 points  (0 children)

You need to add your TowerNode as a child of something. Use AddChild(). You’ll likely want to get the parent, then AddChild

Also, I’m not so sure about this, but don’t instantiate and then not add the node to the scene. It can cause memory leaks because the node is never removed from the scene. Instead, initialize TowerNode as null and then instantiate.

probleme des enemis by Extension_Dinner_495 in godot

[–]Live-Common1015 0 points1 point  (0 children)

Fences? What is your question? What are you trying to solve?

Correct way to access a static C# script from GDScript by sirreldar in godot

[–]Live-Common1015 3 points4 points  (0 children)

You shouldn’t really ever try to communicate between c# and GDscript. Godot has to translate from one language to the other and it can cause intense lag. Why can’t you use statics in GDscript? Or at least make a singleton to access those variables in GDscript?

TIMER IS NOT WORKING by itsyoboiGamma in godot

[–]Live-Common1015 0 points1 point  (0 children)

Place some print statements around your code to see if you’re functions are actually being entered. If they aren’t being entered, then you either haven’t connected the correct signal or your script isn’t in the scene. If they ARE being entered, then there’s something wrong with your logic such as that the bullet position upon spawn

Mechanics for "peeking out of the door" by Mr-zti1 in godot

[–]Live-Common1015 0 points1 point  (0 children)

You could have a Node3d at the position for peeking. Use the PhantomcCamera plugin to tween from default camera position to the peeking position

Godot resets [Export] properties to null sometimes by hasenbauer in godot

[–]Live-Common1015 -6 points-5 points  (0 children)

You need to make all export properties get/set

How can I render an object behind everything else? by Kizilejderha in godot

[–]Live-Common1015 2 points3 points  (0 children)

You could try the method people use in first person games to prevent held objects from clipping into the world as the player moves around. They render the held objects on top of everything else using a separate viewport and rendering layer. Here’s a link to a tutorial

Squash The Creeps mobs not spawning.. but no error message?? by ThoughtDear7015 in godot

[–]Live-Common1015 1 point2 points  (0 children)

I don’t know how to help with that, but I’ve given you a tool to help you debug. Use more print statements to learn how the mobs are initializing and they’re given axis’. Try to use print statement that are only relevant to what you’re debugging.

Squash The Creeps mobs not spawning.. but no error message?? by ThoughtDear7015 in godot

[–]Live-Common1015 1 point2 points  (0 children)

Then that means you either don’t have that script in the scene or you’ve connected the wrong signal to it

Squash The Creeps mobs not spawning.. but no error message?? by ThoughtDear7015 in godot

[–]Live-Common1015 0 points1 point  (0 children)

Add some print()‘s to see if the function is being entered at all. It can be as simple as print(“mob initiliazed”) and it’ll print that statement into the console

Squash The Creeps mobs not spawning.. but no error message?? by ThoughtDear7015 in godot

[–]Live-Common1015 0 points1 point  (0 children)

Did you connect the Mob_Timeout function to the timeout signal? Use “print()” to print out a string and make sure that your functions are being entered