GameThirsty's Forum Posts

  • Hello.

    This should be the PHP file that you need.

    It worked for me, make sure you have a folder where the PHP file sits named "user_photo", or change the directory name.

    <?php

    chdir('');

    $img = $_POST['photo'];

    define('UPLOAD_DIR', 'user_photo/');

    $img = str_replace('data:image/jpeg;base64,', '', $img);

    $img = str_replace(' ', '+', $img);

    $data = base64_decode($img);

    $file = UPLOAD_DIR . uniqid() . '.jpeg';

    $success = file_put_contents($file, $data);

    ?>

  • Hey Ribis,

    Try using this example I scrounged up-

    Make sure you have a web server, such as WAMP server on your local computer.

    Be sure to use the SQL document and import it into PhpMyAdmin or what ever MYSQL administration you use.

    Export and upload your project, as well as the PHP files.

    The test username and password should be: test01

    https://www.dropbox.com/s/8nqacjhm2otwrun/RegisterLogin.zip

  • Are you exporting to CocoonJS?

  • bump - help appreciated. It makes or breaks my app I would like to get it working with CocoonJS.

  • delgado

    You just have to change the 2nd event to this: Highlighted in red.

    It was originally using "cursor" inverted. This method works, I tried it on CocoonJS Export.

  • I did a little bit of research, I found Ludei's source code for their Facebook extension. Is there a way we could make this into a plugin in CS2?

    Im sure many other developers are waiting for a working CocoonJS plugin with Facebook API.

  • You could create a multiplayer-like game using PHP, MYSQL and AJAX.

    The concept is to store the players information (x and y axis, and possible their angles?) inside a MYSQL database.

    In order to achieve this, you send an AJAX post to your webserver with a PHP file posting the current position of player and their angle to a MYSQL database.

    On the other hand, you can call an AJAX request to a PHP file bringing in the new values of players x and y axis and their angle, giving the multiplayer-like effect.

    This coupled with a simple login feature, you could have the basis for a simplistic online game.

    As you said Facebook, using the Facebook plugin feature, you can store the players Facebook ID, which is unique and you can use that to store a players information.

    Example:

    ID: 1 (primary key, auto increment)

    Player ID (Facebook ID) (unique key)

    X_Position: 650

    Y_Position: 190

    Angle: 90

    The above could be your MYSQL database layout.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • anyone have an answer?

  • bump

  • bump

  • Hello fellow CS2 developers!

    Is the Facebook API that CocoonJS has an example of working with Construct 2 as of yet?

    Or is there a way to use Facebook Login implementation with CocoonJS? Besides Clay.IO plugin

    I haven't had any luck trying to find the answer to this

  • Im back, and I have made some progress!

    I used the following routine to on clicked textbox, it checks to see what the window size changed to, and divides that by 2 to get the halfway mark. The width stays the same half way mark, because the width did not change from the keyboard. I then set a variable to set the current value of the window size (which is the window size with the keyboard up) then once the user backs out of the keyboard, the window size changes, and I compare the value when the keyboard is up to the value when the keyboard is down as you see in the second event, and scrolls accordingly.

    Here is what my phone looks like with this method put into play:

    As you can see, its close! but not quite perfect, there is more white space when you backed out of the keyboard on top of the textbox, then when the keyboard is up. The event also has a wait of 0.75 seconds, it seems like the events inside the clicked on textbox gets ignored, because their is a slight delay from when the keyboard pops up, so I have to compensate for that delay by delaying the rest of the events by 0.75 seconds. That seems inefficient. Is there a way I could make it happen instantaneous? Because the user can see that delay it takes to scroll.

    Edit: However, I tried it on a bigger phone with a bigger screen width & height, and my current system breaks and does not work.

  • Hey there, I took your advice and this is what I got with Scale inner as full-screen in browser, and system scrollto textbox and also unbound scroll set to YES.

    The result is this: It seems to leave a huge gap inside my app