How do I start a server in command line mode

Get help using Construct 2

Post » Mon Jun 13, 2016 3:05 pm

Hi everyone,

I have designed a multiplayer game that uses an authoritative server back-end. I am currently hosting my server instances as running web page game instances in my cloud and I was wondering whether there is a better way to do this.

My server is based in Germany but to quickly show you what I mean I have run some server instances on localhost.

I was wondering whether there was a better way of doing this. As you can see I am currently running 5 server instances but this feels more like a hack than an actual server set up. Is there a better way of running server instances, maybe in command line or something similar that has minimal overheads and no graphics rendering.

Posts: 7
Reputation: 214

Post » Thu Jun 16, 2016 4:11 pm

localhost is the domain for YOUR computer. Not a remote server. If you want to run a server on your computer, you need to install a web server software, like Apache Web Server, etc.

Do you have the IP or URL for your server? For example, our domain URL is
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
Posts: 1,414
Reputation: 4,822

Post » Fri Jun 17, 2016 7:53 pm

I know localhost is the address to my computer, I have 7 experience with game design you know :P. That was just an example, I have cloud servers based in Germany, please read my question better, I need to make the server runs in a minimal environment such as a command line to reduce overhead. The closest I've gotten NW.js but if anyone knows any better solutions I'l be grateful.
Posts: 7
Reputation: 214

Post » Fri Jun 17, 2016 9:08 pm

He's talking about a headless server to run as the host for multiplayer games.
The answer is no.
You can however create a c2 app that is minimalistic to run separately from the real app.
Image ImageImage
Posts: 8,224
Reputation: 105,067

Post » Sat Jun 18, 2016 4:45 am

The closest I can think of is to make a copy with all the content removed or unloaded from your game. Then you can run it in NW.js (or keep running in a browser).
The problem is NW.js is window based, and C2's multiplayer can't deal with multiple instances, so you'd have lots of windows open, and any overhead NW.js (just running it) has would be multiplied. Also as far as I can tell NW.js doesn't support running multiple instances by default.

In regard to rendering, you can't remove objects from the game obviously since it wouldn't sync with peers, and neither can you change the collisions or other properties without desync, so you are stuck with having those objects in. I'm not sure if this would help, but I imagine removing all transparency from sprites would help with decreasing overhead. That or (depending on how Canvas works*) blocking the whole layout with a fill layer to make the program think it's finished rendering when it gets to that layer.
*I have no clue how canvas works.

I'd recommend changing all the settings to their least performance-heavy options. I don't know much about performance, but I imagine this would be the most extreme you could get:
Posts: 165
Reputation: 5,115

Return to How do I....?

Who is online

Users browsing this forum: leandrogenske, R0J0hound and 13 guests