Fengist's Forum Posts

    I think you are right

    Actually I was thinking about the gamee jam competition. In it, only multi-player games can be submitted

    Ah, now that's a different story. Their plugins handle all of that. As a matter of fact, if you read their FAQ, you'll find out that you can't use Ajax, Websockets or Multiplayer Plugin for that. You can't make any external connections.

    And, it can be multiplayer, single player or fake multiplayer.

    So, you're back in the ballgame.

    And just as a piece of advice. Creating multiplayer apps is not for the faint of heart. Managing multiplayer communications is a science unto itself. If you're still relatively new to writing code and Construct in general, I'd recommend creating several single player projects and work on making them successful before even attempting multiplayer.

    I'm going to go out on a limb and say that C3 could do this but. You'll be writing a lot of custom JS code to achieve it.

    C3 projects have 3 major ways of connecting to other systems.

    • Ajax
    • Websockets
    • Multiplayer Plugin

    With Ajax you're sending requests to a server and getting responses back.

    With Websockets, you're connected to a server and sending data back and forth.

    With Multiplayer, you're communicating with a signalling server to find matches and then one player becomes the host/server for the other players to join.

    The Multiplayer Plugin would work well on a local network as you're looking to do as latency would be low. However, you'll still need the internet to contact a signalling server and match the players to each other. Once they're matched, the app that's hosting the game takes over.

    Trying to create a multiplayer system that would only function on a local network without the signalling server would require a LOT of work as you'd be writing code defining ports, communications protocols and handling the network traffic back and forth to manage players. Essentially, writing your own plugin.

    There may be another way to do this and someone may give you a better answer, but I'm not aware of it.

  • Make sure your CORS headers are correct so that people can't access your server side files from say, a browser.

  • If you want even more accuracy without a timer you can store Browser.ExecJS("Date.Now()") in a variable when the layout starts.

    Then, you can Browser.ExecJS("Date.Now()") - variable = milliseconds since the layout started.

  • Put the music on a 'global' event sheet that you include in all your others.

  • If you launch C3 through the browser like you do, it runs the latest version. We've been talking about when it gets installed as an app on your desktop.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That will work but...

    I suggest a timer that starts when they press the up arrow. If they don't get the cheat code done in say 2 seconds, it resets the cheat code.

  • Woops, Ashley beat me to it.

    Run the first instance by running preview. Then, hold ALT and run a second preview.

  • Fengist brother, how to set up automatic backup in browser???

    It's in the main menu under settings, save & backup / periodically back up active project. You can set it to backup to the cloud but, like you, it takes a good while to back mine up so I tell it to backup to the browser every 10 minutes which is much faster.

  • I'm going to seriously recommend you set automatic backups to the browser as well. I work on two different computers and save to the cloud as well. Yesterday, both failed to download and run my project. Fortunately, I went to the one I worked on last and loaded the local backup and only lost a couple lines of code.

  • Thanks for the input guys. Obviously I have a bit of homework to do.

  • I recall a few years back digging through the files for Eve Online. One file I found was thousands of lines of text and it was all the credits given for the libraries they used to create their code. Much of the music in the game when it first came out was also a case of being public domain licenses. Any time you can use a free resource without compromising your standards, why not? Locating resources like that isn't difficult. Audionautix.com has some great music that you can use. And YouTube has music and sound effects you can add to your game. There are plugins here that you can use and there's a lot of JS scripts out there that you can plug in to make your project really unique.

    But I am going to agree with oosyrag when he says that the visual aspect of your game is it's heart and soul. If you're creating your first game sure, just use whatever works and doesn't cost you anything. But, when you're ready to take on the public, first impressions are lasting impressions. You'll have to decide which public assets you can get away with re-using and which you're going to want to be unique.

  • Thanks Nepeo for the detailed reply. Here's what I'm seeing: Every server-sent connection using PHP (blocking asynchronous) creates a new process on the server and holds it. If you get 1000 people playing, that's 1000 processes just for the outgoing chat, nevermind the Ajax calls for incoming messages.

    Long and short polling, using PHP have the same problem. Each call to the server creates a new process.

    Now I've had a short poll PHP chat up and running on my server and working perfectly inside the HTMLElement plugin. You said you had short poll working on a commercial product but how many polls per second can Apache really deal with? I understand Ngix works a bit better in this department but thats a whole new ball of wax. Either way, it still seems like a lot of processes firing up and shutting down on the server.

    Ashley I'm leaning toward your thinking but... I had to watch a 'noob' video on node.js just to figure out how it worked. Yea, I'm that js ignorant. So, for me, it would be easier to create a C# ws server using a library I found called Fleck and try to compile it under monodevelop for Linux. Problem there, that's going to require a virtual server somewhere that I'm going to have to manage. I tried to install a basic node.js web server (the example one) on my current host and got slapped. My host politely informed me that I'd need a virtual server for that too.

    Right now, the only thing I've found that may be a viable solution that's not going to require me managing a server (I haven't played with it yet) is a PHP library called React.

    Of course, money solves many of those issues I suppose.