RBuster's Recent Forum Activity

  • Ok. Thanks.

  • The cutting tool is very good, as well as the possibility of not connecting components.

    I forgot to comment that other circuits may have other components, that is, when we verify that the order is correct, there may be more or fewer components. To verify, the user will have to turn on the switch, if he is right, an animation of the wires will appear as it happens in the online simulator that I included in the first post.

  • Very nice! I will check it. Thanks.

    Could you tell me what I can do to check if the user made the connections according to the diagram or if it is wrong?

  • well, that turned out to be a much deeper rabbit hole than I expected...

    I made each component a "Node" (renamed Family1 to NodeFamily), and after looking at the Circuit project at the top of the thread decided we needed to add an Connector object as well, because you can drag Nodes or you can drag the connection point.

    so, after a lot of debugging, infinite recursive loops, and strange side-effects, I think I have the connecting of Nodes working pretty well. Right now the Connector objects know how things are joined together, but the Nodes themselves don't build a proper linked list that would be required to test the logic of the circuit...

    drag Nodes or connectors until they overlap (the connectors will turn blue), when you drop the object the connection is made. Right now there is no way to break a connection. And each connector can only make one connection (unlike the example Circuit project linked at the top). My code needs a lot more comments to be readable! and it probably could be cleaned up now that it is mostly working.

    https://www.rieperts.com/games/forum/NodeConnect.c3p

    Awesome!!! Very nice example!

    As I understand it, it is still not possible to check if the circuit was assembled correctly (following the same order of the diagram), right?

    EDITED:

    Components could not be connected to components directly. How could I do to add this rule?

    And with regard to breaking the connection, I thought about erasing (destroying) a wire to be able to release the stuck component. Would that be a good idea?

    I found a small problem: if I bring the cable close to the battery, perpendicularly, the wire connects to the two nodes of the battery, automatically

  • Yes, I think so. Even the actual components do not always have to be in a specific orientation. The only need is for the wires to be separate objects and not part of the components, that is, I will also have to position them in the same way I have to do with the components, as they appear in the diagram.

  • These options that you included could be right, but if this is going to complicate the development of the project, I can leave the positions restricted to what is being shown in the diagram, that is, only one solution

    The components could be inverted, but I think this is a problem. I thought about just allowing them to rotate 90 degrees once and/or return to the initial position.

    Complementing, yes, the switch could be right if the user rotated it this way

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

  • 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

RBuster's avatar

RBuster

Early Adopter

Member since 29 Oct, 2012

Twitter
RBuster has 2 followers

Connect with RBuster

Trophy Case

  • 11-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies