RBuster's Forum Posts

  • Would it be possible to know how many fingers are touching the screen at the same time and what is the distance between them? If so, I would like to know how to make this happen. Thanks

    Tagged:

  • Thank you, tarek2!

    You are right. It's a simple and effective solution. In fact, the complete solution is amazing. All commented and explained. A great class!

    I will study this CAPX and all your comments/explanations minutely, to be able to do some modifications or adaptations. I appreciated your help a lot and I hope I can still count on you if you have any more questions.

  • Everything should be possible as long you describe exactly how it works.

    Example:

    Do you mean something like this?

    The circuit has been cut it and they are two components at the two ends:

    -Going left side the last component is Resistor1

    -Going Right side the last component is Resistor2

    Which you can already get from the debug string if you look to the last components, look at the picture.

    If it's not that can you explain it a bit more, this assuming that we start always from the Switch? Anything can be done if you just explain how it works exactly including all the different situation that can happen, other ways it's confusing and it will take longer to give the right answer.

    What I meant is to separate a single component from the circuit in order to be able to measure it with the multimeter. In the example you showed in the image, resistor2 would be disconnected from both sides, that is, it would be completely separated from the circuit. The reason is that it has two values: one when connected and the other when disconnected.

    ==========================

    > - I need to implement the multimeter (as you may have seen in the simulator) to measure the components when they are connected or not. This happens at the ends of the component. What do you suggest for that?

    3-If you mean how to connect this:

    Then you can add it as a normal component but you just don't include it when you check if they finish the circuit in the right order, instead, it will act as a wire if I understood you correctly. Basically, it will be skipped for circuit check but it will be used to see who is connected to it only. I can have a look if you want but I just need to know exactly how this will work.

    Sorry, but as I cannot see this image, I don't know if I understood your comment correctly. I would use the multimeter to touch the probes to the ends of a component and the value would appear on the panel. In the simulator that I shared the link in the first post, the multimeter is at the top right of the screen and you can drag it to use the probes.

    ==============================

    > - I thought to use tile background as the wires, but I need those wires to show the energy inside them, as happens in the simulator and I cannot use tileBG for this. I also used sprites, but when I stretch the wires, the animation also stretches. Do you know another solution for this?

    Awesome! It is possible to control this animation, right? For example, use the switch to turn on (show the animation) and turn off (stop the animation) or still disable the animation when the circuit is cut?

    EDITED: In the current structure, it is necessary to define in the variable the number of items and the order of these items. It would be possible to consider the wires as a single item regardless of the amount, that is, if you join several wires, the program understands that it was included the wire that is requested on the order of the value of the variable? I am asking this because putting together multiple wires instead of using just one shouldn't change the result.

  • tarek2

    It's really awesome! It's very similar (practically the same) to that simulator I posted at the beginning. Thank you so much for sharing it with me!

    I have four questions:

    - Is it possible to check what component was disconnected when someone cut the connection of both sides of this component? If so, how?

    - I will need to use other components besides those. Is it possible for me to implement it?

    - I need to implement the multimeter (as you may have seen in the simulator) to measure the components when they are connected or not. This happens at the ends of the component. What do you suggest for that?

    - I thought to use tile background as the wires, but I need those wires to show the energy inside them, as happens in the simulator and I cannot use tileBG for this. I also used sprites, but when I stretch the wires, the animation also stretches. Do you know another solution for this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't know if you're referring to the link I included in the first post, but if it is, I thought it was going to be very complex, so I tried to ask for the minimum resources. The problem is that in the end I will not be able to do the demo version and it was all in vain, but thanks anyway.

  • In the circuit, all components must be connected by wires. There is no way to connect a component directly to another component. In addition, after assembling the circuit, you can disconnect the wires (using pliers) to measure separate components.

    In this simulator I would need:

    1_ Know if the order of components is correct, regardless of the variety of components that I circuit may have

    2_ Know if all of them are connected to at least 1 wire, that is, the circuit is closed.

    3_If any component is disconnected from the circuit, I need to know if it is disconnected at one end or at both ends, because then I need to measure these components using a multimeter and when connected they will show an X value and disconnected, a Y value

    I am not sure if you checked the example of AllanR, which has the solution practically ready. It would only be necessary to check the wires (items 2 and 3)

  • Hey guys

    I'm still stuck here. I just need to know how to create a verification system that checks wires and components to see if they are in the correct order and if the wires are all connected to them and how to know if a wire is disconnected from any component or not. Could someone help me, please?

  • Hi R0J0hound

    Perhaps that was the most realistic solution, but I think that something so complex will not be necessary for this demonstration. I am very grateful for your suggestion, but I am unable to produce this. The solution that AllanR created is practically ready, we just need to include the system for checking the connections with the wires, but although I understood the logic he proposed, I don't know how to finish it. I'm just afraid of not being able to show this demonstration anymore because of the deadline.

  • Are you sure that cross-domain request are disallowed on their server? This will make other solutions (like checking online time) unusable too.

    I don't know if it's disallowed, but I think it probably is. My domain, for example, which is at Hostgator, did not have this option enabled. Anyway, I won't be able to count on it.

  • I'd advise just to use the domain lock approach described in the tutorial I linked to previously.

    The problem is that the files will be sent to the client to test on their server.

  • You could request the date from a server. It would require the user to be online though.

    But I think that then I would have the same problem accessing this information as I would have to access the file on another server because of the problem with cross-domain, isn't it?

    EDITED: This would work if I checked the date on the server where the files are hosted. It is possible? If so, would I have to use a plugin for that?

  • You could create a version with a variable of the date on which you are going to export and deliver the test game.

    On your initial layout before the game loads, you could have a test that compares the current date with the date in the variable. If it is greater than 10 days have the browser object close the game.

    Not super advanced, and can be worked around but might do for your purpose.

    But in this case, users would only need to change the date on their computer to access the game again, right?

  • Are you using any arrays or dictionaries, do you have files imported to your project?

    If not, just think of something that is important in your game. For example, player position on start of the level. Or the number of enemies, or their LOS distance etc.

    Let's say your player position should be (200, 420). Create two variables PlayerStartX=9999 and PlayerStartY=9999. Set player position to (PlayerStartX, PlayerStartY) on start of layout.

    Put the correct values 200 and 420 into the file on your server. Request this file on start of the game, read values into PlayerStartX and PlayerStartY variables. If the file is genuine, your game will work correctly. If the file is not available, or if it contains wrong data, the player will spawn at (9999,9999) and your game will not work. It will look like a bug, and any potential hackers will have a hard time figuring out what's wrong.

    This solution is really good, but the cross-domain problem makes this possibility unfeasible since the game files will be on another server and not on mine.

  • I wouldn't actually go for the approach of AJAX requesting a file - if you want it to work in preview, you have to configure the AJAX response to work cross-domain, and if it works for any domain, the protection is no longer effective.

    As in my case I have to send the files to the company to do tests on their server, the AJAX solution will not do because of the cross-domain problem. It would be great if there was a trial mode option, that I could configure, for example, that the game could be accessed for 10 days

  • So the most robust method is to read some actual data from the file, without which your game will not function properly. Like the inventory array, or some config values, or tilemap JSON etc. So even if hackers substitute or disable the file check, they will not be able to play the game without that data.

    Do you have any example of this solution?