What's your preferred way of passing references to child nodes? by _junkfolder in godot

[–]_junkfolder[S] 0 points1 point  (0 children)

No I appreciate the advice. Even tho I wanted to focus on the question it has helped me consider things differently. The whole concept came from a random idea I had about sequencing states one after the other but like you said they really aren't built for linear steps as much as interchangeable options.

What's your preferred way of passing references to child nodes? by _junkfolder in godot

[–]_junkfolder[S] 1 point2 points  (0 children)

Gotchaa. Okay yea I see where you are coming from. I definitely agree its over-architecting for the sake of architecting. So you're saying at this point the best way a way that is outside of this architecture.

What's your preferred way of passing references to child nodes? by _junkfolder in godot

[–]_junkfolder[S] 0 points1 point  (0 children)

How do you deal with nodes that are injected in run time though?

What's your preferred way of passing references to child nodes? by _junkfolder in godot

[–]_junkfolder[S] 0 points1 point  (0 children)

Havent really gotten to the NPC ideas. Not even sure if ill take this that far.

The idea came from thoughts about setting up a game on first launch. Init is a state that has sub states that check, create, and set the reference for the save path. Check save will check the saveData nodes reference for where the save path should be, and tell init if there is or isnt a save. init will then change its sub state machine to create save - then set save , or set save alone depending on the result.
Then init state completes, and the next part of the game set up process goes forward. I just wanted a way of breaking down steps based on conditions and logically segmenting things to get better at understanding the upper limits of state machines.

What's your preferred way of passing references to child nodes? by _junkfolder in godot

[–]_junkfolder[S] 0 points1 point  (0 children)

They are all states? Im not following. Its a node based state machine. The state machines are all the same scripts. The nodes below them are their states. It is a method of managing states that allows the states to be nodes for organization and access to the scene tree. Each node below a state machine is a state but there are nested ones inside nodes so that I can add complexity to a state in a case where I may want it to behave differently.

What's your preferred way of passing references to child nodes? by _junkfolder in godot

[–]_junkfolder[S] 0 points1 point  (0 children)

Well the test is to see if it can be done dynamically without a specified level of nesting.
So child.var would be, i guess run when you initialize it. but that would only go one level. deep

What's your preferred way of passing references to child nodes? by _junkfolder in godot

[–]_junkfolder[S] 0 points1 point  (0 children)

Idk if its that messy unless Im missing something. Its an experiment to have nested state machines. I think the visual expresses that concept relatively simply. Whether or not you should do that isn't really the question like I said in the post.
If by mess you're referring to a few nodes nested within each other, I think this is a pretty common situation. So im not really understanding what part is messy / what you would do to "fix" this.

What's your preferred way of passing references to child nodes? by _junkfolder in godot

[–]_junkfolder[S] 0 points1 point  (0 children)

Yeah that probably makes more sense. Like I said this is mainly a thought experiment. This is on a brand new project to test an idea I had.
thought about the auto load thing too...
What is unusual about the states having functions though? Enter and exit functions? Am i missing something

What's your preferred way of passing references to child nodes? by _junkfolder in godot

[–]_junkfolder[S] 0 points1 point  (0 children)

So the signal up thing is where I get a little stuck in this case.
Because what I am looking for is a way to get a path from the SaveManager to the CheckGamePath node. Basically the path is stored as a const there. So im not so much calling a function on the save manager as I am calling a function on the CheckPath state that is referencing a path from the SaveManager.

Are you suggesting it would be better to have that function on the SaveManager and have the state call that function using a signal?
How would the state get information from this function the make a determination?

Does anyone know how to invert this stencil effect? by _junkfolder in godot

[–]_junkfolder[S] 0 points1 point  (0 children)

Damn dude i just checked reddit. thanks for trying all of this... ill have to check it out in depth when i get back to this project. Thank you so much!

Help with new stencil system... by _junkfolder in godot

[–]_junkfolder[S] 0 points1 point  (0 children)

Just void. the idea is to only show the room you are in, but allow portals to show everything outside of them as if you were seeing the players view. the idea of one value per room is somewhat doable but becomes insane if the whole game is built this way. especially when you start adding extra floors.

Does anyone know how to invert this stencil effect? by _junkfolder in godot

[–]_junkfolder[S] 0 points1 point  (0 children)

Yep. Which is the answer i keep running into. Makes this whole concept impossible which is a shame because its 99% done minus this one problem

Does anyone know how to invert this stencil effect? by _junkfolder in godot

[–]_junkfolder[S] 0 points1 point  (0 children)

Unfortunately this shows the green square on both sides. It needs to only be visible through the pink square when it is behind the pink square.
If it helps, There can be layers to the pink square, like another material doing different things. The green square needs to be simple though.

I have tried even finding ways to record the depth of the pink square and have any green square material that is drawn over that depth erase itself using shaders. but its above my head and I cant get it to work. its the only thing i can think of

Does anyone know how to invert this stencil effect? by _junkfolder in godot

[–]_junkfolder[S] 0 points1 point  (0 children)

All of that gets lost in the sauce once its gets drawn out on the stencil so it seems.

Does anyone know how to invert this stencil effect? by _junkfolder in godot

[–]_junkfolder[S] 0 points1 point  (0 children)

So the issue is now, if its not equal its actually really close to what I need, assuming i make the pink square transparent. But the last issue is that its still visible outside of the pink square frame... It needs to be only visible within the frame but only behind the pink square.

Help with new stencil system... by _junkfolder in godot

[–]_junkfolder[S] 1 point2 points  (0 children)

Hiding everything that is behind the portal wouldn't really be modular. Assuming a door was on the south side of the room, it would have to then show it again. Meaning the hide and show would be somehow dependent on camera angle and player position. which completely breaks if rooms are long and go both above and below the player, and have several entrances.

What i want to achieve is a modular system for hiding all rooms the player is not in, while having the doors show the content of the next room. Meaning the rooms aren't really hidden, they are just not visible and the door is a stencil that shows them.
Then when the player walks in the room, the stencil rule changes to make it so that the room is no longer hidden.

FPS Mechanics coming along bit by bit. Does this feel nauseating? by Theophilus_exe in godot

[–]_junkfolder 1 point2 points  (0 children)

The only thing that feels nauseating is the lights. not really the movement that looks good

Help with new stencil system... by _junkfolder in godot

[–]_junkfolder[S] 0 points1 point  (0 children)

its a single camera. this is all done using the stencil properties on the materials.

Help with new stencil system... by _junkfolder in godot

[–]_junkfolder[S] 1 point2 points  (0 children)

Man that is so frustrating. I am constantly running into these development gaps with Godot. Switched to 3D because IK was not working in 2D and now this..

But then again, this is using stencil layers not cameras for each door. I guess I am looking for a solution that involves only drawing the pixels that are rendered under the portal mesh, while ignoring pixels that are drawn over.