Impulsing: #devtober Day 20

This was one of those days where you do a certain amount of work, and then it ends up not feeling like much. The goal was to get the buttons hooked up for adding and removing space from a level. In the end, I spent all my time getting the button signals set up only to realize they were in the wrong place (the main game controls scene instead of the editor scene).

I moved the buttons (easy enough) and the code (also easy enough), but then I found I had no way to trigger the updates. I then spent the rest of my time plumbing in a new signal to fire when the camera moves. That worked well in the level base scene itself.

The editor raised an interesting problem. It is a Godot “autoload” scene, which means it gets loaded once into the overall tree (outside any loaded level). But its “_ready” method is only called once, when it gets initially added at game startup. As such, I can’t hook the editor up to the game state at that point because there is none.

What I need is some sort of signal saying “level has been loaded”. I haven’t found something like that yet in Godot, which means I’ll probably end up doing it myself – which is annoying, as I have to sort of force it in certain places and hope I have caught them all.

I’ll keep looking. Maybe there is what I need. Otherwise, I know what I’ll be doing tomorrow…

Day 20. The month is flying by.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.