gumshoe2029's Recent Forum Activity

  • I am not sure this is possible, nor do I know of any already existing plugins for it.

  • You can get cheap servers in the cloud from places like Amazon Web Services. Their cheapest servers run around 5USD/month, and when you first sign up, you can get a free server for a year.

  • I used JSON for our game. You can use PHP JSON to create JSON strings and ship those to your client via AJAX.

  • You can use an instance variable with context ids. Then you can just do a "Pick by instance variable" on that given object and select all of the objects associated with a given context id.

  • You use the drag and drop behavior for objects, and when A is over position 2, on mouse release you can set A.x and A.y to position 2. Visa versa for B.

  • The FileChooser should be your tool of choice. I am not sure how it works on mobile though.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I am going to throw out there what I did so far, since I just got swamped with work for my primary project.

    capx to test:

    https://drive.google.com/open?id=0B-xiq ... 0VPbHA5WHM

    the unminified c2runtime.js is here:

    https://drive.google.com/open?id=0B-xiq ... DFXekRQYjg

    The key encode function is here:

    (function() {
        function c() {}
        var l = null,
            g = cc.prototype;
        g.Ya = function(c) {
            this.aa = c;
            this.b = c.b
        };
        g.Ya.prototype.Z = function() {};
        g.Ga = function(c) {
            this.type = c;
            this.b = c.b
        };
        var n = g.Ga.prototype;
        n.Z = function() {};
        n.Zd = function() {};
        g.e = new function() {};
        g.Qa = new function() {};
        c.prototype.jm = function(c, b, a, g) {
            b = t.encode(b);
            for (var l = 0, l = 0; l < a; l++) b = b.charAt(Math.floor(Math.random() * (b.length - 1))) + b;
            for (l = 0; l < g; l++) b += b.charAt(Math.floor(Math.random() * (b.length - 1)));
            c.ca(b)
        };
        c.prototype.fm = function(c, b) {
            null === l &&
                (l = new SHA1);
            c.ca(l.hash(b))
        };
        g.ga = new c;
        var t = {
            vc: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
            encode: function(c) {
                var b = "",
                    a, g, l, d, e, k, f = 0;
                for (c = t.lm(c); f < c.length;) a = c.charCodeAt(f++), g = c.charCodeAt(f++), l = c.charCodeAt(f++), d = a >> 2, a = (a & 3) << 4 | g >> 4, e = (g & 15) << 2 | l >> 6, k = l & 63, isNaN(g) ? e = k = 64 : isNaN(l) && (k = 64), b = b + this.vc.charAt(d) + this.vc.charAt(a) + this.vc.charAt(e) + this.vc.charAt(k);
                return b
            },
            decode: function(c) {
                var b = "",
                    a, g, l, d, e, k = 0;
                for (c = c.replace(/[^A-Za-z0-9\+\/\=]/g, ""); k <
                    c.length;) a = this.vc.indexOf(c.charAt(k++)), g = this.vc.indexOf(c.charAt(k++)), d = this.vc.indexOf(c.charAt(k++)), e = this.vc.indexOf(c.charAt(k++)), a = a << 2 | g >> 4, g = (g & 15) << 4 | d >> 2, l = (d & 3) << 6 | e, b += String.fromCharCode(a), 64 != d && (b += String.fromCharCode(g)), 64 != e && (b += String.fromCharCode(l));
                return b = t.km(b)
            },
            lm: function(c) {
                c = c.replace(/\r\n/g, "\n");
                for (var b = "", a = 0; a < c.length; a++) {
                    var g = c.charCodeAt(a);
                    128 > g ? b += String.fromCharCode(g) : (127 < g && 2048 > g ? b += String.fromCharCode(g >> 6 | 192) : (b += String.fromCharCode(g >>
                        12 | 224), b += String.fromCharCode(g >> 6 & 63 | 128)), b += String.fromCharCode(g & 63 | 128))
                }
                return b
            },
            km: function(c) {
                for (var b = "", a = 0, g = 0, l = 0, d = 0; a < c.length;) g = c.charCodeAt(a), 128 > g ? (b += String.fromCharCode(g), a++) : 191 < g && 224 > g ? (l = c.charCodeAt(a + 1), b += String.fromCharCode((g & 31) << 6 | l & 63), a += 2) : (l = c.charCodeAt(a + 1), d = c.charCodeAt(a + 2), b += String.fromCharCode((g & 15) << 12 | (l & 63) << 6 | d & 63), a += 3);
                return b
            }
        }
    })();
    [/code:cfu0wb6o]
    
    The basic encoding scheme seems to be looping through the initial input length and choosing pseudorandom characters from this set:
    ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
    
    I pulled the encode function straight out of the JS, but the length varies and I am not versed enough in JS (or really I don't have the right tools in hand) to trace the input variables back to the HTML.
    
    The key function to trace back out is:
    [code:cfu0wb6o]c.prototype.jm = function(c, b, a, g)[/code:cfu0wb6o]
    and tracing c, b, a and g back out to the HTML inputs, from there you can just fabricate inputs and retrace the steps back down to the encode function.
  • Hey all,

    Courtesy of malinga91 's post regarding non-repudiation of scores, and I have decided to test this out.

    Toby created a basic AJAX client that will make requests back to his server and it is secured using only API keys.

    We are opening this up to anyone who wants to try and crack Toby's security on this test project.

    The compiled, hosted, minified project is here:

    http://tobyr.wtfgamesgroup.com/securitychallenge/

    It is the HTML5 export from Construct2, and just makes a secured request back to one of Toby's API servers.

    The goal is to submit false data to his server and have the server accept it.

    Anyone is welcome to try, please post any successes you have in this thread.

  • gumshoe2029 i choice 96 kbps on import sound game

    Yea, that should not be too bad then... you can try enabling gzip on your webserver, that will automatically compress all outgoing files, which will shorten your load time.

  • BTW: It might be easier to talk on Discord or Skype, so PM me after you read it

    Yea, let's discuss on PM, then post a project definition, then we can post results, etc.

  • then i want to do what you are doing also, but how?

    First, learn PHP. That is the easiest server language that I know of (Google's new Go is supposedly easier, but I haven't learned it yet).

    Then build your game logic inside of PHP and then build your API to communicate with your game client. Then build your client on top of all of that.

    how can you export your game via C2 so that there is a server-side (with all the data, logic, code) and a dumb client-side (with the art and audio)? how were you able to do this? also, is it scaleable? in another words, if your game is hosted on amazon and 10,000 people want to pay and purchase it, does it require any manual involvement on your part for selling/distributing the authentic client to the verified buyer or can they click and download the client on their device without any additional involvement by you.

    You have an API. And it is far more scalable than purely publishing an HTML5 game. PHP is the easiest server-side language to learn. Start simple and stupid, just build a simple API and play with it. Only then can you begin expanding it out.

    http://stackoverflow.com/questions/5298 ... p-and-ajax

    http://blog.teamtreehouse.com/beginners ... t-with-php

    From there, you make AJAX (using the AJAX object in C2) calls to your API, like: http : // yourdomain/doStuff.php?param0=stuff&param1=moreStuff

    as you have pointed out, this is important but unfortunately very difficult (at least it appears to be so, to me). thanks for your continued help on this.

    The central data source is the most sticky issue, but a basic database will suffice for most of your needs. PHP and MySQL play nicely together.

    They even have this bundled for Windows: https://bitnami.com/stack/wamp/installer will install PHP/MySQL and Apache Webserver on your computer.

    W - Windows

    A -- Apache (webserver)

    M - MySQL

    P -- PHP

    Subscribe to Construct videos now
  • No there is no library of keys.

    You build it on the fly as you generate keys.

    No he can't. The same API key will not work for different score value.

    You are assuming you know the value of the score ahead of time.

    Guess the algorithm? That's close to impossible.

    Hardly, there is an entire avenue of science dedicated to exactly this. It is called cryptanalysis. I have dabbled in it, but I am not an expert in this field, sadly. But when your algorithm is as simple as SHA256(score + salt), it is very easy to guess.

    We can make a test for fun if you want. I can make a simple service with API secured with API key and you may take your time to "crack it" (send false data). I'll provide you the JS code so you could try to figure out the algorithm. It will be possible (obviously) as the answer will be in the JS code, I'm just curious how long would it takefor a developer to "break it".

    I actually do want to do this. It would be instructive for both of us. Let me know when your API is active. You're not allowed to have any server-side checks though, since that is what the OP was about. This needs to be a pure JS solution. You don't need to provide me with any code, just send me the URLs/API. I want you to minify it too, just for fun. :-p

    We can even keep the discussion and results in this thread.

gumshoe2029's avatar

gumshoe2029

Member since 4 Mar, 2014

None one is following gumshoe2029 yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies