I Bet You Don't Know This Godot Feature

Поділитися
Вставка
  • Опубліковано 3 січ 2025

КОМЕНТАРІ • 146

  • @ShiloBuff
    @ShiloBuff 7 місяців тому +78

    I didn't expect to learn something in this video. But I can't believe that's why scene thumbnails are always empty. I feel like Godot needs a better solution for this. Either way, thanks for teaching me something!

    • @baconandgames
      @baconandgames  7 місяців тому +5

      I agree, a better way to define thumbs would be great. I do the same thing - watch videos about stuff I already know wondering there’s some little thing about it I don’t. Glad you got something out of it!

    • @Kolbiathan
      @Kolbiathan 7 місяців тому +1

      100% Thumbnail thing was bugging me for so long! that's crazy helpful

    • @baconandgames
      @baconandgames  7 місяців тому +4

      Credit to my buddy at Gamedev Artisan for the tip on how to set thumbs

  • @SenkaZver
    @SenkaZver 7 місяців тому +13

    This feature makes so much sense with how nodes and scenes were designed but it's so easy to not think of. What a brilliant feature for 2D games.

    • @baconandgames
      @baconandgames  7 місяців тому +2

      The rest of a hard working, very engaged community. I’m in constant awe of what the Godot devs have to manage to organize such a large effort involving so many people. It’s really quite impressive, IMO

  • @callyral
    @callyral 7 місяців тому +4

    Ooh, this is how I wanted to do pushable blocks, but I didn't know I could put them inside the Tilemap! Thank you!

  • @nickbdawg6777
    @nickbdawg6777 7 місяців тому +20

    This is super useful I had no idea you could place scenes via a tilemap like that. I'll definitely be using this in the future, thanks!

    • @baconandgames
      @baconandgames  7 місяців тому +1

      I just found out a couple weeks ago myself. In glad I’m not the only one late to the party 🤣

    • @baconandgames
      @baconandgames  7 місяців тому

      Adorable dog, by the way 😍

  • @RG-ef8vm
    @RG-ef8vm 7 місяців тому +7

    Just yesterday I created a new level for my game, and I had to place blocks one by one because they had to be interactable. Tilemapping the nodes would have saved me SO much time. I will definitely use this in the future, though!

    • @baconandgames
      @baconandgames  7 місяців тому +1

      Aw man. Just missed it! Next time! 💪

  • @micmacha
    @micmacha 7 місяців тому +9

    There's a way around that identicality for scene tiles. What tile map does is instantiate the scene at run time in the location of the tile. If you can find a consistent runtime path to it, you can access it through that and adjust its properties during play. Look at your "Remote" scene tree while running to see what I'm talking about.

    • @bismarckyjag
      @bismarckyjag 7 місяців тому +5

      I feel like running a search to grab the instantiated scene during runtime and re-initializing it is so cumbersome and takes so much more effort that it defeats the entire purpose of having a scene as a tileable entity...

    • @baconandgames
      @baconandgames  7 місяців тому +1

      I used to loop through tiles to instantiate scenes, which my solution before I found this. But this doesn’t always work and as you said, looping through TileMap data is cumbersome. But this is also kinda what I love about dev, the push and pull between different solutions. Trying to solve the riddle of what makes the most sense.

  • @smoresgobbo
    @smoresgobbo 7 місяців тому +1

    I was literally earlier in the car like “I know link to the past is tiled. I wonder how they did those fancy tiles that fly at the player” and this would literally work for that in godot.

  • @julkip
    @julkip 7 місяців тому +2

    Holy hell… knowing this would have saved me so much headaches a few months ago. Thanks!

    • @baconandgames
      @baconandgames  7 місяців тому

      You and me both, friend 🤜🤛

  • @breckheck
    @breckheck 6 місяців тому

    Such a cool feature! Thanks for sharing!

  • @CodingQuests
    @CodingQuests 7 місяців тому +7

    this is an awesome feature! I rmbr when they added it but it was somewhat buggy so i avoided using it till now

    • @baconandgames
      @baconandgames  7 місяців тому +3

      It really is! There are plenty of cases where it doesn’t make sense but in the places it does it’s great!

  • @DUUFFACE55
    @DUUFFACE55 7 місяців тому +1

    HOLY DOODLES!!! This is exactly what I’ve been looking for! My game requires A LOT of repeated tiles with scripts attached. I’ve been banging my head against a wall for a solution, and here it is!

    • @baconandgames
      @baconandgames  7 місяців тому +2

      Meanwhile, I’ve been searching for a new catch phrase and I think “holy doodles” is a winner. ❤️ Glad you found this helpful. I appreciate you.

  • @ciscornBIG
    @ciscornBIG 7 місяців тому

    This is such great content and this is exactly the type of thing I want to do and know in Godot but my job just told me that I have to get my Net+ and Sec+ certs. I've been downloading all your vids so that when I can return to gamedev in a few months I will be able to hit the ground running. Thank you, Bacon and Games. Have fun and see you soon ;_;

    • @baconandgames
      @baconandgames  7 місяців тому +2

      What a thoughtful message, thank you! Good luck with your certifications and remember to leave time for yourself. I don't know how old you are... but I think I hit it too hard, too young and then later learned... the work never stops. There's always more. So remember to carve out time for relaxation and things that bring you joy (which might be tinkering a little with gamedev in your free time or maybe just quiet time with a good book). I'll be here when you come back 💪

  • @АндрейДильман-ф6ь
    @АндрейДильман-ф6ь 7 місяців тому

    Really cool feature! Thank you for showing it!

  • @Frazer213
    @Frazer213 7 місяців тому

    This was the final thing i needed out of my tilemap, was a way to easily paint tiles on that act as its own actor. I was currently using the Metadata tag which has a list of things you can do but was way more work then it should have been.

  • @cashewolddew
    @cashewolddew 7 місяців тому

    I'm very happy to see more people aware of this cool feature. Wonderfully explained tutorial. Thanks a lot for this! 🥜

  • @OHTASISAN
    @OHTASISAN 7 місяців тому

    Awesome video once again! It will be a nice start to the weekend to see how I can add this to my own project. Looking forward to that Dr. Mario series as well!

    • @baconandgames
      @baconandgames  7 місяців тому

      Thank you, my friend! Good luck with the project!!!

  • @JuhoSprite
    @JuhoSprite 7 місяців тому

    Thanks for making this video. Ive seen this before but never found a tutorial on it. I wish I knew about it back then

    • @baconandgames
      @baconandgames  7 місяців тому

      Never too late to learn something new 🫡

  • @NexusBaum
    @NexusBaum 7 місяців тому

    Omg, that's amazing! Thanks so much! Subscribed :)

  • @ThinkWithGames
    @ThinkWithGames 7 місяців тому

    Great tips! I recently ran into this issue myself. Placing scenes as tiles makes it hard to rotate those scenes without some tricks (even though you can place rotated tiles with the alternative bitmask for rotation)

  • @artechn7529
    @artechn7529 7 місяців тому

    Instead of changing the grid size, I would set the sign offset in the corner, its more convenient. The origin doesn't need to be at the center as long as the collision shape is fine.

  • @OctagonalSquare
    @OctagonalSquare 7 місяців тому

    One thing that is hard is getting a reference to the scene in code. I’ve got a tower defense game I’m working on and use this for placing towers, and it is really hard to get a reference to them and edit them for stuff like upgrading them to new towers.

    • @baconandgames
      @baconandgames  7 місяців тому

      Yeah. This is best for self contained stuff like the rocks or signs that you drop and don’t need to access later. Totally agree.

  • @Jacotomo2222
    @Jacotomo2222 7 місяців тому +2

    I had no idea! I'm making a game where you have to eat a bunch pellets like in pac man, but have been having to manual dupe and move hundreds of them every single level

    • @baconandgames
      @baconandgames  7 місяців тому

      This could be perfect for that! 🙌

  • @neptun3189
    @neptun3189 7 місяців тому +1

    yo thank you, this was really cool

  • @dmsys6516
    @dmsys6516 6 місяців тому +1

    Why is no one talking about it, i always wanted to know this. Thanks for the info, now i can stop worrying about how i make these types of things without it getting tedious and hard to track and focus on developing some experience

  • @SilveredPapa
    @SilveredPapa 7 місяців тому

    I made an audible gasp, thank you for this great tip

    • @baconandgames
      @baconandgames  7 місяців тому

      I don’t know what my favorite comment was before but this is my new favorite. 😍

  • @LucasKelleher
    @LucasKelleher 7 місяців тому

    Yes, I am SUPER interested in making Dr. Mario in Godot. The project has been on my To Do list for ages. Let's go!

    • @baconandgames
      @baconandgames  7 місяців тому

      Well, I guess I have to finish it now 🤣

  • @Makerizms
    @Makerizms 7 місяців тому

    I need this, thank you so much!

  • @krazywiki
    @krazywiki 6 місяців тому +1

    WHAT?? Good knowledge! Ty!

  • @solmuzic8575
    @solmuzic8575 7 місяців тому

    I sometimes would get a problem where a scene would have the preview image of another scene.

    • @baconandgames
      @baconandgames  7 місяців тому +1

      Oh yeah, that’s the bug I was talking about but wasn’t able to reproduce. I’m told if that happens, make sure that the script you have open belongs to the scene you have open when you save (you’re in 2D view while saving)

  • @Crits-Crafts
    @Crits-Crafts 7 місяців тому

    This is amazing. Itll make adding enemies and collectables so much easier ❤

    • @baconandgames
      @baconandgames  7 місяців тому

      It really does! Bear in mind, I was warned by my buddy at Gamedev Artisan (you should check out his channel) ready functions for scenes added this way will fire after the TileMaps, which might be fine but it’s something you should be aware of.

  • @puzzlinggamedev
    @puzzlinggamedev 7 місяців тому

    Interesting! I'll consider it for my project. Thanks for the information!

    • @baconandgames
      @baconandgames  7 місяців тому

      You’re welcome 🙏 thanks for having a look!

  • @16bitdev
    @16bitdev 7 місяців тому

    Thanks for sharing 🙏 Learnt a lot from this video.

    • @baconandgames
      @baconandgames  7 місяців тому +1

      That makes me very happy. Thanks for watching! 🫡

  • @goonba23344
    @goonba23344 7 місяців тому

    Very good video, i actually want to see the progress for your remake of Dr.Mario, so I subscribe and wait for it.

  • @Britishblue.
    @Britishblue. 3 місяці тому

    It seems cool for static maps you make yourself. But once you start breaking and placing block I think they become a bit limited to use and make things harder.

    • @baconandgames
      @baconandgames  3 місяці тому

      Why’s that? I like that you can tie classes and methods to a scene. A TileMap’s alternative is the data layer which to me is more clunky.
      Buy honestly, options are good. Whether one is better than the other, it really comes down to what suits your preference and game the best. 😃👏

  • @beebster7
    @beebster7 7 місяців тому +2

    I do use this feature but sadly you can't adjust the properties of placed instances as you've shown :(

    • @baconandgames
      @baconandgames  7 місяців тому +1

      Yeah… being able to do that would be a game changer.

  • @Gatrehs
    @Gatrehs 7 місяців тому

    That's hilarious, This is literally exactly what I was looking into yesterday. Unfortunately for you that means you lost the bet.

    • @baconandgames
      @baconandgames  7 місяців тому

      Hahahaha. My first priority is that devs find solutions to their problems. So it’s a bet I’m happy to lose 👏

  • @Korn1holio
    @Korn1holio 7 місяців тому

    I know about it. Half-baked, unfortunately, as lots of Tilemap-related features (the other one being wonky navigation regions that are limited to 1 layer, the most logical ways of implementing navigation for Tilemaps, that is, via the navigation layers in Tileset, is actually not recommended by the Godot dev responsible for navigation)

    • @baconandgames
      @baconandgames  7 місяців тому

      Yeah. The TileMap is quite wonky. I hope it gets more stable and feature rich as godot grows. We with with what we’ve got, right? 🤷‍♂️

    • @samuraikina5908
      @samuraikina5908 7 місяців тому +1

      Baking the navigation map works pretty neat, it recognizes all the collisions you have on your map

    • @baconandgames
      @baconandgames  7 місяців тому +1

      @samuraikina5908 oh nice! Great tip!

  • @ThatDudeNamedMichael
    @ThatDudeNamedMichael 7 місяців тому

    amazing, ty!

  • @ShVanesMusic
    @ShVanesMusic 7 місяців тому

    Very useful!

  • @RebelliousX
    @RebelliousX 7 місяців тому

    These drawbacks make this almost useless, since most of my scenes are having export variables that change their appearance (sprite, animation..etc), shape or dimensions (width x height), again unfortunately it is useless for me. I was thinking of making a plugin that works like tile maps but instead of images, it can have scenes. I think it is doable, but I am thinking to myself, the time I spend to make that addon versus just put everything nested inside a Node scene and hide them there. Something similar to Asset Dropper addon for Godot 2.0 by Andreas Esau (the creator of Godot Robot found in the official tutorial help section, has youtube channel for that addon, but it is deleted from the asset store since it is outdated).

    • @baconandgames
      @baconandgames  7 місяців тому +1

      It really depends on the application. For some things, totally useless. For others, super helpful. I don’t know Asset Dropper - too bad it’s not still around. I appreciate the feedback. Good luck with your project!

  • @Shakkael
    @Shakkael 7 місяців тому

    What I did to solve that problem is I made a separate atlas filled with different numbers and added custom data layer "text" of type String. Then in tileset editor I changed text value for each number depending on what I needed. Next I put the scene tile on objects layer and data tile on data layer.
    After that I made a script for each scene that was supposed to be used in the tilemap as scenetile so that it takes its position on tilemap and checks if there is a data tile on the same position on data layer - if yes it just takes the needed data. For more complex functionalities than just variables storage it might not be a good solution
    Hopefully someone finds it useful

  • @AlexStrook
    @AlexStrook 7 місяців тому

    Great video, can't wait for the the dr mario video 👀

    • @baconandgames
      @baconandgames  7 місяців тому

      HEY! (read in voice of Navi). I know you ❤️👋

  • @yanlucasdf
    @yanlucasdf 7 місяців тому

    Would this work for let just say a enemy? Like a scene with sprite, rudimentary Ai that walks towards the player and a collision that when player overlap moves to a battle map like in a old-school rpg?

  • @malcolmpelletier2107
    @malcolmpelletier2107 7 місяців тому

    I’m making a Pokemon clone, and this is going to be really useful!

    • @baconandgames
      @baconandgames  7 місяців тому

      Oh neat! Please share it when you’re ready (here or we’d love to see it in the Bacon and Games Discord). We have a channel for sharing your projects!

  • @agabascal
    @agabascal 7 місяців тому

    Question about it is if it'll also be deprecated with the upcoming Tilemap update in 4.3

    • @baconandgames
      @baconandgames  7 місяців тому

      I believe this feature still exists as part of the TileMap Layer but I'm going to verify.

  • @EugenijusKrenis
    @EugenijusKrenis 7 місяців тому

    Does this work with GridMaps too? Would be neat for like a strategy game with structures and collectible resources bound to

    • @baconandgames
      @baconandgames  7 місяців тому

      Oh I dunno, I’ve never tried that but I will. To be honest, I very recently learned about this feature which is why In thought others might not know about it as well. Let me know if you find out before I get to it.

  • @taylorrathbone5638
    @taylorrathbone5638 7 місяців тому

    When you collide with the rocks to move them, how does that affect their coordinates in the tilemap? Especially since they dont snap to grid when moved

    • @baconandgames
      @baconandgames  7 місяців тому +1

      I believe they retain the same local and world space transform as if you had placed them in the scene tree directly. This feature, in my opinion, is best for things you won’t need to reference later - self contained stuff - like and enemy that has all its own logic or coins in a level (that maybe are animated, bob with a sine wave and have some RNG to be a super coin). If you need to access them via coordinates or intend to act on them directly, this feature may not be a fit. I tend to use it for objects that are self-directing, set and forget. Which is to say, they would likely never be objects that I’d care to know the coordinates of.

  • @dominicballinger6536
    @dominicballinger6536 7 місяців тому

    I tried to use this for some enemies in a mario Clone I was making to learn godot, but I was relying on signals to do things like damaging players, and for the life of me I couldn't connect the signals correctly from the Sprite in the damn tile map to the player. It was probably a bad way of doing things, but keep in mind signals are a headache with this

    • @baconandgames
      @baconandgames  7 місяців тому +1

      Oh yeah, I could see that. You might, in that case, need the bus pattern. Search for “godot signal bus pattern” on YT. If you have a ton of enemies this may be dicey but give it a look. It basically centralizes your signals so that you don’t need paths to each enemy to wire signals up.

    • @dominicballinger6536
      @dominicballinger6536 7 місяців тому

      @@baconandgames dang, i didn't realize you could do that! Thanks so much! The whole signal system is confusing as absolute hell for me, so this sounds amazing

    • @baconandgames
      @baconandgames  7 місяців тому +1

      It, like everything, has its tradeoffs. Signals can be tricky to wrap your head around, like every other things in game development 🤣 But yeah, give that a look. Might be useful.

  • @Yuri_Zinovev
    @Yuri_Zinovev 7 місяців тому

    Thats Neat! Thank you!

  • @seannewell397
    @seannewell397 7 місяців тому

    Composition rules.

  • @valeska-letta
    @valeska-letta 7 місяців тому

    thank you :) you for the video, it is inspiring :)

    • @baconandgames
      @baconandgames  7 місяців тому

      You’re inspiring 😬 Thank you for the kind words

    • @valeska-letta
      @valeska-letta 7 місяців тому

      @@baconandgames omg i just noticed how bad I wrote that comment haha

    • @baconandgames
      @baconandgames  7 місяців тому

      I blame phones/computers. They try to help and they don’t 🤣

  • @loodinek
    @loodinek 2 місяці тому

    Couldn't you use the data layer in combination with the scene collection to get the new string for your sign?

    • @baconandgames
      @baconandgames  2 місяці тому

      You could indeed. There’s probably a dozen ways you could pull this off 😃

    • @loodinek
      @loodinek 2 місяці тому

      Thanks for getting back to me, I liked your video and I did learn something new in it. :)

    • @baconandgames
      @baconandgames  2 місяці тому

      That’s the dream 😃 Good luck with your projects! Please drop by the Discord and show them off, if and when you’re ready. I’m sure everyone would love to see what you’re working on.

  • @hidoshi1994
    @hidoshi1994 7 місяців тому

    Is this a Godot 4 feature only? I am currently developing in G3 and this would really help me with avoiding spawning a scene on load through TileMap script

    • @baconandgames
      @baconandgames  7 місяців тому

      I’m not sure. I don’t have 3.5 on my machine anymore. But if you find out let me know

  • @collinvisser7108
    @collinvisser7108 7 місяців тому

    Neat - Question does the new Custom Data not work with scene ? thx

    • @baconandgames
      @baconandgames  7 місяців тому +1

      I actually don’t know but that’s an easy test. I’ll give it a try when I get home but let me know if you beat me to it. The interface itself might clarify, depending on what’s available. Great question. I hadn’t considered that.

    • @risobro
      @risobro 7 місяців тому +1

      I've recently been trying to use scenes in tilemap, but it was too clunky for my usecase, and no, custom tile data can't be set in scene tiles, unfortunately. AFAIK it doesn't let you customize anything in scene tiles at all (correct me if I'm wrong).
      So, I had to go back to traditional tileset with custom tile data. Had to go through all relevant tiles in the level (according to atlas coords) to update their state and replace them with other tiles when needed; my game was small so it wasn't that big of a deal. Found the cells manipulation and getting their states by atlas coords quite convenient.

  • @MichaelGame_Dev
    @MichaelGame_Dev 7 місяців тому

    To me, this feature isn't super useful as is since you can't set the exports.
    One thing you can do instead, is add the your sprites of your scenes to a standard tilemap, then on ready() change those tiles into an instance of said scene. You can add custom data layers and use those to potentially set export variables. This still wouldn't work for your sign issue, but it at least gives you some flexibility if you need to be able to set some exports but it's with a limited set of values.
    Naturally, this too has downsides and will depend on scale and how you load your game.

    • @baconandgames
      @baconandgames  7 місяців тому

      Well, as I say in the video, it really depends on the application. If you're making a sokoban game, for example, and you need objects that have to move (which tiles can't) and you don't need to set export variables (which wouldn't be needed in sokoban game) it's perfect. For other things, as I called out regarding the signs in my example, it just doesn't work.
      There are no universal solutions in game development. The trick is learning what all the options are and then using or customizing those to fit your needs. Looping through tiles and converting them to scenes (which I've done in the past) is cumbersome as well if you need to set export vars because then you have a write a translation layer anyway.
      I can see there being games where you use a standard tilemap, this technique, as well as some of what you're describing all in one, depending on the needs of your level editing. Everything has a downside and and upside, depending on the needs of the dev and the game.

  • @alih-
    @alih- 7 місяців тому

    Oh i didn't know, neat trick

  • @hussain_abdullah
    @hussain_abdullah 7 місяців тому

    that's very helpful

  • @KopMike94
    @KopMike94 7 місяців тому

    Can you also do this with a gridmap? 😮

    • @baconandgames
      @baconandgames  7 місяців тому

      I don’t actually know but you’re not the first to ask. I don’t do a ton with 3D but it should be super easy to test whether this is available in 3D projects. Let me know what you find!

  • @Zevonthethompsongun
    @Zevonthethompsongun 7 місяців тому

    Does this behave the same with gridmap in 3d?

    • @baconandgames
      @baconandgames  7 місяців тому

      I’m going to have to look into that 😬 I don’t make 3D games but enough people have asked that question that I should have a good answer. I would GUESS yes, but I’d have to fire up a new 3D project to see if that feature is present. If you beat me to it, please let me know what you find! 🙏

  • @chrisxdeboy
    @chrisxdeboy 7 місяців тому

    Does this work in 3D, as well?

    • @baconandgames
      @baconandgames  7 місяців тому +1

      I’m it actually sure. The TileMaps are 2D but if there’s a 3D analogy, I imagine that functionality would persist. I don’t do much with 3D so I’m not the best person to ask, unfortunately. If you find out, come back and let me know ow what you learned. 😬

  • @Ros4go
    @Ros4go 7 місяців тому

    Thaks

  • @JiKayPh
    @JiKayPh 7 місяців тому

    nice

  • @alexxander7289
    @alexxander7289 3 місяці тому

    silly dev, tricks are for kids.😁