You guys wanted more, so here are 11 unexpected
behaviors and hard to find features.
Number 1: Renaming and deleting nodes
in inherited scenes can cause problems.
Godot’s scene inheritance is an
unbelievably useful feature.
You can easily take a base scene and adapt it.
This also works so well combined with script inheritance.
But there is a problem we came across.
When you manipulate a property
of a node in the inherited scene, and later remove or rename it in the base scene,
you will get an annoying warning like this.
It does not directly cause any harm,
but you don’t want warnings in your project if you can prevent it.
The inherited scene still has the reference to the deleted node, but we
cannot remove this reference anymore.
The simplest solution we found is to reset the
properties before removing or renaming the node.
You can also edit the scene file
in a text editor to fix it.
Number 2: Color values can be greater than one.
The modulate values of Canvas items can be put above 100%, but only if you switch to raw
mode. It’s not accessible in RGB mode.
This is very helpful if you
are working with HDR enabled.
You can easily make stuff glow, or make it glow
but still translucent combined with transparency. Thanks Rungeon and dVaan for pointing it out!
Number 3: Using global position and rotation.
Every node2d and node3d has a position
and rotation you can access.
These are always relative to their parent.
The actual position in the world is the global_position, this can be
read and changed like usual.
The overall rotation is
stored in global_rotation.
So if you want to set two objects to the same
position, it usually is wise to use global position when they do not have the same parent.
Number 4: How to use enums.
Enums are very helpful in godot.
You can access them anywhere when you give the script they are defined in a
class name. You can set the specific value, or let them increment automatically.
Apart from that it behaves like a normal dictionary.
You can get the keys with .keys and the values with .values. Which is nice.
Number 5: Curve textures exist
Godot has curve textures, and they are neat.
You can edit them with the curve editor, but they get sampled into a texture.
With that you can easily pass curves to a shader, and describe any properties you want.
We made an example on how to use a curve to describe the path of a
particle using a particle shader.
Number 6: Particle systems can spawn
in local and global coordinates
Particle systems give you a choice to spawn
the particles in global or local space.
This changes whether the particles move
with the particle system or independently.
It can look really cool to
spawn them in global space.
But be aware, global space particles
are no longer effected by the scale of their particle system node.
However, the particle velocity and other properties are effected for whatever reason.
Number 7: How to use viewports.
You can imagine a viewport as
an extra canvas to draw on.
They can be helpful for shader
effects and splitscreen.
Everything within a viewport
is drawn on that extra canvas.
It can be accessed as a texture,
for example by a sprite, a texture rect or as the parameter of a shader.
If you want to make splitscreen add a camera to the viewport and set the world of the new
camera to the world of you main camera.
Number 8: You can save default import
options (10 things user suggested)
Often when you import resources to you
game, you want similar parameters.
In a pixel game, filter usually is turned off.
There is this hidden little option menu, that allows you to set presets.
This is Vini told us about this feature, thanks!
Number 9: There are very helpful builtin constants.
Using them makes your code more readable and performant.
For vectors there is Vector.ZERO and Vector.RIGHT for example.
For transformations, Matrix.IDENTITY and Transform.IDENTITY are your
friends. Also, PI is defined.
For colors there is a wide array, but the ones
we use most frequently are Color.Transparent, Color.white and Color.black. These are especially
helpful when fading out objects using tweens.
Number 10: The ways to stop nodes.
There are different ways to deactivate a node.
You can set_process(false) to disable the
process loop, but the node will stay visible.
If you call hide or set visible to
false, it will keep on acting invisibly.
Also, you can remove it from the scene tree.
That will pause and hide the node until it is readded.
Finally, if you call queue_free, its gone.
In case you want to pause the whole
game use get_tree().paused = true.
You can allow specific nodes to keep working
by setting their pause mode to process.
Keep in mind that even in a paused game,
the time variable for shaders still increases, this can be change by setting
VisualServer.set_shader_time_scale(0).
Number 11: How to use toolscripts.
Tools script are witchcraft. You can write “tool” in any script to make it run in the editor.
When the script changes nodes, the changes will happen in your project.
This can break some stuff, so be careful.
However, if you are brave they can be
your best friend. Here is an example where we sample points from a Path2D into
a Line2D to draw the path in the game.
So, there is one more thing we want you to know.
We make devlogs, where we explain how we make our bouncy 2d action roguelite Furcifer’s Fungeon.
We also make silly jokes, so go check it out.
Also check out the first 10
things if you haven’t yet!
Subscribe if you like this,
and thanks for watching!
Super cool work! I love the engine and already know most of the tricks that you outlined. Super nice that you enhance the Godot community with some helpful videos! Keep it up!
Critique: The audio on this video is not understandable. The audio quality sounds degraded, muddy and a ringing and echo is present. The presenters in the video speak way too fast and stumble over pronunciation. It's ok to not be a native English speaker. That isn't the problem. But please take some time and practice speaking lines more. The male voice is superior to the female's presentation but still not understandable. I had to turn on subtitles to understand the presenters.
Recommendations: The dialogue is recorded or changed to stereo. It should be forcing mono if possible for vocal presentations like this. The gain also clips over max DB in multiple spots. If using 2 or voice actors then normalize the audio between the two actors and keep the DB under -1. It's pretty close here but the female voice is markedly lower than the male. Get a better microphone and recording environment. It doesn't have to be a lavish setup. Get into a closet filled with clothes and a blue yetti microphone (or better) will make the audio produced much better. Make sure you are recording vocals in mono in whatever software is being used. Check your EQ graph and make sure the vocals you recorded do not clip into the red zone.
This post appears to be a direct link to a video.
As a reminder, please note that posting footage of a game in a standalone thread to request feedback or show off your work is against the rules of /r/gamedev. That content would be more appropriate as a comment in the next Screenshot Saturday (or a more fitting weekly thread), where you'll have the opportunity to share 2-way feedback with others.
/r/gamedev puts an emphasis on knowledge sharing. If you want to make a standalone post about your game, make sure it's informative and geared specifically towards other developers.
Please check out the following resources for more information:
Weekly Threads 101: Making Good Use of /r/gamedev
Posting about your projects on /r/gamedev (Guide)
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.