What causes sudden, erratic gameplay?

0 favourites
  • 10 posts
From the Asset Store
11 fun gameplay beats created with vintage synth sounds
  • What causes sudden, erratic gameplay? 95% of the time, the game works fine but occasionally, my sprites would go haywire and act like lunatics. How do I avoid this? I would hate to publish something and have this problem for the users.

  • Because we don't see any image or video or any deep down details of this problem, we will not be able to help you at all.

    How about post some video of this problem on youtube and give us a link so we know what you are talking about? Also, provide us a cut down version of your capx if possible.

  • If you have alot of timers in the game that could happen. Or if you have multiple programs running at once on your computer that could effect gameplay too.

  • Does it grind to a halt before doing that?

    Anyway, as TwinBlazar said, can you show us a YouTube clip of it? What does debugging say?

  • Sorry for the super delayed response. Here's the video:

    https://www.dropbox.com/s/tq9c7l8ctszfw ... 1.mp4?dl=0

    Game play: Pressing 1 has a set jump to land on platform 1 and pressing 2 has a set jump to land on platform 2. These are the only keys in game play.

    Some things wrong:

    The platforms should stop at the same spot on the left side every single time. There's a hidden sprite there and "on collision" everything stops moving, but it seems that the platforms go past this hidden sprite sometimes.

    But most importantly:

    If you skip to the end of the video, you can clearly see one of the platforms spaz out and move much quicker and stop much closer than it's supposed to. Every platform lands where the 1 and 2 are, nowhere else.

    I didn't get THIS on video but there have been instances where the cat would go flying when I hit 1 or 2. Sometimes when I hit 1, it would jump as if it I hit 2, and sometimes when I hit 2, it would go FLYING off screen. And of course, sometimes the cat would just do a vertical leap and land back on the original platform.

    I'm just wondering WHY this happens (it happens in both regular AND debugging mode). The CPU usage according to the debugging mode is 2.5 mb which is MUCH less than the suggested 100.

  • When a platform is moving at a certain speed it will go through solid objects and there is nothing you can do, unless you slow down pressing the right numbers. Your going to have to come up with a different method. My time is kinda crunched right now but if I get time I will come up with a different method. The invisible box method will not work when the speed of platforms is to high.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Dude its done only 2 lines of code to make player jump forward and for the moving land to move without invisible object. Apply this to your game and your golden here is the capx. file download.

    http://www31.zippyshare.com/v/sL6oJKVN/file.html

  • PixelPower, I don't think that solves the problem.

    Here's a shot of how the jump works:

    https://www.dropbox.com/s/e6k6og9b2ewvynh/jump.png?dl=0

    The cat jumps up and forward. When it lands on the platform, EVERYTHING on screen moves. So the cat and all platforms (even invisible ones) move. When the platform touches the invisible 'home base', EVERYTHING stops moving. Everything is moving at the same speed and stops at the same time. No platform should be moving faster or slower than any other platform.

  • At least from watching your video, you should expect diminished performance whenever debug is open. The "inspect" tab of debug can get REALLY cpu-intensive and will cause issues like this with fast-moving objects. There's no way around that, it's processing a crapload of stuff. It should be used for checking values and profiling stuff, never for actual gameplay comparison. The lag introduced by the debugger clearly makes the object miss or pass through your objects. This is both expected for stuff moving too quickly and a side effect of lag spikes. If it's always moving to the same Y value and the same timings, I don't think ANYTHING in your game should rely on collisions but just straight math and values.

  • PixelPower, I don't think that solves the problem.

    Here's a shot of how the jump works:

    https://www.dropbox.com/s/e6k6og9b2ewvynh/jump.png?dl=0

    The cat jumps up and forward. When it lands on the platform, EVERYTHING on screen moves. So the cat and all platforms (even invisible ones) move. When the platform touches the invisible 'home base', EVERYTHING stops moving. Everything is moving at the same speed and stops at the same time. No platform should be moving faster or slower than any other platform.

    Ok look at the code of course your player jumping method is different, I just did a different jump method to save time. But look at the platform code, that will work in your game. All you have to do is play with the values of the block movement and put it in your game.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)