SUPER EASY 2D DESTRUCTIBLE TERRAIN in Godot

  Рет қаралды 11,118

MrElipteach

MrElipteach

Күн бұрын

In this video I'm showing you how to create a 2D destructible terrain in Godot, just like in worms!
🎓 Learn how to make JUICY games 👇
www.udemy.com/course/learn-ho...
Itch page: mreliptik.itch.io/destructibl...
Sources: github.com/MrEliptik/godot_ex...
Destructible terrain: github.com/matterda/godot-des...
Godot geometry class: docs.godotengine.org/fr/stabl...
👤 SOCIALS
~~~~~~~~~~~~
💰 One time donation: ko-fi.com/mreliptik
💰 Support me on Patreon: / mreliptik
🟣 Join us on Discord: / discord
🔴 Twitch: / mreliptik
🐤 Twitter: / mreliptik
🎥 TikTok: / mreliptik
🖼️ Instagram: / mreliptik
🔗All links: bento.me/mreliptik
CHAPTERS
~~~~~~~~~~~~
00:00 - Intro
00:16 - Project setup
00:44 - Destruction code
03:22 - Going further
04:47 - Outro

Пікірлер: 24
@DerpyNinjaFrog
@DerpyNinjaFrog 11 ай бұрын
2:55 you can transform the polygon like this: "var offset_poly = Transform2D(0, poly.global_position) * poly.polygon" note: here offset_poly is the list of points not a Polygon2D, so later when you clip them pass in offset_poly not offset_poly.polygon
@alexnascimento2076
@alexnascimento2076 Жыл бұрын
Its was really helpful. Thank you
@mrdinoking6626
@mrdinoking6626 Жыл бұрын
Hey ! Loved the tutorial :) . I had a problem with the implementing of the terrain destruct though. Whenever i fire the missiles at a same spot for two three times , the destruction stops working and the engine gives me decompose_polygon_in_convex: Convex decomposition failed! error. And as such when i enable visible collision shapes , whole collision shape gets deleted after the third missile hitting the same spot. Could you highlight what the problem could be?
@monarxk
@monarxk 9 ай бұрын
Good video. It would be a lot more beginner friendly if you highlighted the elements you're referring to on screen somehow so that your explanation is easier to follow. Thank you for the vid.
@MeBadDev
@MeBadDev Жыл бұрын
For peoples who want 'islands': add this code under the setting polygon stuff if res.size() > 1: var island := Polygon2D.new() var island_collision := CollisionPolygon2D.new() island.polygon = res[1] island_collision.set_deferred('polygon',res[1]) add_child(island_collision) add_child(island) yeah its bad but its working :D
@ketu_dev
@ketu_dev Жыл бұрын
Your version can only have two "islands". Here is an improved version with an infinite number of "islands":Your version can only have two "islands". Here is an improved version with an infinite number of "islands": if res.size() > 1: for i in range(len(res)): var island := Polygon2D.new() var island_collision := CollisionPolygon2D.new() island.polygon = res[i] island_collision.set_deferred("polygon", res[i]) $collision.add_child(island_collision) add_child(island)
@MeBadDev
@MeBadDev Жыл бұрын
@@ketu_dev Yeah thats better, tjamls!
@saint-frog
@saint-frog 4 ай бұрын
@@ketu_dev I'm trying to implement this, but when I create an island, the entire polygon turns white and loses all collision. What is the $collision referred here?
@mingamerking
@mingamerking 11 күн бұрын
@@saint-frog I think it refers to the destructible static body
@dexter2333
@dexter2333 9 ай бұрын
in version 4.1 it doesn't work. Please do you know what the new code would be like?
@mrelipteach
@mrelipteach 9 ай бұрын
I don't really know why it wouldn't work. Do you have an error or something?
@AlamarsDomain
@AlamarsDomain 8 ай бұрын
The Geometry class is now Geometry2D, so you can mass replace that, and then comment out update()
@musplaygame
@musplaygame 7 ай бұрын
hermoso... como puedo hacer la linea que te indica la dirección del proyectil... así como la que hiciste en tu juego
@mrelipteach
@mrelipteach 7 ай бұрын
I made a video about that specifically kzbin.info/www/bejne/g6PcZ3majNOBbas
@FoehnG
@FoehnG 7 ай бұрын
Hey all ! This tutorial is perfect for what I need but I wanted to know if anyone knew if it's possible to turn this kind of flat plane into a 3d object. Give it a thickness. Like Worms Revolution or Battlegrounds ?
@Dave-wj6ic
@Dave-wj6ic 9 ай бұрын
Great tutorial! I am trying to create similar terrain, is there tutorial on how to do it?
@mrelipteach
@mrelipteach 9 ай бұрын
Thanks! I have a video on using path2D, polygon2D ,etc.. you'll find what you need: kzbin.info/www/bejne/pKWcaYWFosR9qNU
@Dave-wj6ic
@Dave-wj6ic 9 ай бұрын
@@mrelipteach wow, this is exactly what I needed! Thank you!
@zainsagar
@zainsagar Жыл бұрын
Having tough time to digest the code❤❤❤
@Nephanor
@Nephanor Ай бұрын
Any chance of updating this to Godot 4? I tried things as you had them here and a lot of the stuff has changed.
@mrelipteach
@mrelipteach Ай бұрын
I can't promise anything. It would take a lot of time to go through the many experiments and update them.
@Nephanor
@Nephanor Ай бұрын
@@mrelipteach I got some aspects of it worked out, but I am sure I am missing something. And I even made mine simpler, was only doing bullets that don't even arc, just drop straight down (space invaders type game, pillboxes are what I want to have destroyed) but it's still not working right. . Like now it's PackedVector2Array, Geometry2D.clip_polygons, and so on, but still....no luck.
@parvjain21
@parvjain21 Жыл бұрын
Really helpful
@mrelipteach
@mrelipteach Жыл бұрын
Glad it helped
My FAVORITE new features in Godot 4.2 (+ other cool features!)
8:57
BETTER 2D visuals in 7 EASY TIPS
10:38
MrEliptik
Рет қаралды 61 М.
When You Get Ran Over By A Car...
00:15
Jojo Sim
Рет қаралды 13 МЛН
Stop "learning" gamedev right now
17:00
MrElipteach
Рет қаралды 7 М.
The MOST UNDERRATED Godot tool (GEOMETRY CLASS)
7:47
MrElipteach
Рет қаралды 7 М.
10+2 AWESOME ADDONS for GODOT 4
8:36
MrElipteach
Рет қаралды 126 М.
Why Stardew Valley’s Creator Hated His Game
20:17
Nello
Рет қаралды 566 М.
Всё о Tilemap в Godot Engine 4
19:48
Oktopus Skills
Рет қаралды 37 М.
How to create Destructible Terrain in Godot.
4:38
OptionalDev
Рет қаралды 15 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 3,9 МЛН
Переходишь с Unity на Godot? Посмотри это видео!
25:19
Тот Самый Келин
Рет қаралды 106 М.
Как сбежать от РОДИТЕЛЕЙ в Schoolboy runaway???
12:26
МАЙНКРАФТ НО МЫ ИГРАЕМ В БУТЫЛОЧКУ!
23:34