Mobile Sleep

The Mobile Sleep add​on extends the game application to allow power management features on both Android and iOS.

This is a very important feature for Cordova games, which Construct 2 and Construct 3 export into for mobile games. 
Due to the fact modern devices have power management features that limit device's performance when idle or running non-performance intensive applications, which most consider Construct made games to also be.

Modern devices can't differentiate Construct games with ordinary applications, so performance is commonly highly limited, especially when dimmed.

 

This feature allows Construct Games to access most of the device's resources, hence significantly improving performance.

The best benefit for this addon is that it supports all editors and runtimes of Construct. Both, Construct 2 and Construct 3.

It allows the application to manage the power and performance of the game application.

 

Intstructions

1. The first step is to add the Mobile Sleep addon into the project.

Actions, Conditions & Expressions

Actions

General :

  • Lock Awake App - Lock the App to an awake state when idle. This is useful during in-game.

  • Lock Dim App - Lock the App to a dimmed state when idle. This is important to at least keep the phone awake.

  • Release Lock - Release any app state lock if Locked Awake or Locked Dimmed. To avoid unnecessary battery drain.

  • Release Pause Sleep - By default, the wake lock is auto-released when paused (Phone is off or the app is minimized). It will reacquire the wakelock upon app resume. To disable, set to "False".

    • Toggle - Set either "True" or "False".

Conditions

Lock Awake :

  • On Lock Awake - Triggered when the lock awake executed successfully.

  • On Lock Awake Failed - Triggered when the lock awake failed to execute.

Lock Dimmed :

  • On Lock Dimmed - Triggered when the lock dimmed executed successfully.

  • On Lock Dimmed Failed - Triggered when the lock dimmed failed to execute.


Lock Release :

  • On Lock Release - Triggered when the lock release executed successfully.

  • On Lock Release Failed - Triggered when the lock release failed to execute.


Override Pause Sleep :

  • On Pause Release - Triggered when the pause sleep release executed successfully.

  • On Pause Release Failed - Triggered when the pause sleep release failed to execute.

Game Project

Sample Setup Project

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Supporters

Only

Features

The Mobile Sleep is an addon that implements power and screen management, and enables the device to use the device's full resources to run the application to its optimum performance.

Without this feature, the application would only run, depending on the manufacturer and model, with limited resources of the device, managed by the mobile device's built-in power management that limits the performance of Cordova applications due to not being able to differentiate office applications and game applications, to save battery life.

This feature counteracts the effect of power saving placed by the device manufacturers, hence forcing the application to use its maximum performance with your game application.

This is simply done by calling the action Lock Awake App on your game application during gameplay or at the moment your application loads.

This is an efficient way to make sure your application always runs on its optimal condition, preventing your application to dim, which also can significantly drop your application's performance.

I recommend you always add this to all your mobile game applications, based on tests, we've seen at least around x2 performance gain and lost significant amount of lag spikes.

Features :

  • Power Management

  • Screen Management

  • 2x performance boost for applications.

  • Significant stutter loss.

  • Easy to use and no programming required.

  • Well-supported and fully tested.

  • Lock awake applications.

  • Lock dim applications.

  • Minimize still awake feature - Release Pause Asleep.

  • Application dim performance loss solution, performance stability.

  • Construct 2 editor support.

  • Construct 3 editor support.

  • Construct 2 runtime.

  • Construct 3 runtime.

  • C3 Build Service, PhoneGap.

  • Cordova CLI & Android Studio.

Performance Optimization

As mentioned before, due to device manufacturers power saving slowdown for Cordova applications, due to not being able to differentiate Cordova office apps and Cordova game apps, it unintentionally slows down performance of Cordova game applications, hence Construct 2 and Construct 3 games.


The Mobile Sleep can remedy this by forcing the application to use its optimum performance by wake locking the application, which significantly improves performance 2x compared to without the optimization. It also prevents the application from dimming, this also prevents dim performance loss which is highly significant. And also removes significant lag spikes. 

This optimization can bring great overall improvement in your game's running performance. 

You can either activate it at the start of the game, or just when the main game-play layout is running.

You can do this either way, but personally I prefer having this optimization on the entire runtime of the application.

Easy Game Project

Sample Setup Project

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Supporters

Only

 
 
 
 

Get the tools

for your pro games!

Constuct Master Collection - Itch.io
Constuct Master Collection - Discord
Constuct Master Collection - Construct 3

© Construct Master Collection 2020 • All rights reserved

Contact Information: