0 Favourites

Performance relating to machine running cs2

  • I have been busy with a RTS engine for space games and its working very well.

    During some tests and trials with multiple computers I ran into this this strange oddity which I accidentally discovered only effects the machine running the construct 2 application.

    Example/info:

    I tend to start the host when I launch the previewer from the construct 2 app.

    I was testing the host CPU usage, when 2 players had each roughly 15 vessels ....

    The peer was/is on another computer in the same network.

    The host runs smooth, up until the peer connects and then it somewhat seemed like ~30-40% more CPU usage then the peer.

    Which annoys me, as I have designed my engine to distribute the load between peers and host.

    I had expected the host and peer to run with about the same CPU %, which it didn't.

    After some pointless tweaking and restarting the previewer I accidentally made the other computer in the network the host, making the computer having the construct 2 app, become peer.

    Surprise surprise .... the peer (computer with construct 2 running on it) suddenly had the ~30-40% more CPU usage then anticipated, and the Host on the other system, ran with the low CPU usage, which I was expecting in the first place.

    Sooooooo ......

    I hooked up another system in my network, and started a game between 2 computers in the network, not including the computer running the construct 2 application.

    And wow ... the game ran smooth as can be ... both systems low CPU usage .... as expected ....

    But now my questions is, why is this ? how come the system running the Construct 2 application adds to the CPU usage ?

    Perhaps I am overseeing something obvious ...

    TLDR;

    A system running the construct 2 application, adds quite a bit of CPU % usage to the CPU usage indicator in the debugger.

    At least where multiplayer is involved and a peer connected.

    Why ?

  • Lol, haven't a clue, but possibly because preview is a premium feature, it might have multiple processes running in background???

  • Lol, haven't a clue, but possibly because preview is a premium feature, it might have multiple processes running in background???

    The only thing I can even remotely think of is that the previewing browser sends a lot of calls back to the http server. Perhaps this communication stream is interfering when the multiplayer plugin is in play.

    @Ashley, Any ideas ?

  • No idea, your best bet would be to run the profiler in Chrome's dev tools and see where JS time is being spent.

  • Are you checking cpu usage with debug/profiler or using the cpuutilization text?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Are you checking cpu usage with debug/profiler or using the cpuutilization text?

    That should not matter, as it only occurs on the machine running construct.

    I will do some JS browser tests later on.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
331 35,569
Lordshiva1948's avatar
Lordshiva1948
Unread hot topic
157 12,692
megatronx's avatar
megatronx
Unread hot topic Locked topic
112 7,118
Ashley's avatar
Ashley Construct Team Founder