JohnnySheffield's Forum Posts

  • Well, with Chromium alone, you can't do much more than with any other browser. The "power" comes when you add node.js to the mix. Nodejs adds whole "real" platform feeling.

    It's all in the name node-webkit (node.js + chromium webkit = node-webkit)

  • It's more than possible, you can check here for one way to do it. I implemented shell in my node-webkit plugin, but haven't tested it thoroughly. There are other ways to do it, here's one of the possible ways

    GeometriX Node-webkit is not entirely browser environment, it's much more than that. Node-webkit is an app runtime based on Chromium and node.js, which means it can do anything that Chromium can, and also it can do anything node.js can, including creating servers, deleting all of your hard drive, and much more.

  • Develop and debug web services

    Ngrok is a secure reverse proxy that exposes a locally running web service to the internet and captures all traffic for detailed inspection and replay.

    ngrok.com

    Ran into this tool, looks helpful.

  • <center><font size="6">SockJS</font></center>

    Sockjs can be used as an alternative to official websocket plugin or socket.io.

    As we wait for a Socket.io 1.0 I've decided to put my efforts on SockJS plugin. Because of the design of sockjs library, the plugin is almost identical to the official websocket plugin, but enables you to use all advantages of sockjs. There's more work to be done, if you are using this plugin, please report back on how did it go.

    From the official SockJS readme:

    SockJS is a browser JavaScript library that provides a WebSocket-like object. SockJS gives you a coherent, cross-browser, Javascript API which creates a low latency, full duplex, cross-domain communication channel between the browser and the web server.

    Under the hood SockJS tries to use native WebSockets first. If that fails it can use a variety of browser-specific transport protocols and presents them through WebSocket-like abstractions.

    SockJS is intended to work for all modern browsers and in environments which don't support WebSocket protcol, for example behind restrictive corporate proxies.

    You can find a simple test demo here, and the plugin here.

    If you find any bugs, or have some ideas on how to improve this plugin, please head over here

    For more info on SockJS, check here.

    Cheers!

  • I like the way you think, and i hope you'll manage to get this project in a some stable state...

    Although i respect your decision to get some early thought of the other c2 users, i think it would e the best for the project to get to a more or less stable state before you release anything, or try to get useful feedback form users. A lot of people, a lot of opinions. Sometimes useful, sometimes not.

    On the other hand, release early, release often.

    But, when in doubt, C4!

    I'll follow this thread carefully, sounds like you have something here.

    ---

    oohh, i forgot, i even did a simple plugin for writing udp servers in C2, if anybody is interested, here's the thread.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Servers written in C2 have already been done.

    It was a just-for-fun project, if this can be helpful for this idea, i'll release the code!

    Good work, it's interesting to see where C2 is going!

    edit: ahh, sorry, looks like you aren't using nodejs.

  • Kyatric's plugin is the only way i know of to make your ajax post's more or less secure.

    Your server should be sure that your post (and its parameters) came from your application, and from nowhere else.

    The only "secure" way to do this is HMAC (http://en.wikipedia.org/wiki/Hash-based_message_authentication_code). Sounds complex, but basically very simple.

    Your application signs request parameters with standard parameters and sends a hash (aka message digest). Hash to compute the parameters themselves + a shared secret key (it is very important that the key is not public, and known to both sides who want to safely talk, but no one else).

    So if you're using php on your server, you should call savescores.php (preferably POST request) and post some data like:

    • Name
    • Score
    • Hash

    variables. Hash should be generated before posting (in php code):

    $ Str_params = $ name. ''. $ Score;

    $ Hash = hash_hmac ('sha1', $ str_params, SHARED_SECRET_KEY);

    (Only would you have to do it in JavaScript, that's where kyatric's plugin comes into play)

    PHP then gets all the POST parameters (each variable separately + hash), and has at its (the server) side to make verification hash (digest).

    Server side doing so generates hash (digest) in the same way as the client (with the received variables).

    And, if the received hash generated hash is equal that means that the parameters sent to the application came from your client (because they signed the same secret key which is known only the application and server).

    If the hash is not identical, that means that someone is trying to cheat (or extremely, that you didn't generated the hashes in a correct way)

    Now, the problem is how to get the SHARED_SECRET_KEY to the client?

    You should think of an ability to send a key to the client without anybody knowledge. (Because if you use Ajax, then again, everyone can read it) - namely, how to pass to c2runtime a SHARED_SECRET_KEY, and that no one else knows? Server it should not send Client, otherwise the whole thing falls apart!

    Take this whole post with a grain of salt, i'm sure there are better ways to do this, but i don't know them!

  • Guys, regarding node-webkit and "real" full screen performance, there was an interesting conversation on the nw mailing list;

    groups.google.com/forum

  • You can check out here for a decent starting point for a geolocation plugin:

    link

    It's still rough around the edges, but it believe it'll save you some amount of time.

    Cheers!

    edit: to see what i've added to the Podes version, check this link: link

  • Ashley

    Regarding this topic, what's the license on the official plugins?

    I think license info on the official plugins would answer most of these questions!

  • It's an interesting watch.

  • If you're into some kinky stuff with node-webkit, i would recommend going through nw wiki and node.js api.

    If that doesn't satisfy your needs, dig deeper into chromium.

    That's about everything you need to enjoy node-webkit fully.

  • Ashley, got a quick question for ya.

    Why are you using this:

    var slash = "\\";

    path = require("path");

    if (process["platform"] !== "win32")

       slash = "/";

    Wouldn't it be better/efficient/sexier/insert-adjective-of-choice to use path.sep instead?

  • If i try to connect to the test echo server (ws://echo.websocket.org)

    it still throws the same error.

    When i type anything in the "protocol(optional)" field and try to connect to the echo server, the error won't show up and the "On connection error" gets triggered.

  • There were some efforts building node-webkit for pi, but haven't heard were there any successes. You can find some info on the nw mailing list.

    Regarding pine, i was following their git few months ago, druring the ownership transfer between some guy that started pine and the current maintainer but haven't seen any updates in months. thehen did you hear some fresh news about the pine project?

    I have one pi for some time now, but i didn't really succeed in running an c2 app with decent results. I tried html5 export, with standard pi linux and chromium for pi. If anyone wants i run some test on pi, please contact me!

    Cheers!