TwinBlazar's Recent Forum Activity

  • Is C2 compatible with Cordova Plugin Background App? https://github.com/MobileChromeApps/cor ... ground-app

    [quote:1uldnp40] The purpose of this plugin is to enable notifications, alarms, etc to re-start your app and fire callbacks without the app causing any visual cues to the user. In essense, it allows starting an app as an Android service, but does so without the use of an actual service.

    I was wondering if it is possible to have C2 exported HTML to be able to run in the background. (ex. app still runs when phone screen is off or user switches app)

  • Right now, I am using the find function and search through a string for any character that is forbidden. I only allow 0-9, A-Z, a-z, and While using the find function for all the forbidden characters do work, the checklist itself is long and it looks ugly. Is there a better way to achieve this? Basically a function that returns -1 if there is any other character beside 0-9, a-Z, A-Z and

  • I got myself a textbox on my app, but when I touch it on mobile, a virtual keyboard popped up on the bottom and the app is scaled down to smaller size. (integer letterbox aspect ratio). While the user can type whatever into the textbox, this becomes a problem in that the "whole app" becomes shrinked and it's so small that it hurts to read those letters in the textbox.

    Is it possible to have the keyboard just appear on the bottom, but the app does not scaled down? I would like the keyboard to be on the bottom part of the app. I have the textboxes on the upper part of the app.

    How do we deal with this virtual keyboard problem here?

  • Anybody?

  • I suggest you start from the provided examples, and understand the workflow and the event sheets first. That will give you some more idea of how things come together in Construct 2.

    If we just provide you a capx example in this case, it will be quite useless to you, as what you want is not basic at all.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have several objects that persist in the game. Now, the problem is when the player goes for new game the second time, these persisted objects have already been eliminated in the second run.

    Is there a way to reset the persisted object back to initial state without having to restarting the app?

  • I am using NodeWebkit and want to save snapshot of the game into a .png file. I could write CanvasSnapshot into a file with NodeWebkit's write function, but the file is invalid.

    I took a peek at the data of CanvasSnapshot expression, and it does not look like usual png file format at all. I believe this data has to be converted into the usual png file format first before it could be written with NodeWebkit's write function.

    The question is... ...is there a way in C2? Or is there a better way?

  • The big picture: I would like to send some notification text from a server to a Construct 2 app running on smartphone. Is this possible?

    The details: the player will be connecting to the server online. Now, once in a while, I would like to send some notification text to the players. I want it just like those pop up notification on the smartphones to inform the player stuff. Is this possible for the following:

    1. Construct 2 app exported as HTML5 running on a server?

    2. Construct 2 app exported as Android/iOS app?

    3. Suppose the player closes down the app (ex. close web browser for HTML5 app and close app for exported Android/iOS), is it possible for the player to still receive some text notification? Or is this not possible with C2? Any extra server side technologies or any extra scripting/tool on smartphone required?

  • Problem Description

    I have just upgraded from r190 to r200 and I got an audio error that will crash the game and give out stack trace complaining "Failed to set the 'volume' property on 'HTMLMediaElement': The provided double value is non-finite."

    This problem does not occur in r190. I have reverted back to r190, re-exported the project as node webkit and see that the game runs without a problem.

    Attach a Capx

    http://www.mediafire.com/download/11ucq ... ioBug.capx

    Description of Capx

    The capx slowly turns down the volume of the music, using a global variable. The formula used in set volume function is -log10( 100 / ( x / 0.9*100)) *33.2, where x is a variable. This is used in my game to turn down the music or slowly fade away a sound effect. (ex. when you walk away from a waterfall) Once the volume is all the way down, the game will output the stack trace error.

    Steps to Reproduce Bug

    Have a countdown variable that slowly decrease and use it to set volume using the formula given above. After the variable is less than a certain number, the game will crash. See the event sheet of the provided capx.

    I have been trying to reproduce this in several other ways, such as giving -infinity to set volume function, but it does not seem to crash.

    Observed Result

    I got this stack trace:

    TypeError: Failed to set the 'volume' property on 'HTMLMediaElement': The provided double value is non-finite.

    at TypeError (native)

    at C2AudioInstance.updateVolume (http://localhost:50000/Audio_plugin.js:1984:33)

    at C2AudioInstance.setVolume (http://localhost:50000/Audio_plugin.js:1960:8)

    at Acts.SetVolume (http://localhost:50000/Audio_plugin.js:3368:19)

    at Action.run_object (http://localhost:50000/eveng.js:1850:10)

    at EventBlock.run_actions_and_subevents (http://localhost:50000/eveng.js:929:38)

    at EventBlock.run (http://localhost:50000/eveng.js:886:9)

    at EventSheet.run (http://localhost:50000/eveng.js:224:7)

    at Runtime.logic (http://localhost:50000/preview.js:2361:36)

    at Runtime.tick (http://localhost:50000/preview.js:2056:8)

    Expected Result

    The game should not crash, as it does not crash in r190.

    Affected Browsers

    • Chrome: YES
    • Exported NodeWebkit: YES
    • FireFox: didn't check
    • Internet Explorer: didn't check

    Operating System and Service Pack

    Win7 64bits Service pack 1

    Construct 2 Version ID

    r200

    I see that r198 got a bug fix "Audio: setting volume did not work correctly in r197", so this implies the internal code has been changed in the function. Perhaps, you could add some sort of parameter safeguard to prevent the function to crash the game just like back in r190 ?

  • See https://www.scirra.com/manual/135/particles

    [quote:3sl366cz]

    Optimisation

    Particle effects are more efficient than creating the same effect with Sprite objects, but not by a large margin. Just like with sprites, you should be aware that creating a large number of particles can have a serious performance impact on your game, especially on mobile. Use the ParticleCount expression to monitor how many particles are being created. On desktop systems, more than a couple of hundred particles is likely to impact the framerate. On mobiles, use of the Particles object is not recommended at all since the framerate is usually already limited by the existing sprites in the game; if absolutely necessary, keep particle counts below 50 on mobile for best performance.

    To reduce particle counts, try reducing the rate or shortening the timeout. To compensate, you can try making the particle size larger so the effect does not get thinner.

  • Why would you want to do that, when we actually are trying to avoid anything being plugins that require users to install in the first place?

TwinBlazar's avatar

TwinBlazar

Member since 14 Apr, 2013

Twitter
TwinBlazar has 1 followers

Connect with TwinBlazar

Trophy Case

  • 11-Year Club

Progress

11/44
How to earn trophies