Fengist's Forum Posts

  • Is your sever Https ? (Secure server)

    It is not. And apparently that's exactly why the 'unsafe scripts' icon on chrome popped up. Well, at least until I get a cert I can at least bypass this blocking.

  • Ok, so I did some digging in the Apache logs and discovered that any time I made an ajax request from the C3 IDE, it wasn't even hitting the server. Run locally on the server, the GET requests were logged with no errors.

    Since you guys say it works, I got to looking at the browser as a problem. Sure enough, one tiny little icon in the top right corner of Chrome notified me that this was an 'unsafe script'

    I clicked on that, and the project did a proper ajax request and I got the proper response back

    Since this script blocking didn't occur when run from html5 uploaded to the server and only occurred when running from the C3 IDE, I'm going to assume that my visitors aren't going to have this same issue with script blocking. Otherwise, them trying to spot that little warning icon is going to cause them to quickly give up.

    Thanks for the suggestion guys, you put me on the right path.

  • > Is there something about C3 on construct.net that prevents ajax from working?

    Defenitely not, as it works for me. But it´s hard to tell what´s wrong here. The file could be cached for example, try opening it in your regular browser and hit Ctrl+F5 to force it to reload and try again. But it should defenitely work since I don´t have that problem.

    Nope, didn't work. I'll check with the isp tomorrow.

  • Ok, tried the .htaccess and that didn't work. Tried adding both lines to the php, that didn't work either.

    Is there something about C3 on construct.net that prevents ajax from working?

  • I use a .htaccess file for this.

    Header always add Access-Control-Allow-Methods: "GET,POST,OPTIONS,DELETE,PUT" Header always add Access-Control-Allow-Origin "*"

    Thanks, I'll give this a try.

  • Ok, a long time ago I had this problem solved with C2. Now, I'm scratching my head again.

    Doing just a simple Ajax request to a php script.

    <?php header("Access-Control-Allow-Origin: *"); $myfile = fopen("newfile.txt", "w") or die("Unable to open file!"); $txt = $_POST; fwrite($myfile, "Post: ".$txt); fclose($myfile); echo "Success"; ?>

    If I export the C3 project to html5 and upload it to the server where this script is, it works as intended. If I try to run it via the C3 preview it gives an Ajax error in C3 with no Ajax.LastData.

    Obviously, this has something to do with cross site but I was under the assumption that the php header would fix that.

    Any ideas? I really don't want to constantly export and upload a project to live test it.

    Tagged:

  • Is there a C3 version of this?

  • I dont know how much I should be saying here, but I did buy the signalling server code.

    The code is minified, so its pretty hard to modify. I have, for my own personal use added in a basic login via sql. It took me less than an hour of formatting and poking around to understand what was going on with the code to be able to start adding my own functionality. (hint: js code formatters are helpfulllll)

    I hope this helps!

    Thank you. That's what I wanted to know.

  • So, I'm guessing this means that nobody knows the answer to this question and therefore I shouldn't waste my money since the dev's apparently have no desire to release any of their MP protocols.

  • Furthermore... and I just noticed this... the Scirra signalling server sends out the IP addresses of everyone connecting. The dev's of RUST learned the hard way that if you have a game and you broadcast the IP address of players, other players will DDOS them with pings just to make them lag out. Don't you just love how desperate some people are to massage their egos with a win?

  • The signalling server offered by Scirra is wholly unusable for my purposes. There's no method of controlling users logging into the game (like an SQL database) and there's no way to start and stop hosts if you don't want the game hosted by a player.

    I've been playing around with a wss client and server in C#, connecting to the public signalling server with no major issues and it appears that writing my own signalling server part wouldn't be that difficult.

    Therefore, my question is this:

    Does anyone know how readable the js code is for the signalling server?

    What I'm hoping to accomplish is to create a signalling server that starts a 'host' client for players to join as peers and then, pass off to the multiplayer control and allow the host to serve the game much the way the current signalling server does.

    In order to do that, it would be real handy to be able to read the signalling server code (since Scirra hasn't released their wss sub protocol standard).

  • Well, this can be done by using built-in multiplayer plugin like in this template.

    The server can be represented as a stand-alone application or even a browser window. Moba games usually have only ten players in each room, so it will not be a problem for C2.

    See my reply above. The question is, can it handle upwards of 150 moving objects and 16 players and all the settings needed for those objects?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • A LoL/DOTA-style MOBA or RTS is pretty ambitious using these technologies. I think you are going to run into two major issues:

    Message rate limitations: In my experience, trying to send more than a few messages per second to a php/MySQL server will quickly overwhelm your server, as it has to receive the message and read/write to the hard disk synchronously every time. In something like LoL or a traditional RTS, each player might clicking several times a second, and each of these might generate a message to the server, quickly overwhelming it. This is just for a single game. If you have 10 games going on simultaneously, each game might require its own server, quickly driving your costs through the roof.

    Lack of an integer data type: Because of the large number of units involved, MOBAs and RTS games don't try to send the entire game state over the network. This would require gigabytes of data every second. Instead, they only send player inputs, and each computer is responsible for computing the results of all of the inputs. This requires a deterministic computation. To do this, you really need to be using integers instead of floating point numbers. Because it runs in a browser, you don't have direct access to integer data types in Construct, and this will introduce errors and inconsistencies between different player's computer's versions of the game.

    Hi and thanks for the input. Right now, what I'm looking at is a 8v8 moba. Each of those has speed and direction to be determined. Each of those can also fire up to 8 bullets each, 1 'direct fire' weapon and one semi-tracking weapon. Naturally, other data will need to be kept track of such as hit points, a shield and energy. While most of the time it won't have all of that on any one client's screen at a time, it is a possibility. Now, I know for a fact that UDP can keep up with this kind of data as it'll be a variation on a much older game that used UDP. What I'm concerned with is whether a NW.js game server and a C2/3 Web client can handle this kind of information using the multi-player plugin. Unity could do all of this with a lot of power left over. But creating a win/linux/mac client for it and writing code in c# is a nightmare I'd rather not deal with.

  • Ok, so here's my basic idea for a game and I'm trying to decide if it'll work in C2/3 or if I need to slog through Unity.

    The game is basically going to be a moba. There will be a login/matchmaking server. Once a client readies up for a game and the matchmaker finds players it will create and start a game server. Clients are then transferred from the login server to the game server. Once a match has ended the clients are transferred back to the login server and the game server shuts down freeing resources (think LoL or Dota2). I definitely don't want this to be a p2p multiplayer. I want it server controlled.

    I think I know how this can be done using C2 with Ajax, PHP and MySQL. What I'd like to hear is how you'd approach this type of configuration using C2/3. In particular, how you'd handle the game server. Would you do an NW.js export and just have PHP copy and run the game server or ????

    Thanks

  • Tetriser Winds3d to model, export as .obj. DazStudio to animate. And, if you decide to work in 3D, I know for a fact the models look just fine in Unity.