New this build: the first release of the new Multiplayer plugin! This means for the first time you can now build multiplayer games with Construct 2! This has been in the works for a long time now and we're excited to be able to finally launch the first public beta test of the plugin.
Designing multiplayer games is difficult. It is strongly recommended to go through all three multiplayer tutorials when they are ready, otherwise you will likely be unable to get anything working at all. The tutorials include:
The chat room and real-time game examples now come with Construct 2 so you can try them out. They are carefully designed and well-commented, but the tutorials go in to even more detail.
We are also running a demo game live on the web here where you can see how it works: Play Ghost Shooter: Multiplayer!
The Multiplayer engine is in beta and is not currently available in the free edition. We've run real-world tests already, but as with all new features it's likely there will be issues. There may also be downtime if our signalling server crashes or has other issues during the beta, but we'll do our best to keep it running. Also note the signalling server has a maximum of 50 peers per game for the period of the beta test only, so please don't try to overload it or publish any real games which you'd expect significant traffic from.
Parameter evaluation optimisation
Also new this build is an optimisation to the event system to eliminate redundant parameter evaluation when dealing with multiple instances. Normally a condition or action parameter is evaluated for each instance. For example take the following action:
Sprite: set instance variable 'foo' to Self.X + cos(Self.Angle) * Self.Speed
If there are 100 instances of 'Sprite', as you would expect this sets each of their instance variables independently, so each gets its own correct result depending on its own X, Angle and Speed values. However if you used an expression which doesn't depend on each instance's value, like this:
Sprite: set instance variable 'foo' to globalA + cos(globalB) * globalC
Previously the engine would still have evaluated that expression 100 times, once for each instance again. This is wasteful because the result is the same every time, so 99 of the evaluations were redundant. As of this build, the event engine can now identify this expression does not vary per-instance, evaluates it once, and then re-uses that value for all 100 instances. A cursory measurement indicated this could save about half all the parameter evaluations in a real medium-sized project. We don't know if this will make a significant impact to real-world projects out there, but everything helps with performance, especially on mobile. Hopefully this will help reduce CPU usage for large projects using lots of instances. Let us know if you notice any measurable differences.
Third party plugin developers note: this could possibly break some plugins if you implement expressions which return different values every time they are called. For example we have specially taken in to account the system random() and choose() expressions since they still return different values every time and the same result can't be re-used for other instances. If you notice any problems please get in touch and we'll figure something out.