Object speed on different monitors

0 favourites
From the Asset Store
112 High-Quality destruction sounds for videogames
  • Hi.

    I use “construct 3” not so long ago. Faced a problem that I can’t solve. When creating a scene with different objects (without connecting events sheets), on different monitors, the platform object moves at different speeds. I will attach 2 videos in which the object comes from point A to point B. on different monitors at different times.

    №1 websovhoz.ru/img/imgarticles/2019/VID_20200221_151931.mp4 (2.67 sek)

    №2 websovhoz.ru/img/imgarticles/2019/VID_20200221_152207.mp4 (3.23 sek)

    *If you make the distance length, there will be an even greater time gap

    *Two monitors have different frame refresh rates (GHz). But how is the speed of the object related to this?

    The only way I could fix this was to set Framerate mode: Unlimited (ticks only) instead of (V-synced) in the project properties. But the help says that this puts too much stress and is not the right solution.

    How can I fix this? In fact, if you make a game for PC, the character’s speed will depend on the user's characteristics? It's funny :)

    Sorry for my English)

    Tagged:

  • Project settings:

    websovhoz.ru/img/imgarticles/2019/u4cys-02-21_15.jpg

    In my opinion, I already tried all the possible combinations, which didn’t help.

  • You've probably made framerate-dependent movement. See the tutorial delta-time and framerate independence.

  • You've probably made framerate-dependent movement. See the tutorial delta-time and framerate independence.

    Thanks

    The tutorial says:

    BEHAVIORS ALREADY USE DT

    All of Construct's behaviors use dt in their internal movement calculations. That means anything moved by behaviors like Platform and 8 Direction don't need any special treatment - they do this already!

    But in my example (in the video), I connected an empty event sheet for the layer. And my object is endowed with the behavior of "platform". And in theory, it should already have DT. But it does not work.

  • You should share projects, not videos. All I can do with a video is watch it, shrug, and say that shouldn't happen.

    It's a common mistake, so without any further evidence I can only assume it is a mistake in your project and it is doing something framerate-dependent by accident. You can still make behaviors work framerate dependently if you create incorrect events, like setting a speed to 500 * dt, which basically breaks it, since it makes a framerate-independent value become framerate-dependent.

  • You should share projects, not videos. All I can do with a video is watch it, shrug, and say that shouldn't happen.

    It's a common mistake, so without any further evidence I can only assume it is a mistake in your project and it is doing something framerate-dependent by accident. You can still make behaviors work framerate dependently if you create incorrect events, like setting a speed to 500 * dt, which basically breaks it, since it makes a framerate-independent value become framerate-dependent.

    Project: websovhoz.ru/img/imgarticles/2019/test_project.c3p

  • Ok, I found a reason. When I setting in the project properties: Fullscreen mode: "Latterbox integer". The platform moves at the same speed. But if I install: "Latterbox scale". The platform begins to move at different speeds on different monitors and in a full, minimized window.

    The question is how to install "Latterbox scale" and and not have different platform speeds.

  • Neither of those settings affects the speed objects move at.

  • Why then in my almost empty project, this characteristic affects speed.

    websovhoz.ru/img/imgarticles/2019/123.c3p

  • Try this project:

    dropbox.com/s/jgoh0q74m81ep7w/MonitorTest.c3p

    Press Left key and keep holding it. Player will move 4000px to the left, at the end it will show you how much time it took.

    I tested on 60Hz and 75Hz monitors and in both cases the result was 8.1 seconds.

  • Good. Here is my test

    websovhoz.ru/img/imgarticles/2019/video_2020-02-24_18-59-59.mp4

    Shows different times.

    Why? I haven’t changed anything in your project.

  • That's bizarre, I've never seen anything like it. There must be some kind of hardware fault or maybe a bug with Chrome's frame scheduler or something. Construct uses the time between frames to advance the movement, so it doesn't matter what the framerate is. The only explanation is somehow it's measuring the time between frames incorrectly.

    Is that a dual-monitor setup with each display running at a different framerate? It's an unusual setup and might explain the odd behavior.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Now changed in your project

    Fullscreen mode: "Latterbox scale"

    ->

    Fullscreen mode: "Latterbox integer"

    And on the monitor with a time of 9.6, the time became 8.1.

    websovhoz.ru/img/imgarticles/2019/video_2020-02-24_19-15-41.mp4

  • Is that a dual-monitor setup with each display running at a different framerate? It's an unusual setup and might explain the odd behavior.

    Yes right

    1st monitor 1920/1080 - 60 Hz

    2nd monitor 1280/1024 - 75 Hz

    If this anomaly is only in my hardware, I'm glad. I would not want other users to show this in the game.

  • I would guess there's an issue with using dual-monitors with different refresh rates.

    The timing project showed times of 8.1 and 9.6 seconds, a ratio of about 1.185. The ratio of 75 Hz to 60 Hz is 1.25. It's not super close but the right ballpark, so I'd guess in this specific setup it's possible it ends up using frame times from a different display using a different refresh rate, resulting in the wrong speed. I'd speculate that if it was using frame times from the 75 Hz display (13.3ms frames) on the 60 Hz display (16.7ms frames), it would run slightly too slow.

    I'm sure this is not an issue with Construct since it will always work at the same speed providing it gets the right frame time measurements. I guess it's a Chrome bug, but it's difficult to see how this can be resolved - e.g. if you have the window displaying half-and-half on each display, what framerate should it run at? It's a weird setup and hard to know what it ought to do in that case.

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