- 16
- 137 518
Jacob Foxe
United States
Приєднався 15 лют 2017
Game Developer with a passion for teaching! Let's learn some Godot!
Site: verdancyvale.net
Check out the Kickstarter: www.kickstarter.com/projects/silentfoxegames/verdancy-vale
Site: verdancyvale.net
Check out the Kickstarter: www.kickstarter.com/projects/silentfoxegames/verdancy-vale
Coding Style Guide || Godot 4+ Tutorial || GDScript 2.0
Let's learn the RIGHT way to format all of your functions, variables, and constants in Godot! I've ignored these resources for waaaaay too long, and as I'm working on reformatting my old code, I thought I'd share some tips!
Project Repo: github.com/jacobfoxe/Godot-4-Style-Guide
|| Video Links ||
Enums: ua-cam.com/video/W98qXD35kXY/v-deo.html
Tool Scripts: ua-cam.com/video/TVM3YFewiB8/v-deo.html
SetGets: ua-cam.com/video/13FVolC70bY/v-deo.html
|| Resources ||
Style Guide: docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_styleguide.html
TODO Manager: godotengine.org/asset-library/asset/1327
Use Typed Instructions: godotengine.org/article/gdscript-progress-report-typed-instructions/
|| Timestamps ||
00:00 Code Better!
01:10 Block Comments
01:38 Annotations
02:02 Class and Node
03:21 Signals
03:35 The 6 Case Types
04:52 Documentation Comments
05:30 Constants
05:49 Static Typing
06:41 Numbers
07:35 Enums
09:23 Appending Commas
10:01 Exported Variables
10:37 Onready and Prepending Underscores
11:43 Node References
12:27 SetGets
13:21 Public Functions and ready()
14:01 Functions, Parameters, and Logic
15:59 Overridden Functions
16:22 Private Functions
17:00 Other Good Practices
17:49 Demo
|| Social Links ||
Bluesky: bsky.app/profile/jacobfoxe.bsky.social
Twitch: twitch.tv/thatfoxe
Verdancy Vale: verdancyvale.net
Music is probably from GameChops or some game from my childhood!
#godot #godotengine #verdancyvale
Project Repo: github.com/jacobfoxe/Godot-4-Style-Guide
|| Video Links ||
Enums: ua-cam.com/video/W98qXD35kXY/v-deo.html
Tool Scripts: ua-cam.com/video/TVM3YFewiB8/v-deo.html
SetGets: ua-cam.com/video/13FVolC70bY/v-deo.html
|| Resources ||
Style Guide: docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_styleguide.html
TODO Manager: godotengine.org/asset-library/asset/1327
Use Typed Instructions: godotengine.org/article/gdscript-progress-report-typed-instructions/
|| Timestamps ||
00:00 Code Better!
01:10 Block Comments
01:38 Annotations
02:02 Class and Node
03:21 Signals
03:35 The 6 Case Types
04:52 Documentation Comments
05:30 Constants
05:49 Static Typing
06:41 Numbers
07:35 Enums
09:23 Appending Commas
10:01 Exported Variables
10:37 Onready and Prepending Underscores
11:43 Node References
12:27 SetGets
13:21 Public Functions and ready()
14:01 Functions, Parameters, and Logic
15:59 Overridden Functions
16:22 Private Functions
17:00 Other Good Practices
17:49 Demo
|| Social Links ||
Bluesky: bsky.app/profile/jacobfoxe.bsky.social
Twitch: twitch.tv/thatfoxe
Verdancy Vale: verdancyvale.net
Music is probably from GameChops or some game from my childhood!
#godot #godotengine #verdancyvale
Переглядів: 658
Відео
DON'T Make these Gamedev Mistakes!
Переглядів 3232 місяці тому
A rambling, candid look at my gamedev journey over the past few years! I've made a lot of mistakes, and I wanted to take some time to share my experiences with you all! Waaaaay longer than I expected it to be, but hopefully there's something helpful in here! Timestamps: 00:00 Introduction 03:28 Interlude 03:54 Background 05:36 Over-Estimation 11:24 Scope Creep (the ADHD of the equation) 14:48 U...
Using 3D Assets in Godot 4 || Godot Tutorial || FREE 3D Assets!
Переглядів 1,2 тис.7 місяців тому
Let's learn how to use basic 3D assets in 3D scenes in Godot 4! This tutorial uses .glb files, but .gltfs and .blends work great as well! Join the J&F Discord Server: discord.gg/HtmgTCRfXe Jackal and Foxe Asset Shop: jackalandfoxe.com/shop/ J&F Patreon: www.patreon.com/user?u=117664151 J&F Twitter: JackalandFoxe Verdancy Vale Kickstarter: www.kickstarter.com/projects/silentfoxegames...
Learn how to structure scenes! || Composition Demo || Godot 4 Tutorial
Переглядів 13 тис.11 місяців тому
Big ol' composition tutorial! Here's the code for Mail Quest: github.com/jacobfoxe/Composition-Demo-Godot-4 Part 1: ua-cam.com/video/PYHgvXqOSo4/v-deo.htmlsi=VmZ2105wBd77ZANB Verdancy Vale Kickstarter: www.kickstarter.com/projects/silentfoxegames/verdancy-vale ~Links~ Twitter: ThatFoxe Twitch: twitch.tv/thatfoxe Website: verdancyvale.net ~Timestamps~ 00:00 Introduction 01:12 Inherit...
Understanding Composition! Revolutionize your games! || Godot Tutorial
Переглядів 11 тис.11 місяців тому
Let's learn about Composition in a Godot-focused context! Stay tuned for an in-depth Godot 4.X tutorial! Part 2: ua-cam.com/video/JJid46XzW8A/v-deo.html Verdancy Vale Kickstarter: www.kickstarter.com/projects/silentfoxegames/verdancy-vale ~Links~ Twitter: ThatFoxe Twitch: twitch.tv/thatfoxe My Game: verdancyvale.net ~Timestamps~ 00:00 Composition Intro 00:14 What is Composition 00:3...
New Export Syntax in Godot 4! || Godot Tutorial
Переглядів 19 тис.2 роки тому
Exporting is different in Godot 4, so let's learn some of the new syntax and just about everything you can export to use in the editor! Project: github.com/jacobfoxe/ExportingInGodot4_Demo ~Verdancy Vale~ Check out Verdancy Vale: verdancyvale.net Newsletter: verdancyvale.net/newsletter Verdancy Vale Kickstarter: www.kickstarter.com/projects/silentfoxegames/verdancy-vale ~Links~ Twitter: twitter...
The BEST Godot 4.0 Feature Just Released!
Переглядів 2,7 тис.2 роки тому
Godot 4.0 Beta2 just released, and with it come some long-awaited features! Check Out: verdancyvale.net D&D With Friends: ua-cam.com/channels/R7scZMMQf6hCzK68mK9Qeg.html Verdancy Vale Kickstarter: www.kickstarter.com/projects/silentfoxegames/verdancy-vale ~Social Links~ Twitter: ThatFoxe Twitch: twitch.tv/thatfoxe Watch me play D&D: ua-cam.com/channels/R7s.html... All music is from ...
Setgets - Custom Variable Handling! | Godot Tutorial
Переглядів 4 тис.2 роки тому
Shoutout to @ico-theredstonesurgeon4380 for pointing this out! Cheers, my friend! In this video, I address a mistake I made in a previous video! If you want to be able to call your setgets from within the script/scene that they are defined in, use the "self" keyword before calling your variable! Check out Verdancy Vale: verdancyvale.net Verdancy Vale Kickstarter: www.kickstarter.com/projects/si...
Editing the Editor! || Godot Tutorial
Переглядів 21 тис.2 роки тому
In this video, I discuss how to use Editor Plugins to manipulate the Godot Editor in your favor! I also create a simple example plugin with some buttons! Tool Scripting: ua-cam.com/video/Mmo18vNBZsw/v-deo.html Verdancy Vale Kickstarter: www.kickstarter.com/projects/silentfoxegames/verdancy-vale ~Links~ Twitter: ThatFoxe Twitch: twitch.tv/thatfoxe ~Timestamps~ 00:00 Introduction 00:1...
Tool Scripts || Godot Tutorial
Переглядів 9 тис.2 роки тому
In this video, I go through the process of writing tool scripts in Godot, and talk about certain pitfalls that you may come across! Verdancy Vale Kickstarter: www.kickstarter.com/projects/silentfoxegames/verdancy-vale ~Links~ Twitter: ThatFoxe Twitch: twitch.tv/thatfoxe Watch me play D&D: ua-cam.com/channels/R7s.html... All music is from GameChops!: ua-cam.com/users/gamechops #godot...
Use Your Items! || Godot Tutorial
Переглядів 6 тис.2 роки тому
In this video, I go over how I typically use items via a GUI or inventory screen! I also discuss calling parent functions! Verdancy Vale Kickstarter: www.kickstarter.com/projects/silentfoxegames/verdancy-vale ~Links~ Twitter: ThatFoxe Twitch: twitch.tv/thatfoxe Watch me play D&D: ua-cam.com/channels/R7scZMMQf6hCzK68mK9Qeg.html All music is from GameChops!: ua-cam.com/users/gamechops...
You should use Enums! || Godot Tutorial
Переглядів 15 тис.2 роки тому
In this video, I show some great uses for Enums in Godot! Verdancy Vale Kickstarter: www.kickstarter.com/projects/silentfoxegames/verdancy-vale ~Links~ Twitter: ThatFoxe Twitch: twitch.tv/thatfoxe ~Timestamps~ 00:00 Use Enums! 00:32 Enum Overview 02:05 Global Singleton 05:05 Weapon Class 08:40 Inspector View 11:20 Dealing Damage 11:50 Bitfields and Bitwise Operations 17:37 Damage Am...
Convert Resources to CSVs! || Godot Tutorial
Переглядів 4,4 тис.2 роки тому
As a part 2 to the RPG Items video, I go over how you can convert data within Resources into CSVs to be easily parsed! RPG Items: ua-cam.com/video/nR0nCFJ8-qM/v-deo.html Verdancy Vale Kickstarter: www.kickstarter.com/projects/silentfoxegames/verdancy-vale ~Links~ Twitter: ThatFoxe Twitch: twitch.tv/thatfoxe Watch me play D&D: ua-cam.com/channels/R7s.html... All music is from GameCho...
I really like your content. Can you do a video on architecture? Specifically focusing on best practices with encapsulation etc.
Thanks, I appreciate the kind words! I have done a couple architecture tutorials in the past, and though they're about composition, I think they're definitely worth a watch! ua-cam.com/video/PYHgvXqOSo4/v-deo.html
there is no right way, just opinions on what the right way is, do it what ever way you like if the code is for your own eyes only, for group work, decide on a consistent naming scheme to minimize confusion.
I like to use func SBUAPC(A:int)->void:#ShortButUnreadableAbbreviationPascalCase that way I can have ASDFG(SBUAPC(4),QWERT(3),ZXCV(2),POIUY(1),LKJHG(0),) but then I am the sort of person that believes if it's code that compiles, then it's good code.
Good one. 👌
Thanks!
Finally, a new video 😊
My friend and I dabble in game dev. I found Azure Devops only limits your repo to the count of contributors. Maybe the size limit is there but it's bigger than GitHub. We have a few 3D assets in a repo and art chewing up space and still no issues using it FREE!
OOP: "Bad cuz code duplication" @2:49 : (in reference to composition) "... copying them and duplicating them as necessary"... lol
thank you very much. i used this setup to see a ReferenceImage dock so i don't have to open the image in another program to set the mood for the current part of the game project
Great Video! Music a bit lower please tho
in 14:15 how do you tranform the line 3 to godot 4 I have like @export var MY_ITEM: Resource all goods but I don't really know how to put the setget _setItem
Hi Jacob .. Just got through this whole vid (had to do 1.5x speed ;P) and really enjoyed your candidness and putting yourself out there. It seems to me you're on a solid track to being highly successful, if you manage to keep to your Change list ;) .. Oh and huge congratz on the baby that's on the way! .. I've coded at an amateur level for years, mostly making generative art (let me know if you're interested in seeing that) and now I'm busy creating a mobile game inspired by the classic Arkanoid. Your advice in this video was spot-on for various things I was thinking about doing, so thank you. I found you because I realised I should probably be using enums lol, so learning about them atm. I started with this game as a way to learn Godot/GDscript, but it has fast beome something much more than a simple arkanoid clone that I'm becoming proud of. Let me know if you'd like to give it a test-play - I've got internal testing set up on the play store and would just need to add your email =) .. Thanks again, have subscribed! Looking forward to more videos
nice vide. Just variable names convention is snake_case.
Thank you, Jacob, I really needed to hear this. I believe our paths and goals are quite similar, with the difference that I am in the beginning, and I am yet to commit those mistakes. Even knowing they will come, I just know I will fall for them haha. Learning from mistakes, I suppose. Thank you for the help, Jacob, I hope your game succeeds.
Glad to hear it! It's a tough road to walk, but best of luck! It's all attainable, no matter how long the road might be!
Perforce is my favorite version control for games, but you *definitely* don't need an AWS container for your depot lol. That stuff racks up quick; I accidentally burned through $100 of Azure credit in a couple weeks because I left a test resource running lmao. Good luck on the game!
Oh yeah, 100%! I do love Perforce, but those cloud services are too tempting!
I'm also a godot game dev finishing a similiar cycle, haven't publish any content but i will soon finish my prototype of a 3d endless runner.
Your hair flipped!
Haha yeah, beware flipping hair!
@@jacobfoxegreat video btw! SV is always the dream, but even that had a following before launch. For beginners I’d recommend using assets from Kenney/humble bundle for quicker iteration and to get something playable, final arts can wait for release ;) Good luck with your game! And thanks for sharing so much knowledge
millions of dollars
Hey man, love the vid but i got a problem with the Velocity module, im using the latest version of godot, I get the error : " Cannot call non-static function "is_on_floor()" on the class "CharacterBody2D" directly. Make an instance instead. " Any idea on how to fix it? Thx for the vid btw
Hey, thanks for the comment! This tutorial was done in 4.2, so maybe something broke with 4.3? Can't recall off the top of my head what my syntax was, but I'd guess instantiate() the CharacterBody2D and then use is_on_floor() on the var that was instanced. Lmk if that's a non-start also!
@@jacobfoxe Yo! Wasnt expecting an answer really. Somewhat fixed the issue? Now the error is "Cannot call method "is_on_floor" on a null value" on the handleVelocity, i also get a error on the player script with velocityNode.handleVelocity(delta). This is my first time looking at composition and its kinda hard lol
question abt naming: u name a few funcs differently, e. g. checkMailInput() and deliver_mail(), same with vars: mailBag, mail_target, etc. Is there any reason / tie to ur architecture logic why switch between these naming conventions? edit: another question, u mentioned that module containers can be modules too, how would u enforce that? just add an export group in that module container for the required modules?
Just a mix of habits accrued over years in different industries and languages, honestly! I've been trying to standardize my coding style for future tutorials, but I'm a work in progress! Here's the Godot Style link in case anyone's curious: docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_styleguide.html Per the module containers, yeah, that'd be one way to do it! At least, it'd be a good way of keeping track of which nodes are where.
2 years latet and this is still very helpful. Even with outdated syntax ( exports) and stuff, its a great video showcasing the fundemental parts of making an item system in godot. Videos like this are hard to find now because everyone just wants to show off their way to make inventories, instead of just showing people fundementals of items. So thank you even now for this fantastic video!
Thanks! I really appreciate it! I'd love to do a Godot 4+ remake of this tutorial, so maybe sometime soon!
This also just makes sense in the real world. A platypus deviates from the standard "mammal" and may not inherit everything most other mammals have.
Hey fr🐔nds
Amazing lesson. Subscribed hoping that you'll release the next part!
personally, i'd set the individual node export var to automatically choose the parent characterbody IF the variable is null. Otherwise, I do like the idea of being able to set up the parent node manually, i usually just set it to get_parent().get_parent() lmao
Honestly, I do really like this method, as well! It's waaaay easier/cleaner (sometimes) to have children "register themselves" with their parents. I do like what I did in the video because it yells at me if I try to run the project without things set up, but it's a LOT of clicking for sure.
"Composition over Inheritance" en.wikipedia.org/wiki/Composition_over_inheritance python-patterns.guide/gang-of-four/composition-over-inheritance/
Great video. I am trying to learn how to code games with no prior coding knowledge or experience. This video was way over my head, but still enjoyed it. Nice job!
Your manner of speaking while you explain things feels insulting since I am not a child (and I'd probably still be miffed even then), but this is still a good tutorial. I've been trying to find a tutorial that was more than "here's my composition nodes. Look, I can put this health component on this NPC _and_ this player. WoOooOOo~." without ever actually explaining how it works. Most of it was pretty obvious, but the part that had always escaped me before was connecting things once you added them. My OOP addled brain would always try to connect them in the parent class making the system _mostly_ redundant. At least then the change wouldn't necessitate modifying everything that used that component if I decided to add or remove one from an entity. So I essentially had just adapted the modularization to OOP principles without actually taking full benefit of the composition's strengths. So you and Godotoneer's videos were the only ones that were helpful (but the latter is long and takes me a few days to actually watch through with how dry it is despite it being _very_ informative). So thank you for making this tutorial, and I'll _try_ sitting through more of your tuts in the future since it's quite clear that you know what you're doing unlike people who regurgitate the bare minimum and only specifically as it applies to their system.
Thanks for the feedback! I appreciate the perspective and I'm glad you found the tutorial helpful!
OOP is not equal to "inheritance". Composition is absolutely OOP as well. The better way to put it: use inheritance for "system" logic, and composition for "business" logic.
To someone new to programming they would have no clue what system or business logic was or why they were different.
@@Gatrehs being new to Godot and new to programming are 2 different notions. And it's not that hard to learn about system and business logic - as long as they are not banned from search engines, they do already know the terms to look for.
I suppose you mean use inheritance when you need something to be rigid and stable. While composition is when you need something to be malleable and easy to modify?
@@torque8047 system logic only provides basic primitives to interact with, well, the system (resources). And business logic includes what makes your product yours and different from others. This division is possible on many layers. What you ship as a final business solution (e.g. a UI library), your customers (e.g. web developers) will consider a system.
@@RaubeR666 How can i put it, Someone new to programming or anything in general doesn't know what it doesn't know. Business and System logic is a new concept for me and I just know that it exist because of your coment.
Oi, where's episode 3 mate? You're 4 months overdue.
Thank you, sir
You're very welcome!
For Godot 4: The syntax for exports is like this @export var my_item : Resource I had to change the item_sprite script quite a bit. Here it is. Mind you I don't use the same naming conventions as him so it won't directly port over but you should easily be able to see the pattern in what needs changed. extends TextureRect @export var my_item : Resource: set = _set_item @onready var my_label = $RichTextLabel func _ready(): if my_item: _set_item(my_item) # Initialize the item if it is set from the start func add_quantity(amount_added : int): my_item.add_quantity(amount_added) _update_label() # Ensure the label is updated func _set_item(new_item : Resource): print("setting item") my_item = new_item self.texture = my_item.get_texture() _update_label() # Update the label with the new item func _update_label(): if my_label and my_item: my_label.bbcode_text = str(my_item.get_quantity())
You are a life saver, thank you so much for sharing!
@@nuller52 do you have a discord? Also thanks. I forgot I made this comment.
@@visibletoallusersonyoutube5928 Same as youtube nickname
@@visibletoallusersonyoutube5928 yes, same as youtube nickname
@@nuller52 sent
Where's the third video???
Um... good luck with dealing with hundreds (thousands) of unique items/characters.
So are enums like each unieque item in minecraft, where there is number assigned to each of them?
For those getting this error: Invalid call. Nonexistent function 'instance' in base 'PackedScene'. Switch editorAddon.instance() to editorAddon.instantiate()
When I tried using "@export_node_path(Sprite2D)" I got an error message saying that Sprite2D "isn't a constant expression". Any suggestions?
How can I hide the script name at the top of the inspector. The scriptname category.
Interesting that you don't use any custom Resources. Have you considered how they may work with a compositional system like this? I have recently started using Resources and they seem quite powerful for compositional systems.
This was very helpful, thank you
this is easier than unity editor
Did anyone have a trouble with Y sort enabled when implementing workflow like he did?
Thank you for this video.
I loved this, recently i made a game in Godot for my college event & it turned out to be lil messy for my side cuz i didn't know how to organise the code, but glad that everyone like my game ☺️✨ Now learning from that, I'm trying to learn about coding patterns & management stuffs. Thus, so i found this channel & im glad i found it... Pls make more videos like this 💗💗💗 Love from India 🇮🇳
How did you approach the inventory singleton? I tried to make one and I created a dictionary to store all items and a function to load them when one is added but Im pretty sure there should be a better way to do it
enums could be very useful in custom resources
Do the flags tutorial for real! A question I have coming off this video, how would I check if a weapon has a specific damage type without looping through and bitshifting them? I know this is a google-able question but it would still be cool
damn the glowing border around the sub button ar 1:44 was awesome. first time i saw that. was that something u needed to code yourself or a new feature from yt?
haha that surprised me as well! Must be a YT feature because I definitely didn't do anything!
Yeah it’s a new UA-cam feature. I’ve been seeing it for a very long time on a bunch of channels
How can i move the play button of the editor to the middle?
Hey man, how do i make conditional export enum? Like if i choose between weapon or consumable the next option will appear: axe sword etc if i choose weapon or potion bomb etc if i choose consumable
you forgot to link the previous episode in the description