jobel's Forum Posts

  • do you know if this is still an issue? because it's definitely happening to me.. can someone repost the work around link?

    or is it literally just an empty sound file playing every 1 second?? how does that even fix this problem>?

    thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • okay I think I figured out exactly how muted sounds happen. If I just leave the game and let the phone "go to sleep" when you wake it up, all sounds in memory are muted. Music folder sounds play fine.

    So it looks like the memory is getting flushed when the phone goes idle. And when you wake up the game those sfx are silent (or probably no longer in memory).

    This happens with Webview and Webview+

    If I had a way to trigger, "Got Focus" or something the triggers when the player switches to it, I could probably reload the audio I think. But I can't figure a way to do that. CocoonIO doesn't seem to work using Browser and the Cocoon objects have nothing like that.

    Someone must have run into this problem... Any ideas?

  • does anyone know about CocoonIO the difference between Webview and Webview+?

    when I use Canvas+ I get a black screen. But the webview ones work, except with some weird audio muting and repeating issues.

  • sounds like a bug in your code.

  • I've tried compiling with:

    Canvas+ (get a black screen)

    Webview+ (seems to work okay, but got some weird audio errors while testing)

    Webview (seems to work okay - haven't fully tested it)

    what is the difference between Webview and Webview+?

  • reduce the number of physics objects. the physics engine is a huge performance issue. I assume the phone gets very hot as well.

    and check the number of collisions you have... depending on what your game is doing it could really be effecting things.

  • jobel

    The C3 native SpriteFont does support the same functionality as SpriteFontPlus.

    that is excellent news! I was wondering what that was for.. SpriteFontPlus used the term "JSON" in the properties which made it more intuitive. "Spacing data" works though, now that I know what it's for..

  • TBH I cant think of a single reason people continue to use spritefont+ in C2 as the native spritefont plugin is better.

    you obviously haven't used spritefontplus.

    -No need to add loops to go through the JSON file manually for non-monospaced fonts. Instead it's built into the object and has a place for the JSON file in the properties panel

    -Once those fields are updated you get to see exactly how the font (spacing) will look in the construct 2 editor (which the native one does NOT do -- in native you have to keep running the game in order to see how it will look and line up etc... creating cumbersome and slow workflow)

    those 2 reasons make it extremely valuable. I hope someone makes a C3 version.

  • is there a way to modify this for C3?

  • Compiled my game for Android the game works pretty good, except for a little slow-down at the beginning. I am using the physics behavior, so I can live with it.

    My only major problem is the sound effects. After playing the game for a while (30 mins) sounds are missing, and then some sounds get stuck repeating over and over like the skipping record player. It's very strange.

    Here are my Cocoon.io settings

    Cordova Android v6.2.3

    WebviewEngine: Webview+

    Installed Plugins:

    cordova-plugon-crosswalk-webview

    ludei.webviewplus.ios

    ludei.webviewplus.android

    Does this look right? I guess I don't need the ios one in there, but I can't imagine that is causing this problem.

    Any ideas? thanks!

  • do you mean particle or sprite animation?

  • I don;t know for sure, but it seems if you use the Touch input type and specify an object it would do a collision check, because it's looking at the collision box in order to know if it interacts with the object.

    again the simple optimization is

    IF sprite is NOT on screen then disable collisions

    else

    enable collisions.

    but you'd have to have A LOT of objects to make this worth doing. What is your object count?

  • if you don't have an event that checks the collision, then you don't need to worry about it. There are no collision checks that are performed.

    say you have 100 balls floating in/out of your layout. and everytime your player hits them, they pop. you have to have a statement that says if Player On Collision with Ball. This creates lots of collision checks.

    However, if you for some reason, set all the Ball's collision properties to disabled, then that trigger will not happen and not checks are done. Or more constructively, if you set just the balls that are off screen to disabled then you are eliminating unneeded checks i.e. since your player is always in the center of the screen it will never collide with something off screen.

    If you have a sprite that is background art and never needs any collision check. You don't need to turn off collisions because you don't have any events for it.

  • if you want to make a manual reload you would just do that nested IF outside

    //make sure the gun isn't already full
    IF reload button pressed AND player.currentclip < MaxClipSize
               IF player.clips > 0 THEN
                   
                   //reload
                   set player.currentclip to MaxClipSize  //whatever the size your clip is
                   subtract 1 from player.clips
    
               END
    END[/code:1f8j2k58]
    
    the only thing you have to think about is if the player hits reload and their gun is not empty, what do you do with those extra bullets?  that's when it get's a little more complicated.