RBuster's Forum Posts

  • 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

  • Try Construct 3

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

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

  • I plan on using AJAX and requesting a text file, and when it is complete, read this file, and compare the text. Do you think that would not be enough? Is it possible for someone to know that the game is looking for this file and even identify it? I would like to use an undetectable process.

    EDITED: This is the code I intend to use:

    + System: On start of layout -> AJAX: Request "http://mydomain.com/file.txt" (tag "file") + AJAX: On "file" completed ----+ System: AJAX.LastData = "PASS" -----> System: Go to Layout1

    One more question: Can't security defense systems (their server firewall / cross-domain browser preventing / etc) prevent this access? If so, how to solve it?

  • I have to send some game files to be tested on a server and I would like to know if there is a way to stop the opening of this game's page, using some system created on C3 that allows me to control this from my server, for example, something that checks if a file is located at a URL (on my server in this case), and if there is no such file the game will not start. It may be that or another possibility that is suggested. Thanks.

  • I am willing... but have limited time today. Will see how tomorrow goes.

    Sure. Thank you.

  • Hi AllanR

    Just checking if you’ll continue to help me complete this demo.

  • Thanks a lot for your help.

    In fact, these data change continuously, mainly because new components will be included later, besides that it is possible to measure various types of voltages (voltage/resistance/etc). I thought about setting these values directly on the multimeter when the test probes overlapped the ends of the components or the nodes that are over these ends.

    Here are the values for this demonstration circuit:

    - battery = 12 volts (I don't know if there will be more than one battery in future circuits)

    - fuse = 5 amps

    - resistor 1 = 100 ohms

    - resistor 2 = 200 ohms

    I would need to check that the circuit is complete, that the components are in order and that some of the wires or components have been disconnected, which can alter the measurement of any component or circuit.

  • Thank you so much for this.

    Regarding the wires, I will need to show in this demonstration how to test the circuit or measure the voltage of some components without one or more wires connected to them. Should this be another way of checking what you just did, or is it possible to include the wires in that check?