Тёмный
No video :(

Drag & drop in Godot part 2, comparing Control node and Node2D versions 

ExploreGameDev
Подписаться 1,8 тыс.
Просмотров 3,1 тыс.
50% 1

Опубликовано:

 

5 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 19   
@christopheswiderski2026
@christopheswiderski2026 2 года назад
For the algorithm :D
@SamKeenDev
@SamKeenDev 2 года назад
I'll take it , thanks :)
@teo2805
@teo2805 2 года назад
In love 😍
@ericjorgearnezinochea9679
@ericjorgearnezinochea9679 6 месяцев назад
Hi! Did you noted any difference performance wise?
@ExploreGameDev
@ExploreGameDev 6 месяцев назад
Good question, I didn't profile the performance in this case. There is so little going on in this little 2D example it would probably be difficult to spot a delta. It would expect the Node version would perform better as there is "less going on" vs 2D, but it really comes down to what makes sense for the design of your game. Node has limitations, but is simpler, 2D givens you more options. Hope this helps
@starfart69
@starfart69 9 месяцев назад
Hi! How would I go about making a drag and drop feature that is from a Canvaslayer (Control) to Tilemap (Node2d). The reason for this is I'm making a drag and drop feature where I can drag the letter tile from the Tile Panel (CanvasLayer) to the board, which is a Tilemap node.
@ExploreGameDev
@ExploreGameDev 9 месяцев назад
Hi, that's an interesting take. You might take a look at this Q&A over on ask.godotengine.org/68370/implement-drag-drop-node2d-from-control-node-space-vice-versa . looks like they've posted the code for the answer. Hope this helps.
@nouveu1
@nouveu1 2 года назад
Thanks for this video, I didn't have any idea how implement that drag'n'drop in case of Node2D so definitely will checkout your example :D I was scratching my head about when to use Control vs Node2D, there is not many resources about that matter. As I understand in general Node2D are meant for physics-heavily-influenced games and Controls are for menus and UI. So in case of drag'n'drop if you have fixed-slot-games like tic-tac-toe or solitaire Control can be used (rather as an exception than rule of thumb). And for blurry-slot-games like many RTS you have to took path of pain implementing it by hand. In the end I feel that even if Node2D allows to do more fancy stuff (animations, etc.) you will lack controls positioning capabilities... either way is bad, or maybe I misuse components.
@ExploreGameDev
@ExploreGameDev 2 года назад
Thanks, Yeah, could certainly build a game such as a card game or tic tac toe using either Controls or Node2D's. The node2D route gives you more flexibility, but a bit more code to write. If you have a game in mind you want to build, do a lot of up front design testing (you can even use hand drawn paper pieces) to mock the gameplay and watch for interactions which would be difficult with Controls. If you don't see any, go with Controls, otherwise might be best to develop a general purpose Node2D drag and drop component.
@ExploreGameDev
@ExploreGameDev 2 года назад
All the code is in github: github.com/exploregamedev/Godot-demos/tree/main/DragAndDrop-part_2. In researching there seemed to be many, many ways to implement drag and drop. I'm curious to see from others what they've used. Also, there is a part one to this video here: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-cNvzGKCkNXg.html
@KurttBlissZ
@KurttBlissZ 2 года назад
This is comming very handy to me. Working on drag and drop for gdscript kind of like a classic gamemaker drag and drop plugin. Hoping it can useful to me and my little brother at learning somme game dev without realizing it lol
@ExploreGameDev
@ExploreGameDev 2 года назад
@@KurttBlissZ great to hear that this looks helpful for what you’re trying to do. Let me know if you have any questions. Enjoy your game dev journey
@KurttBlissZ
@KurttBlissZ 2 года назад
@@ExploreGameDev Thanks I'll keep this in mind!
@KurttBlissZ
@KurttBlissZ 2 года назад
​@@ExploreGameDev Wonder how would I make this work as a plugin... Having some trouble... I want to be able to emulate the ability to drag and drop file paths into the script text editor but for code snippets with icons instead of file paths... If that makes sense.. I may get it eventually or just go a different route. Drag and drop just sounded nice.
@KurttBlissZ
@KurttBlissZ 2 года назад
Also note sure if it mattes what type of plugin it is but this is how I'm adding it... add_control_to_dock(DOCK_SLOT_RIGHT_UR, panel_instance)
Далее
Smooth Drag N Drop: Godot Guide
9:28
Просмотров 46 тыс.
MILLION JAMOASI 2024 4K
2:17:51
Просмотров 12 млн
ЭТО мне КУПИЛИ ПОДПИСЧИКИ 📦
22:33
Drag and Drop Inventory System | Godot Tutorial
23:44
Dragging Documents or Cards in Godot
6:44
Просмотров 3,9 тыс.
I recreated Balatro's effects in Godot
8:04
Просмотров 32 тыс.
Beginner's Guide to Textures & Meshes in Godot 4
13:30
a quick chessboard in godot 4
11:59
Просмотров 15 тыс.
Easy Drag and Drop System in Godot
2:38
Просмотров 29 тыс.
How To Create A 3D Endless Runner In Godot 4
17:35
Просмотров 12 тыс.
How to program in Godot - GDScript Tutorial
58:10
Просмотров 618 тыс.