Transitions / Camera


Feb 21 2025 Update

wordtypevomit incoming. yikes, kind of completely messed the game up trying to figure out scene transitions and the camera following the player. turned out my camera wouldn't follow the player once i switched it out to let other code function. i didn't want to play a player node in every scene since i wanted it to transfer over, and queue.free() wasn't working right. so i saw a tutorial on how to add a player spawn that spawns my global player anywhere and deletes itself, but the camera wasn't able to follow the player in any scene


the scene would load and the camera would be in the middle of nowhere and unable to follow the player. so i added a normal camera on the player in the player scene but that isn't the kind of camera i wanted.

 

this kind of camera feels bad to me, where it's glued to the player. maybe there are ways to get it to go how i want by doing that, but i don't want it glued to the player scene so i can do more dramatic movements if i need to. had to figure out what was wrong lol. went back to the old camera set up and decided to add an "await" thing whatever it's called. "await get_tree().process_frame" so it would just wait a frame to let the sprite load in and then follow it, and that surprisingly enough worked.

now i got the camera working, but i was having weird mouse button attack clicks not registering, and transitions no longer working (probably because of the player being a new thing and not really there? i don't know). I had my old code pretty hard focused on the player being there, but now that it was autospawning, a lot of it didn't work at all. my old code was really messy and i didn't know the best way to clean it up so ended up getting rid of it. new transition code was a nightmare lol. having the scene fully go from where the level is to the middle of nowhere, player disappearing completely, no fun.

new camera is able to follow my player but have room for jumping, falling lower. there's a cut off point (limit) that was acting weird with the other camera. I can have my character be more towards the bottom of the screen, and not follow so seriously. and then finally got the transitions working (don't ask me how). ended up removing the individual level code which kind of didn't have anything important in it, and now it just works. praying it stays that way.

I don't even want to imagine adding a map, items, inventory, menus. music and sounds will be fun. can't wait to look back on these like i do my old trading journals and laugh. im gonna go play with my cats

Leave a comment

Log in with itch.io to leave a comment.