thesecretweapon's Recent Forum Activity

  • I've integrated Google Play Game Services in my game. I've put a login button and leaderboard & achievement buttons. I've coded it so that only when CocoonJS -> On Login Succeeded then leaderboard and achievement buttons are enabled. The problem is that suppose a player logs into Google Play Game Services, now leaderboard and achievement buttons are enabled. Now he quits the game and re-opens it. He is already logged into the game (Welcome XYZ appears at the time of ludei splashscreen), but inside the game, the leaderboard and achievement buttons are disabled because It could not detect that player is already logged in. So, the player has to click the LOGIN button. Then, the other buttons are unlocked.

    I tried to do this:

    On start of layout: CocoonJS -> On Login Succeeded: Set global variable "loggedIn" to 1. If loggedIn is 1 then enable leaderboard and achievement buttons.

    But it is not working. Any help?

    Thanks

  • Add "IsPaused to 0" as a 2nd condition to the "every tick" conditions. The events can only fire every tick if the game is not paused.

    TheDom

    Thanks,

    When trying to move objects that I want to be paused to FamilyObjects, it says you can only add objects of the same plugin to familyobjects. What should I do?

  • Try this:

    Create a Global variable called IsPaused

    Create a Global variable called Timer

    Create a family FamilyObjects

    Put all objects you want paused into FamilyObjects

    Timer=0

    System > Timer (Is Greater than 0) > System > Set IsPaused to 0

    System > Timer (is less than or = 0)>System > Set IsPaused to 1

    System > IsPaused =0 > Set FamilyObject Time Scale = 1

    System > IsPaused =1 > Set FamilyObject Time Scale = 0

    -----(sub event---)------- > System > every 1 Second > System -1 > From Timer

    On some Condition > System > Set Value Timer to 3

    It actually may work without the Family and just trying it setting the System timescale to 0 and 1, if not, setting the time scale of the objects to 0 should do it.

    TheDom thanks for helping. The problem is that this game is an endless runner and it contains a lot of "Every tick do this" functions for example: Every tick: Move platform, every tick increment DistanceRan. As far as I know, you cannot add an event to a family; you can only add objects. I want the "Every tick" function and other game events to stop for 3 secs. Is this possible?

  • I want the game to remain paused for ONLY 3 seconds, then I want it to resume itself. But it is not working:

    Try 1:

    System: Set Time Scale = 0

    System: Wait 3 seconds

    System: Set Time Scale = 1

    Doesn't work

    Try 2:

    Variable Count = 0;

    System: Set Time Scale = 0

    System: Every 1 second, add 1 to variable count.

    Is count = 3? If yes then Set Time Scale = 1

    Doesn't work.

    It looks like when "time scale = 0" everything stops working, even the "in every X sec" action stops working. Is there a workaround for this?

  • Reviews are very important. Is there a way to prompt players to rate the game on Play Store? Is there a plugin? I am using CocoonJS.

    Thanks

  • Any other tips?

  • 1 and 3 will help memory usage wise (and since cocoonJS lacks of a clean memory management, it can help, not in all cases though)

    4 will help if the logic of the game is too heavy, you also might want to see if your events aren t doing tasks when there is no need.

    2 I do not know if it will have an impact

    I think I may have some lousily coded events that are doing unnecessary work. There is a considerable logic involved in this game. Can this effect the performance dramatically?

  • My android game is lagging even on Samsung flagship device S4. Can these things be done to improve performance?

    1. Reduce the size of sprites using photoshop and then importing it instead of importing a large size (say 128x128) and shrinking it in C2 to a smaller size (say 64x64)

    2. Decrease the number of layers which are in parallax scrolling (right now there are 3)

    3. Decreasing the number of frames of the player and increasing it's fps.

    4. Removing Sine behavior and instead using animated sprite to do the same job. (I use ALOT of sine behavior: everywhere- from main menu buttons to in-game objects, can it slow the game down)

    5. Using different event sheets for different layouts? (I am using one event sheet for several layouts so that I can use the same variables, is this option just for organization)

    It's an endless running game. I'm deleting the randomly generated tiles as soon as they get out of window view. I'm also deleting all sprites that go outside the game's window. I'm using CocoonJS latest version 2.0.0.1 and C2 latest stable.

    Thank you for your help!

  • What you must know:

    1. Implementing IAP (Google Play) with virtual currency (or direct purchase if you don't know how to do virtual currency)

    2. Construct 2 programming expertise to turn challenging ideas into reality.

    If you can do this, PM me with your past games and skype.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Only PM if you are talented and can handle complex operations. You must know the implementation of IAP and local leaderboard. PM with a link to your work for more details. Please include your time zone in the PM.

  • PM me for details. I may have something for you.

  • Beaverlicious Does that mean that currently there is no way to implement video ads in C2?

thesecretweapon's avatar

thesecretweapon

Member since 28 Jun, 2012

None one is following thesecretweapon yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies