Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

What are you going to try to figure out, if anything specific?

A topic by droqen created Aug 29, 2021 Views: 1,546 Replies: 21
Viewing posts 1 to 14
(+10)

Hi I've been using Godot for a couple years, I'm going to share a couple things that I thought were really exciting/useful about Godot when I was starting out:

1. If you like text-only tutorials, it's probably not hard for you to find this one, but I really loved the official 'Your first game' tutorial in the Godot docs. Is it even worth linking??? Sure. It's really good. https://docs.godotengine.org/en/stable/getting_started/step_by_step/your_first_g...

2. SHADER CODE! I never understood shader code in Unity because it seemed like there was just absolutely no error reporting (they would just break and do nothing), and possibly other engines have better shader code error reporting (?), but writing shaders in Godot is great because they... like... actually tell you what's gone wrong, just like with real code! I love it.

Just make like, one sprite, and try some shader magic out on it! I'm not a real vfx magician so I haven't messed around with it beyond just kinda getting to know the turf, but hey, it's pretty good. (Probably look up a tutorial for this one. Shaders are very powerful.)

~

Actually, I'll probably mess around with shaders a bit while this jam is going on, that seems like something worth dipping my toes back into. Anyway, if you're thinking of doing/learning anything in particular, have suggestions or resources for me/others, gogogo. An empty forum is a sad forum! That's why I made this thread!

(1 edit) (+5)

For those who are interested in Godot Shaders, some things to know.

1. Godot uses a custom Godot Shader Language which attempts to simplify the task of writing shaders as much as it can. There is both a text format and a visual nodes-and-wires format. For more information on writing Shaders in Godot, please see the updated Shader documentation which covers a plethora of topics: what a shader is, how they work in Godot, the assets they manifest as, how you use them in a project, as well as various examples of walking you through writing them.

2. There are many good resources for finding Godot Shaders online.

  1. The official `godot-demos` GitHub repository which has a 2D section that includes example sprite shaders and screen-space shaders. All links here are pointing to the 3.2 branch which, at the time of writing, is the latest "stable" branch copy of this repo (is likely similarly compatible with later 3.x releases).
  2. The GDQuest `godot-shaders` GitHub repository for its "Godot Shader Secrets" course (all source code is under the MIT license).
  3. The `https://godotshaders.com` website contains many uploaded examples of Godot Shaders from the community (and works even for people who have no understanding of git source control).
  4. The official Godot Asset Library (section: Shaders) website similarly has many uploaded examples of Godot Shaders from the community. These are directly downloadable straight from the Godot Editor's `AssetLib` tab on the main toolbar.

Source/Full Disclosure: I've been a (minor) Godot contributor since 2017 and have seen the growth of various resources over time.

Submitted (1 edit) (+2)

I have made a couple games in godot for game jams but something I've always avoided is the UI Library/Control nodes. So I'll be making sure my submission for this jam has really good menus 馃憤

(+1)

I love Godot's UI stuff personally (like, tech-wise. i am an avid UI-hater generally.) so... good luck / enjoy during the jam!

(9 edits) (+1)

In my experience Godot's UI system can be both extremely powerful but at times also extremely frustrating--especially when starting out. The primary reasons for the frustrating part are:

  • The system relies on multiple concepts working together & it's not always obvious (conceptually) how they impact each other.
  • The UI doesn't always provide an intuitive way to configure the various aspects. (e.g. flags that are mutually exclusive in effect but can still be enabled at the same time in the UI.)
  • Some UI controls (especially less commonly used ones) can be quite buggy.

Suggested starting UI Node layout

My recommendation for a starting point is to create your UI with the following node setup:

  • `MarginContainer` (Use the "Layout" button on the toolbar below the scene tabs to select "Full Rect". Set the margin sizes with the properties under the "Custom Constants" section *not* the, err, "Margin" section. Leave the "Size Flags" for both "Horizontal" & "Vertical" on "Fill".)
    • `VBoxContainer` (Leave the "Size Flags" for both "Horizontal" & "Vertical" on "Fill".)
      • `VBoxContainer` (Leave the "Size Flags" for both "Horizontal" & "Vertical" on "Fill". Have one of these per "vertical sub-section" (i.e. a subsection that spans the entire width of the screen) of UI, so you might want to have a "header" & "footer", so you'll want two `VBoxContainer` nodes at this level.)
        • `HBoxContainer` is probably what you want at this level which allows you to place controls next to each other horizontally.
          • Your `Button`s, `Label`s, `LineEdit`s etc controls go at this level.
        • (Maybe) `HBoxContainer` etc.
      • `VBoxContainer` (This would be for the "footer" part of the UI.)
        • `HBoxContainer` etc etc
      • (etc)

Let's say you then wanted the "footer" section to really stretch all the way from the "natural height" (my term) of the components, all the way to the bottom of the window, in this case you would change the "Size Flags" as follows:

  • "Size Flag" > "Vertical"
    • (Keep enabled) "Fill"
    • (Newly enable) "Expand" (this "theoretically" stretches the area of the "footer" `VBoxContainer` to the bottom of the screen *but* this is only visible if "Fill" flag is *also* enabled. But read on...)

But what you *probably*/may want is for the UI controls in the footer to *also* be at the bottom of the screen--not just the enclosing container. In which case, you want:

  • "Size Flag" > "Vertical"
    • (Newly disabled) "Fill"
    • (Newly enable) "Expand"
    • (Newly enable) "Shrink End" (Or "Shrink Center" if you want it vertically centered.)

So, essentially, "Fill" on its own sort of means "Shrink Beginning".

But, it's essential to realise that "Expand" can only expand if its parent container (in this case the `VBoxContainer` immediate under the `MarginContainer`) has extra space for the child to expand into--so that means e.g. "Fill" is also set on it and its parent also has space to expand into (which the `MarginContainer` does because we forced its anchors to be at the four extreme corners of the screen.

Yeah, it gets confusing and text isn't the greatest way to communicate these nuances. :) (And I may not have this 100%. :D )

My recommendation for getting an understanding of this would be to start with just the `MarginContainer` and its child `VBoxContainer` and play with the "Size Flags" one at a time to try to understand what effect each one has.

Other UI Control aspects to consider

The "Stretch Ratio" enables you to have split an area into a different ratio for e.g. two controls. By default when "Expand" is enabled two controls will split the area available in two (i.e. half each a.k.a 50% each a.k.a. a ratio of 1:1) and three controls will split into thirds etc. But if you want one control to be "greedy" then set its "Stretch Ratio" to say, 3 or 4 or 10 to force the other control(s) to take up less room.

Most Containers manage their size in such a way that you don't have to think about it too much. But in certain situations, with certain Containers, you might find that a particular Container gets "squashed" and its child controls become invisible. In this case you may need to provide a value for "Min Size" in the "Rect" section.

Grid-like Containers

In my experience, if you want a "grid" of UI controls, at first it is best to:

  • Avoid the `GridContainer` control.
  • Avoid the `ItemList` control.
  • Avoid the `Tree` control.
  • And, if you must, try something like a `VBoxContainer` containing `HBoxContainer`s.

Yeah, it's not very satisfactory... :/

So, if you must, still skip `GridContainer` & `ItemList` and go directly to `Tree` control but if you want to use keyboard for movement, be aware it is very very very broken! (Which brings with it major accessibility issues.)

Thus I recommend looking at the code in this related Godot Tree control issue comment and consider adapting the workaround for your own code and/or read the overview of issues discussed in the issue.

Conclusion

Despite the frustration I've experienced with Godot's UI controls/containers along the way, I do think Godot's UI system is powerful vs (theoretical) effort required and has the potential to be a very compelling part of Godot--but one which currently has a lot of unnecessary confusion occurring while learning it due to UI/UX, bug & documentation issues.

I recommend you stick with `MarginContainer`, `VBoxContainer` & `HBoxContainer`, the standard UI controls like `Button` & `Label` and take a bit of time to understand the effect of the different "Size Flags" (and you generally want to set them for the parent container first & work down the node tree) and you'll hopefully get it working enough for your purpose of a 2-day jam game. :)

Hope this helps you on your journey!

Submitted(+2)

This jam I want to try to figure out multiplayer, I didn't figure it out in time for the last one in which I had 90 days. GDQuest's nakama tutorial looked the most promising, but I got stuck on setting up Docker on Windows, hoping for better luck this time!

Submitted(+3)

For more text-only tutorials, KidsCanCode has a lot of "how to do X in Godot", they're short and to the point: https://kidscancode.org/godot_recipes/

(1 edit) (+2)

I'm going to try and figure out high-level multiplayer. I'd really like to tackle low-level networking, since I absolutely love writing servers and protocols, but I think it'll take way more than a weekend to complete something like that XD

Going to work off of the official docs and see where it leads me: https://docs.godotengine.org/en/stable/tutorials/networking/high_level_multiplay...

As a secondary objective, I want to see if I can compile to an HTML5 target: https://docs.godotengine.org/en/stable/getting_started/step_by_step/exporting.ht...

Hopefully you saw @willnationdev's helpful comment below about the specific considerations around the combo of networking+HTML5 you've mentioned: https://itch.io/post/4455023

(+1)

Yes, and thank you for highlighting the post!

I've done some cursory research into using Python Flask + SocketIO to build a simple server if I get that far.

(+2)

I鈥檝e been using Godot for long, but never for 3D, so as weird as it might seem, I have almost 0 experience with 3D programming. That鈥檚 probably what I鈥檒l focus on

Submitted

Woah I guess I'll steal that Idea as well. I never used the 3D workstation in Godot nor have I made anything in 3D, so it'll be a challenge.

Submitted

I'm on that train also, I've been playing with Godot since 2.6 but never did anything 3D, that'll be my focus in this jam. Good luck! 

(+1)

A couple of hopefully helpful tips based on my relatively limited Godot 3D (& non-3D modeller) experience:

  • CSG ("Constructive Solid Geometry") nodes (which enable you to create complex shapes by combining simple shapes together with boolean operations) can be a great way to start prototyping 3D games/levels but be aware that there are some trade-offs involved in terms of the "quality" of the resulting mesh. This is primarily a factor when you want to start applying textures & you may encounter issues with UV coordinates/normals etc.
    There's a CSG intro tutorial here: https://docs.godotengine.org/en/3.3/tutorials/3d/csg_tools.html
    You may wish to read-up on some of the potential issues (e.g. here: https://github.com/godotengine/godot/search?q=csg+uv&type=issues) before committing to CSG in case your plans might be impacted...
  • In part I started prototyping with CSG because I wasn't aware that there was another option for easily creating simple a.k.a. "primitive" (e.g. cube-based) level geometry in Godot (an option which also has the benefit of seemingly having fewer issues with mesh quality/UVs etc).
    The prototyping option I now turn to first, is to add a MeshInstance node to the 3D scene and then click on the `Mesh` property which enables you to choose to instance one of a number of simple/primitive meshes, e.g. cube, capsule, cylinder, etc.

Hopefully that helps some people avoid running into the same issues I did. :)

Bonus tip: If you're looking for some basic prototype textures to apply to your prototype geometry the famous "Kenney" has some freely downloadable CC0 (public domain) textures available here: https://kenney.nl/assets/prototype-textures. (And also directly through the Godot Asset Library on the web or in the editor: https://godotengine.org/asset-library/asset/781.) (And, someone who, just quietly ;) has also recently started using Godot for some of his projects. :D )

Submitted(+2)

I've been working on a 3d horror game over the summer so I've got some experience with the basics of 3d AI and character controls, but so far haven't had to do any real animation and such. I'm gonna be making a 2d arcade game with a focus on varieties of animations, creating a simple inventory, and spawning in child instances like bullets 

Submitted

wow, there are so many ideas,.., i was considering getting a feel for 3d stuff, but shaders and multiplayer also seem like important things to do! so much i don't know yet

Submitted

Maybe networking. I already used networking before, but never really dived deep into it. Or I will finally look into 2d lighting, never used that.

(1 edit) (+2)

Some helpful tips for anyone planning to learn multiplayer in Godot (things that were confusing to me in the beginning as I was learning):

1. There is a Note in the docs with the following statement that is *very* important for those trying to make multiplayer web games: "Most notably, the HTML5 platform currently only offers WebSocket support and lacks some of the higher level features as well as raw access to low-level protocols like TCP and UDP." So, when setting up networked gameplay, do not use NetworkedMultiplayerENet or WebRTCMultiplayer. You must use WebSocketMultiplayerServer/Client/Peer.

2. The high-level multiplayer API ultimately has two kinds of communication. Communication between game instances (effectively from one SceneTree instance to another SceneTree instance - see `MultiplayerAPI.send_bytes`) and communication between nodes executed via `rpc()`/`rpc_id()` calls that target methods to which you have applied the network keywords (`client`, `server`, `sync`, etc.). In the latter case, it's important to note that methods are executed by following the identical absolute NodePath of the executing node. So if /root/A/B calls method `foo()` using RPC, then the remote game instances will also look for a Node at /root/A/B and attempt to call `foo()` on that Node too (to replicate the behavior). So if you want operations to be replicated over the network, then the Node trees have to match. You can't simply target a Node by its reference or its ObjectID because those values are the Node's actual memory address in the computer which will be different between different devices. If you need to relay remote instructions between node trees that are similar, but differently organized, then you'll need to delegate that task either through a Node that *is* shared between the game instances or delegate it to the SceneTree itself (via calling `send_bytes` on one and connecting to the signal that receives those bytes on the other game instance).

Pretty much everything can be learned very readily in the docs/demos and online tutorials, etc. but I just wanted to bring people's attention to this stuff since it can be easy to gloss over it when learning so much new information.

(1 edit)

Re: Your 1st point. Why do you say to not use WebRTC for web games? The official docs suggest the opposite (link):

WebRTC is implemented in Godot via two main classes WebRTCPeerConnection and WebRTCDataChannel, plus the multiplayer API implementation WebRTCMultiplayer. (...) These classes are available automatically in HTML5, but require an external GDNative plugin on native (non-HTML5) platforms.

Oh, that may be the case. Would need to test it. When I made my attempt to do web game stuff, only the ENet and WebSocket stuff existed, and of those two, only WebSocket multiplayer worked with HTML5 builds. WebRTC came on later. I checked back with the docs to see if there was any change, but that quoted line I provided also came from the docs in the high-level multiplayer page, so I thought it was still the case. If the WebRTC docs specify otherwise, then the docs may just need updating to avoid conflicting reports then.

I honestly just wanna get something done. 

I've written concepts, tests simple mechanics, but never a game. I'm starting with a 2d shmup, gonna grab some data from Gradius and try to understand how many enemies / weapons and etc I should aim for. 

GAH, I just realized I should absolutely spend my time playing with Godot's Animation system. Maybe I'll try making a slightly more complicated platformer player character than just a single simply animated sprite...