Before proceeding, please use the forum search feature at the top of the page to check if your question has already been answered.
Screenshots of events at bottom.
Hello. I am working on something that is less of a game, and a bit more of an app, but the behaviors & extensions I’m working on still have in game usage.
(It is unrelated to the first forum post I made.)
I am making a garden planning app, and I am trying to create an extension to draw top down “vector” rooms and garden beds. I am currently only regular tiled sprites in the main scene, but I have been experimenting with this because it would allow for the creation of irregularly shaped buildings and garden beds. I would love to get it working so I can share it with everyone else, I think it could be used to make some neat stuff.
There are currently 9 objects involved.
- 5 sprite objects. 4 are named Node1, Node2, Node3, & Node 4. They all are centered around a central sprite named NodeMother.
- 2 Shape Painters one called “Walls” and another called “Floor”
- 2 tiled sprites - one called “BlueWalls” and another called “BrownFlooring”
You can drag the nodes and create a rectangle any shape you want. A shaper painter called “Walls” draws a rectangle between each node except NodeMother. It also masks “BlueWalls”. ShapePainter “Floor” draws a rectangle between all 4 nodes and masks “BrownFlooring”. Once you drag the nodes into the shape you want you can drag NodeMother and they’ll maintain the same relative position relative to it (for the most part, one will usually shift slightly off, but its usually not enough to compromise the core shape).
It works most of the time. However if you overlay nodes to make a more complicated shape, it can temporarily break(See screenshots below)…
I think a lot of the problem lies in my object picking events. I tried to do a simplified version but it just didnt work, so I had to manually for however many of these Node/NodeMother pairs exist at once. Even then it can only seem to handle two or three and it wont work for any more than that.
My object picking events just dont work that well and I have a feeling I complicated them more than I needed to. I had initially tried to do this with one node object use variable for the objects to allow for the creation of more than one node per “room” so that other shapes besides rectangles could be made, but this is what I could get working. I also have a feeling that the events that determine the relative position of the nodes could also be simplified.
(the “rectangles” drawing extension could also be improved, if two objects have the same X position the wall only shows up as a thin line, but I think I can do figure that out myself.)
If we could get this working, I’d love to work on a tutorial for it. I love the tutorials on youtube and in the documentation. I felt like I learned a lot when I followed the procedural generation tutorial.
I’ve attached the project file at the bottom. I’m not asking anyone to fix this for me, just a little help or to be pointed in the right direction.
Thank you in advance.
P.S. Let me know if you have any questions/ need clarification. My event sheet is spaghetti.
Moved together to create a more complex shape. Node 1 from the right “room” is now covering Node 2 from the right. Node 3 is from the left room is covering Node 4 from right room.
When you the drag the node the shapes are supposed to be cleared until you drop it again. The Node is also supposed to snap to a grid. Neither of these are happening here.
This is one of the things that can happen when I try to simplify the events that pick nodes with same “_instance.node_group” variable.
Ok another question. How do I attach a zip? Should I just upload it to gd.games instead? I got it zipped but it will only let me do gifs, jpegs and pngs. Do I need more trust?
Right click to create Nodes and NodeMother.