Should I combine Controller and Animation?

0 favourites
From the Asset Store
Small pixel icons for the 3 most popular controller types.
  • Yes, I did experience some problems with the rounding in your file. I also had similar problems which I had to patch rather than completely fix in my current prototype build.

    The problems were a little more obvious when I wasn't using behaviours for the platforming. Out of curiosity, why aren't you using the standard platformer behavior? Is it because you want more control? Like old cinematic platformers? (Flashback, PoP, etc)

  • MultipleChoice: I've tested your original example as well as the one you posted in the bug report test_example.capx. This "shaking" you're referring to, the problem with the "shaking", is it possible that this is a v-sync / graphical glitch?

    Here are some test cases you should try out:

    1. Turn a small layout, disable camera following code

    2. Pixel rounding off / on

    3. Sampling - Linear/Point

    In which combination of these options does the problem go away?

    If we can narrow the problem down to the scrolling code, maybe try only moving the camera when the difference between (Scrollx, scrolly) and (PlayerX, PlayerY) is > 1 pixel. Also try using a lerp for the camera to see if it smooths out the scrolling any.

    Just set a local variable CameraSpeed to 1/2.

    Scroll to position:
    lerp(ScrollX, PlayerBox.X, dt * CameraSpeed)
    lerp(ScrollY, PlayerBox.Y, dt * CameraSpeed)
    [/code:mjecg8gw]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey, cacotigon ,

    As I wrote, it is related to the "pixel rounding = on" setting. Sampling does not matter. If pixel rounding is off, that makes it go away. But I need pixel rounding on for pixel style games... I also started a bug report-thread, let's see, what comes back.

    So the problem is not the ScrollTo itself, but the platform object is jittering/shaking as described, causing the cam also to shake, when ScrollTo target is the Platform object.

    So I don't want to smooth the camera at all, but the platform object-movement should be smooth. The problem is just more obvious to see, if the came also shakes with the platform object.

  • MultipleChoice

    You need to record a video of this issue, because I cannot repro what you describe in your bug report. Movement with Pixel rounding on/off with your sample capx was *completely identical* on my system. I'm starting to wonder if this might be related to video drivers. I'd recommend testing this issue on a couple different computers.

    EDIT:

    Also check this on-going thread about jitter issues in general:

    https://www.scirra.com/forum/r190-jerking-on-ie-chrome-firefox-opera_t119846

  • cacotigon Appreciate your support man <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    Here is the video: https://dl.dropboxusercontent.com/u/297 ... truct2.rar

    I also saw those threads, but none seemed to handle platform behavior, very similar though. I am going to post the video also there, it indeed seems related.

    You can see how the platform starts jittering AFTER I turn PIXELROUNDING ON, in the second half of the movie. I even did a slowmo of it at the very end.

    Magistross : Please take a look, you might know something about this. Thank you!

  • MultipleChoice

    Sure man, I'm happy to help. I just watched your video and definitely see what you're talking about. That's nuts. Unfortunately, it doesn't happen when I run the test_example from my system (chrome/firefox), it's silky smooth.

    I'm on a:

    Windows 7 64-bit

    Intel i7 2.7ghz

    nVidia NVS 5400M

    I hope you're able to get this resolved!

    P.S. If you get a chance to run it on a different system, let me know, I'll be curious to see what happens.

  • Have you tried replacing the ScrollTo behavior with a "Scroll to position" event ?

    Anyhow, I too believe it's most likely a bug (and probably not on C2 end), since different systems produce inconsistent results.

  • Magistross : sorry, bad choice of words, it is not a behavior in construct 2-s sence <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink"> so yes, it is solved that way.

    But it is strange, that not everyone has this problem, it seems.

    cacotigon : oddly enough, I visited a friend with OsX and prepared the browser version below. There we tried Firefox and Safari, both producing the same issue...

    Now it would be interesting now to know, if you encounter the problem here:

    http://www.exitthegame.eu/test

  • MultipleChoice

    Strange! I tried the web demo, jumping works flawlessly, no shaking. There's the "v-sync jaggy tearing" issue when moving left and right, but I think it's more related to the known Chrome/Firefox jitter issue that's been discussed in previous forum posts.

  • cacotigon yeah, its very strange...

    I tried it on other systems aswell, I have experienced the jittering/shaking everywhere, but sometimes horizontally, when moving L/R.

    Oddly, sometimes it is vertically, when jumping up & down (like in the screen capturing I recorded).

    So I still think it might be related.

    Anybody any idea?

  • Hi,

    I have the same bug but I think it depends from the resolution of your screen.

    I set the Scroll To behaviour to a square which is following a rectangle on X axis.

    I have two screens, one 1920x1080 and the other 1680 x 1050. The window size of my layout is 1920x1080.

    I launched the game with google browser.

    In the 1920x1080 screen the camera is shaking when I try to run against another solid object.

    But with the other screen I have no problem. Am I doing something wrong or is it just a bug?

    Maybe it can help.

    Thank you.

  • So I come here because I have a similar problem. I tested it in 4 different browser and 5 different computer and when pixel rounding is ON the camera is shaky but only when I have a lerp, with the behavior scroll to or the event scroll to object/position: player.x, player.y it does not shake at all even with the rounding on. I even tried with Magicam plugin and it has the same problem as Lerp.

    Even with Pixel rounding OFF and lerp it is still shaking a little bit when changing state (idle to run) and then stabilizes when at full speed or not moving for exemple.

    The Pixel rounding is definitly affecting the scroll or platform behavior making it shaky but it can't only be that because it is still shaking a little bit with lerp (less but still). I'm going to try a few things I saw in this topic but if anyone found a solution or something I would be very grateful.

    Thank you.

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