WackyToaster's Forum Posts

  • I´ll help with german. I´m still waiting for paypal btw.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try this, no warranty. If you alter the coins by more than one, it will reset the coins. (Press c to try it) But I´m pretty sure if you are dedicated you will be able to cheat anyway. But it´s probably enough of a scriptkiddy speedbump. <img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes">

    https://drive.google.com/open?id=0B7-sv ... 2ZwdEtRaEk

  • I suppose that´s because you have to wait for the ajax request to complete. There´s the "On ajax completed" trigger, inside there you then can use the AJAX.lastdata

  • Well it depends on what your game does. Specifically, what values do you worry about beeing cheated? Score? Player health?

    I see there are two categories: Static and Dynamic values (that you want to protect)

    Static values you can theoretically compare to a different static value, so in case someone tinkers with said value (e.g. Player jump strenght = 9999) then the event "Player jump strength = 123" would not be true and anti-cheat would kick in. Consider though, that a cheater might be able to adjust both values, so I´d make the second value be send from a server, rather than beeing inside the app.

    For coins (dynamic value) I´m not sure what the best method is. You probably want to check for "was that possible?". E.g. having coins always go up by 1, it´s not possible to suddenly go up by more than one coin (indicating cheating) Also you could use a server, that instead of counting the coins up, you send a request to the server, and the server then responds if the coin pickup was legitimate. Only then you count up the coins. You also likely have to use some protection for that so someone can´t simply fake the server response. That could probably be done using sessionIDs and hashing + salting.

    I´m no expert on that subject though, take it with a grain of salt. But maybe you can google some of the stuff I said and find a solution.

  • Well, you can do that pretty easy without any plugins.

    Make a php file on your server.

    <?php
    $t=time();
    echo($t);
    ?>[/code:8bui4z18]
    This will output the unix timestamp. You can then convert the timestamp using "date()" (Refer to this for how to do it:
     (php.net/manual/en/function.date.php)
    
    Then request the file via AJAX. Using AJAX.LastData gives you the output of the php file. Then you just have to compare the result to whatever you consider day or nighttime. Don´t forget there are timezones and it´s not everywhere day or night    not sure if that matters for you though.
  • post the code with the function, that makes it much easier to see any possible problem

  • Not sure if that´s the issue but I think you don´t need the ' things and they might be the problem already. Try this.

    "fname=lance&input=" & chatinput.text[/code:p4op1j99]
    
    [code:p4op1j99] On AJAX completed --> browser.log AJAX.lastData[/code:p4op1j99] will give you the server response. Maybe there´s a hint there. Maybe you can try calling this from a browser (not sure if you have to use GET in this case instead of POST) and see if that works.
    
    Also I recommend using mysqli instead of mysql, escape user intput (mysql_real_escape_string) and use prepared statements. (It´s sort of a pain but once you understand how everything works it´s no big hassle)
  • Probably because ON TOUCH only fires once. Try IS TOUCHING

  • I used Phonegap but I kinda didn´t like it because of some error.

    I then switched to Intel XDK that solved that error, but as you mentioned it will be shut down.

    In the end I took a day to work into Cordova CLI and I´m done with build services (unless the C3 ones are good, since it would be a first-party build service)

    The main problem I see with build services is the fact that they end up using Cordova anyway, but add another instance (their whole service and programs) that can cause errors, not to mention you either have to work around them or are at their mercy to fix them. In my case Intel said they cannot fix it because it would cause a security issue on their end and they just didn´t want to.

    I also heard good things about Cocoon, but right now I don´t see a reason to switch.

  • I personally use a finite state machine for this. Basically you have a global variable that changes depending on the current state of your app. In your case you have two states, the "normal" state and the "confirm_dialog" state. Once the confirm dialog shows you change the global variable to "confirm_dialog" and check the condition of the variable.

    http://gameprogrammingpatterns.com/stat ... the-rescue

  • I´d like to but no Paypal so far. But anyway, right now it´s basically an "Early Access" thing and I´m not a fan of such a concept (There are simply some inherent problems with it) Since Paypal is a few months down the road, I have to wait and until then and that´s fine. Right now C3 is just C2.5 because it still uses the C2 runtime, once the C3 runtime drops C3 will hopefully start to shine. I hope the C3 runtime comes out before Paypal. I will most likely switch because C3 has some stuff that I really like and I don´t mind the subscription model, not to mention I get 50% off the first year. It´s a no-brainer to at least try it for a year.

    EDIT: Since I saw a bunch of people mentioning it, I also have one bigger project in development that I cannot port because of 3rd-party-plugins and I defenitely wouldn´t port it into something this early in development anyway. But it would defenitely suffice for prototyping / fooling around with ideas, that is what I mostly do apart from said big project.

  • As I said, the default plugin doesn't work on mobile. The one I linked you does, as long as you use cordova for export. I personally would avoid any kind of login as long as it is not absolutely necessary! So just out of curiosity, why do you need the login?

  • I just tried reaching your file with ajax and it seems that it actually is CORS that blocks the access. Since you included it in the file it is potentially overridden by the server.

    You can try to upload a htaccess file. Write the stuff below into a textfile, rename it to ".htaccess" (without "") and drop it next to your php files. Or ask the hoster. For testing, you can also disable the CORS in Chrome.

    <FilesMatch ".(php)">
    	Header set Access-Control-Allow-Origin "*"
    </FilesMatch>[/code:16q0ny3a]
    
    Or you can switch the hoster ofc  There´s some pretty cheap ones out there.
  • There is also mysprite.count that does that.

  • I think you have to use this plugin "rgbaAt(mouse.X,mouse.Y)"