JohnnySheffield's Forum Posts

  • I don't think this is stupid effect at all.

    You provided a great way to enable colorblind people enjoy c2 games much easier.

    <img src="smileys/smiley32.gif" border="0" align="middle" />

  • I've just encountered this yesterday, i use the "Tilemap.x+Tilemap.width/2" so things don't break if i change size of the tilemap.

  • Fimbul

    Well, you actually kinda have the node.js exporter, thanks to the great guys at node-webkit. Nothing stops you to create a C2 written nw app, that runs in background and acts as a server. Just ignore the webkit part of nw, and use just node.js part. Put that on a pc with a public ip and you're done.

    It's not the usual way someone would host and run node.js servers, and i don't recommend to do that, but hey, you can write a fully pledged http (or udp or tcp or etc) server in C2, it just comes with a backpack filled with webkit.

    Also, i'm kinda amused with this all fuss about multiplayer coming to C2. It's already here; there are 2 official and about 5-6 unofficial plugins for about a year now (or more?) for creating different kinds of C2 multiplayer games. They are just not called "Multiplayer" and one has to be resourceful in using them.

    I'm really glad when anything gets official support in C2, so cheers to Scirra on this announcement.

    WebRTC!

  • You can use the browser's object domain or url expression to access the current domain or URL.

    Then decide which API you want to talk to.

  • Ok, i'll give you few hints where to start, and hopefully you'll finish this edit on your own.

    Open up folder where facebook plugin is, and open runtime.js in notepad++. First we'll have to ask user for a permission to access email. Scroll to the line 232 and add this line of code:

              if (fbCanPublishStream) {

                   perms.push("publish_stream");

                             // ask for email access

                   perms.push("email");

                   }

    You'll have to request 'publish to stream' in C2 to get access for email in this case.

    Then we'll throw the email to the log somwhere on the line 55 where you'll see this:

    function onFBLogin()

         {

              if (!fbLoggedIn)

              {

                   fbLoggedIn = true;

                   fbRuntime.trigger(cr.plugins_.Facebook.prototype.cnds.OnLogIn, fbInst);

                   

                   FB.api('/me', function(response) {

                                       fbFullName = response["name"];

                                       fbFirstName = response["first_name"];

                                       fbLastName = response["last_name"];

    /// we'll access email here, if you want to have it as expression inside construct do it same as for first_name, or last_name. Don't forget to add an expression in edittime.js

                                       console.log(response["email"]);

                                       fbRuntime.trigger(cr.plugins_.Facebook.prototype.cnds.OnNameAvailable, fbInst);

                                  });

              }

         };

    That's about it. you have access to email. As for getting email as an expression inside C2, i left that for your enjoyment in exploring the beautiful C2 sdk. :)

  • Maybe this could help:

    dpi.lv

  • You can try with:

    Every tick -> set layer 0 angle to Touch.Gamma degrees

    Check here for more info. (Look for Alpha, Beta, Gamma expressions)

    Here's a simple capx

  • not sure are you talking about websockets or socket.io.

    but for websckets you can check here for some additional info:

    caniuse.com/websockets

    en.wikipedia.org/wiki/WebSocket

    websocket.org/echo.html

    (protip : open up websocket.org/echo.html in your browser and you'll see does it support websockets)

  • Hey man, i'm wainting for a new version of C2 to download, so i cannot open you capx, but i think this should get you going in the right direction:

    Your php could look something like this:

    <?php

    header('Access-Control-Allow-Origin: *');

    $variable1= 100;

    $variable2 = $variable1;

    echo $variable2;

    ?>

    the header is here to enable CORS, so you can test this from localhost, echo is actually returning the variable value when the ajax call is made.

    So in construct you can do:

    ----

    global variable "ConstructVar" = 0;

    on trigger -> AJAX request URL "http://mydomain.com/variable.php" (tag "php")

    On "php" completed -> set ConstructVar to Ajax.LastData

    ---

  • Arima: +1

    I dislike when people do the +1 thing, but i don't have anything to add, and i need to express my support. Kudos on the detailed post and persistence.

  • I've tested some c2 apps in chrome for pi on raspbian few months ago, it didn't do well. Back then, there was no webgl support so it was a showstopper.

    I have no idea what's current status on webgl support in chrome for pi. Also, i spent only hour or two setting up pi, so maybe my settings were wrong.

    Maybe somebody did tests on more recent chrome?

    if anybody wants me to run some C2 tests on pi, i have one in the office :)

  • If anybody is interested, and feel good to dig in, here are some links to go through, i've just found about this, and it seems interesting:

    Main issue on the nw git:

    https://github.com/rogerwang/node-webkit/issues/193

    compiled node-webkit on hardkernel odroid-x2 (cortex a9) as armhf binary.

    https://github.com/toxygen/armhf-node-webkit

    natively compiled on the pi:

    https://gist.github.com/albi90/6135922

    Cheers!

    edit: when i think about it, maybe this belongs to open topic section of the forum :/

  • I'm afraid not, you'd have to write custom plugin/s, or "external" nodejs code to handle spawning and communications.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • First thing that crossed my mind:

    Maybe try to listen on the input on one instance of the game (the focused one) and pass the player2 commands to the other, un-focused instance?

    If the player 2 game is rendering although it's not focused (and i'm pretty sure it will) maybe you could hack something up.

    You can try to spawn/fork player2 game as a child process and using child.send(message) make them communicate.

  • You could use the "execute javascript" action available through browser object instead of this plugin. As a bonus, it works in preview!