RBuster's Forum Posts

  • Hi tarek2

    Logically, the user will be able to assemble following the order of the components, regardless of position, but if that can be a complicating factor, as he will see the diagram while assembling, I can ask him to assemble exactly the same structure.

    Components and wires cannot be flipped but can be rotated 90 degrees or -90 degrees, that is, they can rotate 90 degrees and return to the starting position.

    For example: the switch can only be in the vertical direction if it is placed on the sides of the circuit

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you very much for helping me with this project. You have helped me many times over the years.

    I looked at your capx and I think it took away some doubts about how I could do it, such as including nodes at the ends of the components, for example.

    In the case of the battery, it should also have two nodes (but in this case the position will not be at the ends, but at the top, one on each pole of the battery) and also move around the screen like the other components.

    The wires will also have these characteristics, that is, they will be separate objects. Blackhornet suggested the use of TiledBackgrounds, and in this case, the nodes would be the same ones used to define the length of the wire. I do not know if it is possible to snap the nodes of the wires and the nodes of the components, but this would be great.

    I think the big problem will be to be able to identify each of the components (battery / resistor 100-ohms / resistor 200-ohms / fuse / switch) and to know if they are connected according to the diagram:

    1- A battery pole connected to the fuse,

    2- fuse connected to the switch

    3- switch connected to the 100-ohm resistor

    4- the 100-ohm resistor connected to the 200-ohm resistor

    5- 200-ohm resistor connected to the other pole of the battery, closing the circuit.

    How will I know if the 5 components that are connected by wires and following the correct order?

  • Thanks for the suggestion but I really don't know how to create a linked node list and even how to connect each wire/component on themselves to stick together like in the simulator that I shared.

  • I think that it will not be necessary to build circuits as complex as this one.

    So should I use transparent small sprites in the objects' ends to detect this? For example, I would have to check what is at the A end of the battery. If it's the B end of a wire, I have to check what's on the A end of that wire. If it’s another wire, no problem, I will check what at another end of this wire, and if it’s the A end of the fuse, I check to see if there’s a wire at the other end, and so on...

    Would it be this? If so, how exactly do I do that? And how to adding this information in the variable (using append?) and then checking if the whole structure is correct? This is knotting my head.

  • Good question :) Actually, each part is unique (I intend to change the shapes for images later) and the correct thing would be to allow any combination, as long as the order is maintained, but if this is going to complicate a lot, we can restrict it to the circuit shape in the diagram, that is, the reproduction must be exactly the same, but it can be used as many wires as you want between the components. The most important thing is to make sure that the circuit is closed and that each component is in the correct order. What do you think?

    EDITED: The important thing is also that the ends are touching. I don't know if it would be better to use image points overlapping or a sprite on each end of the objects to check for overlapping/collision.

  • This is really good and it is exactly what I need. Thank you!

    Is it possible for you to help me with this question?

    construct.net/en/forum/construct-3/how-do-i-8/create-simulator-without-159567

  • Please, some help here. if you don't want to edit the file, feel free to only suggest your ideas. I would like to understand what are the possibilities I have to achieve this goal. Thanks

  • Actually, I have 2 wires. I understand the logic that you have suggested but I don't know how to do this. if you check the file on the link I posted, you will see that he clears each line to include the others. I even tried to create lines with other colors and clean the line according to the RGBA values but it didn't work.

  • I need to create a circuit assembly simulator. The assembly area must be without predefined places, that is, the users can mount it wherever they want and I have to identify if he made the correct connections as shown in the diagram. I thought about using something that would check the overlap of image points, I don't know if it would be the best, but I still don't know how to do to identify if each part is connected correctly and I need help with that. I am creating a template before and shared it here. There is also the diagram to look at as a reference (it cannot be under the assembly area for the user to place the parts on top, it is just a reference).

    dropbox.com/s/pr87pwget9etqag/demo.c3p

  • I am using tiled background to create the wires and now I need to use some bezier curves to create the other wires with the connections between the plugs and the test probe(pen). I will need to create 4 connections (in this case, 4 lines).

    My question is whether I need to use 4 drawing canvas objects for this (since I have to clean the canvas every time I move the objects (pens/plugs) that create the lines), or if I can get the same result on a single canvas for the four lines, remembering that the objects can always be dragged and each time that happens the line has to be redrawn, without removing the others.

    I am using the same method of the IcticStep(https://www.construct.net/en/forum/construct-3/how-do-i-8/smooth-curve-150756)

  • Thanks. I will check it out.

  • TYVM for the example. I really liked it but I noticed 2 problems:

    - I intend to create the animation of the energy current (the same that appears in the simulator) using animation frames and TB doesn't have it.

    - The aliasing in the line (depending on the angle)

    Do you any suggestions for these problems?

  • Nice to see you still here, blackhornet, and thanks for the suggestion. Do you know where I can find an example/tutorial of how to use tiledbackground for what I need?

  • I made a few attempts and the flexible wire is not very suitable for this demonstration. I want to do something similar to the simulator in the link that I passed. In this case, I'm thinking of using a sprite instead of a C3 line, but to make it smaller and larger (dragging the extremities) I can't change its length or the image will be distorted. What would be the other possibility?

  • Thank you mrcgkh for the example.

    You guys helped me a lot to start this project. If I have any more questions I will post here with some samples already created.