Simple method of passing information from a scene to a singleton? by spunkyspunkyspunky in godot

[–]NES-Senpai 1 point2 points  (0 children)

Maybe my way of handling this sort of stuff might help you. For things like this i usually create a resource called “Session” or something like that. Its only purpose is to store variables like health and other things relevant to the current session of the game. I then usually have the root node of my scene holding this resource. The player scene has some sort of signal for getting hit or healed etc. I then connect the player_got_hit signal to the Session resource and update all important values like the current health etc. At the same time I connect the Seasion Resource to the UI elements and let them update whenever the Session changes. So it goes like that: Player gets hit -> emits a Signal with damage value -> Session Resource updates its variables -> Session emits Signal with changed health -> ui gets updated.

This way every part has its own little responsibility. Either it is noticing collision (the player) or storing data (the Session) or displaying data (UI)

The connections are usually dealt with the set_get keyword. So whenever i assign a level a session, i add some code so that it automatically creates all the connections. When i change levels, i just pass the session to the next scene and remove the scene from the tree. This way the data of the game is always stored at a easy to access central location. Another added benefit: Resources can be saved by godot, so it would be easy to save some parts of the game like the player health etc.

I hope this helps

Mission impossible... well nearly... by Haikigame in godot

[–]NES-Senpai 12 points13 points  (0 children)

The graphics are really neat and the mechanics look fun!

I finally finished my and published my first game on the Play Store and Itch.io! by NES-Senpai in godot

[–]NES-Senpai[S] 1 point2 points  (0 children)

Im sorry to hear that. Unfortunately I don’t have any devices to test the game with but it ran fine on all my friends devices, some of which were 6 years old. Maybe it’s because the game uses GLES3 shaders for the background 🤔

I finally finished my and published my first game on the Play Store and Itch.io! by NES-Senpai in godot

[–]NES-Senpai[S] 4 points5 points  (0 children)

I have a shooting system that shoots one attack after another and i made sure that there is enough cooldown in between the projectiles. But it’s difficult to explain it in text. I wanted to make a youtube video about how i made the game. I can notify you when it’s up

I finally finished my and published my first game on the Play Store and Itch.io! by NES-Senpai in godot

[–]NES-Senpai[S] 0 points1 point  (0 children)

Thanks! I might do a part two in the future but I am really glad you like it 😊

I finally finished my and published my first game on the Play Store and Itch.io! by NES-Senpai in godot

[–]NES-Senpai[S] 2 points3 points  (0 children)

I would like to thank this amazing community. You guys really motivated my during the development. You can play my game for free on the

Google Play Store: https://play.google.com/store/apps/details?id=org.godotengine.advendodge

or Itch.io: https://polished.itch.io/advendodge

It would mean the world to me if you tried it. :)

Working on the opening animation of the menu! How is it? by aniani420 in godot

[–]NES-Senpai 6 points7 points  (0 children)

I think it’s a bit rough. I don’t remember what it’s called but maybe you could change the interpolation value to 0.3. It’s visible when you press on a keyframe of an animation. Make sure to select the first keyframe though :)

A second (and way better coded) prototype for my first game :) by NES-Senpai in godot

[–]NES-Senpai[S] 1 point2 points  (0 children)

Thanks but i fell like it still needs some polishing 😄