Crash Course ~ How to Make a Resource Gathering Game in Godot 4!

Опубликовано: 23 Май 2023
на канале: Chris' Tutorials
31,396
898

Full tutorial series showing how to design and code resource harvesting mechanics for a 2d top down survival or RPG style game in the Godot 4 engine. In this series, we cover many topics including equipment, inventory, particle effects, pickup items, on hit or swing triggers, tilemapping, and Godot resource files. The project, scripts, and assets are all optionally available below but feel free to code along using whatever art packs you like.

Series Playlist ➣    • Resource Gathering RPG in Godot 4 Tut...  
Full Project with Scripts, Assets, and Art Pack ➣ https://ko-fi.com/s/e848d87222
Art Pack ➣ https://chris-tutorials.itch.io/gathe...
Tutorial Gdscript Download ➣ https://ko-fi.com/s/c02da64555

➣ Downloadable Assets, Video Courses, and Other Places to Follow Me
https://linktr.ee/ChrisTutorials
https://ko-fi.com/christutorials
https://chris-tutorials.itch.io/

00:00:00 - End Project
00:02:16 - What to Expect
00:02:35 - Art Pack
00:04:10 - Creating a Player
00:06:27 - Swing Down Animation
00:09:38 - Animate Tool with Swing Motion
00:16:36 - Idle Down Animation
00:18:13 - Walk Down Animation
00:20:21 - Collision Shape for Player
00:21:29 - Player Movement
00:23:32 - Input Actions and 4 Directional Movement
00:26:59 - Making a Game Level Scene
00:28:19 - Follow Camera
00:29:57 - Physics Body for Rock Object
00:34:16 - Y Sorting Objects in Scene
00:34:58 - Idle Up, Left, Right and Sorting Tool Behind Player
00:39:57 - Walk Up, Left, Right
00:49:21 - Animation Tree & Animation State Machine
00:52:37 - Setting Animation Parameters in Code
00:57:22 - Debugging Active Scene with Remote View
00:58:04 - Adding Animations to Blend Space 2Ds
01:05:35 - Hitting Resource Node with Equipped Tool
01:09:54 - Equipable Items
01:17:05 - Equipped Item Setter to Update Sprite Texture
01:19:24 - @tool Annotation - Update Sprite in Editor with Code
01:20:38 - @tool Node Access Limitations
01:22:52 - Harvesting Tool
01:30:45 - Giving Types to Resource Nodes
01:34:27 - Checking Node Type for Tool Harvesting
01:41:22 - Pickup Object for Harvested Resources
01:57:02 - Pickup Item and Add to Inventory
02:06:05 - Making a UI HUD to Show Resources Count
02:15:00 - Connect Resource Display to Player's Inventory
02:21:16 - Show Resource Counter for Each Type Added to Inventory
02:26:28 - Making Wood Resource Type
02:29:13 - Grid Layout Side by Side Resource Listings
02:31:19 - Shrinking Resource UI Down
02:34:16 - Tilemap Collisions and Y-Sorting
02:38:57 - Collisions with Water Tiles
02:44:29 - Creating New Resource Node Types
02:46:09 - Setup Axe Tool to Harvest Trees on Contact
02:47:02 - Make Trees Harvested by Axe Type
02:48:08 - Tool Switch Hotbar
02:54:21 - Set Hotbar Icon with @tool Setter
02:56:04 - Connect Hotbar to Player by Group Tag
03:02:18 - Limit Code in @tool Script from Running in Editor
03:03:58 - Hotbar Positioning Offset
03:04:49 - Area2D Trigger Harvest Only During Swing Animation
03:05:19 - Set Animations to Discrete Mode - UpdateCache AnimationPlayer Fix
03:05:41 - Set Area2D Monitoring During Swing Animation
03:06:36 - Area Monitoring Off On Script Load & Limit Editor Code from Running
03:08:36 - Setting Monitoring On and Off in Other Animations
03:09:58 - Testing Harvest On Swing
03:10:26 - Particle Explosion on Resource Node Depletion
03:18:34 - Remove Particle System when Finished
03:19:35 - Instantiate Particle Effect on Trigger
03:25:35 - Summary So Far
03:26:12 - Animated Tiles
03:30:16 - Filling Tilemap with Details
03:30:52 - Desert Environment
03:37:22 - Hotbar Position Fix and Locking Nodes
03:38:15 - Y Sorting All World Objects
03:38:55 - Darklands Biome
03:40:22 - Dark Wood Resource Type
03:43:38 - Darkland Decor
03:44:13 - Project Wrapup - Resource Gathering RPG in Godot 4 Tutorial