thesecretweapon's Forum Posts

  • Sounds like there are many objects that could be destroyed.

    You should try the Debug-Mode on WIndows to find out which Event or Object causes these issues.

    But it doens't crash on windows. How will I know which object causes it?

    Also, will it help if for example I destroy all menu objects when going to the Gameplay layout and when the player goes back to the main menu, use System action to recreate the destroyed menu objects?

  • anyone?

  • It crashes occasionally (certainly not on every launch) It just quits. No errors. No Message. Nothing. It just dissapears. I experience this on signed APK file exported using CocoonJS's latest version and C2 latest stable. The game is downloaded from Play Store's beta testing mode.

    My phone has quad core processor, 1 GB RAM and HD Display.

    What can cause this?

    Also, my friends told me my game takes up too much of their RAM and drains their battery. Is there a way to prevent this?

  • Is it possible with CocoonJS? (for Google Play)

  • Anyone?

  • I'm using CocoonJS to export to Google Play. I tried to use the tutorial by Andreas which uses AdMob and MoPub. But when I launch my game (using ludei's game testing app on android) the ad doesn't show up.

    1. Do I need to compile an APK and sign it / zipalign it to make it work? Or should it work by directly playing the .zip file using Ludei's testing app?

    2. Will the ads show on a game which is not published on Google Play but is in beta release in Google Play Console?

    3. Also, can you just explain how to add events for full screen ads?

    Like:

    Mainmenu event sheet

    When touched Play -> Go to Layout Ads

    Layout Ads Event Sheet

    In in CocoonJS -> show full screen ad

    System: Wait 5 sec

    Go to Layout "Start Game"

    Should it work? I want it so that when player touches Play he is shown a full screen ad for 5 sec then he is redirected to the main game.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.