Ashley's Recent Forum Activity

  • Google update their hardware blacklist if they find systems with buggy or unreliable drivers/hardware, so it could be that your system now falls back to software rendering.

  • I think Intel said you have to make sure the Cordova "device" plugin is in the project or it won't work. Still, better to post on Intel's forums about this.

  • The Packaging mostly takes up to 30 minutes on my PC, and a lot less on my laptop.

    Jeez, that sounds like your system is running out of memory and swapping solidly for 25 minutes or something. IIRC the packaging step consists solely of creating package.nw, which is basically adding all your project files to a zip. So it shouldn't take significantly longer than doing the same from Windows. I'd imagine it's limited by your hard disk write speed. It also doesn't compress any NW.js files so the NW.js version should have no impact on this at all.

    You could try disabling antivirus/Windows Defender in case that is slowing it down (AV may scan everything written to disk in real-time).

    30 minutes is extreme and sounds like some kind of fault condition (or poor hardware? :-\) but assuming export can finish in <5 minutes, that seems reasonable to me - I never thought anyone would export regularly, you do all your testing from C2's preview mode then you export once for publishing, right?

  • For many use cases it's important to run even if the event is no longer true. For example:

    + On pressed spacebar

    -> Shoot a laser

    -> Wait 0.5 seconds

    -> Shoot a laser

    In this case the user wants a "double shot" every time the player presses space. Space may not be down for the second shot but it still definitely should run the action. In fact it doesn't make sense to ask if a trigger is still true after the event has fired, because triggers are one-off events.

    You could just wait then call a function which checks if the condition is still true, so you can have it both ways.

  • The first thing you should check is what Chrome says at chrome://gpu.

  • Check chrome://gpu in the Chrome browser on the device. The most common performance problem is buggy GPU drivers forcing the browser to use software rendering. The chrome://gpu page will tell you if it's actually using hardware acceleration.

  • If there's a problem please file a bug report following all the guidelines.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The SID should be unique for every action to guarantee the savegame feature works correctly. (I think it's used in a couple of other places too but can't remember right now)

    You should do everything from C2, since it's easy to corrupt your project by not updating the XML correctly! In theory event sheet includes are meant to prevent you ever having to copy-paste events repeatedly...

  • Take a look at one of the built-in webcam examples.

  • It's possible, yes - spritesheeting can in some cases change the scaling quality after export. It's worth testing both preview and export to compare the results, it might only be an issue in preview mode.

    FWIW, C3 will use spritesheets in preview mode as well so you won't have this problem of preview sometimes looking slightly different to export.

  • The idea is that the logic should run at a constant rate, while the rendering is a separate process that interpolates or extrapolates the logic steps to match any framerate the display uses.

    Extrapolation is off the cards, because the engine cannot predict the future. I think that only works for certain games which have very predictable movement and can make that assumption. It would result in objects doing things like going inside solids for one tick instead of bouncing off because it extrapolated incorrectly. Also fast, rapidly turning objects using extrapolation tend to get a weird floaty feel to them as they move around in a pattern which is not exactly on their true path (one of your graphs basically shows this). I don't think a technique like that can work in a general-purpose engine.

    The big problem with interpolation is the latency, which you tried to downplay but I think will be a significant problem. As you say the engine needs to know the next point along to do the interpolation math, so you need to deliberately delay rendering by the logic time step. Suppose logic is running at 30 Hz (33ms step). Unfortunately hardware timers and OS scheduling is not perfect, so there will be some jitter in that. So in practice the engine would need to increase that to say 40ms.

    There are two problems with this:

    1) 40ms is a lot of delay, close to the 50ms perception of "instantaneous". I don't know how this compares to the total system latency, but usually users can tell for every extra frame of latency added in. People already notice that there is 1-2 frames of latency on objects following the mouse, and I am pretty sure adding as much as 40ms artificial latency will be a significant, noticeable amount of extra input delay in games.

    2) how do you know the system *really* will both schedule and complete a logic step in 40ms? There are several sources of error in the hardware timers, OS thread scheduling, and variations in the actual amount of work that has to be done every tick. If one time it takes 41ms, you're missing a step so you can't interpolate anywhere, so without extrapolation you basically can't render a new frame. So this actually adds a new source of jank: occasional cases where a new step is not ready, forcing rendering to skip a frame. There is a nasty tradeoff here between reducing latency but making it risky you miss frames, vs. increasing the latency but making it more likely you always hit a frame.

    Alternatively you can run logic faster than the display rate, but again this comes at a very high CPU cost to gain any actual benefits from that.

    There is one more problem with interpolation. Object's positions can change multiple times within the same tick. So to remember where everything was the last frame, the engine will have to complete a tick, then go through every object and remember its finishing position for the next tick. This adds O(n) CPU work to track all moving objects. For games with a lot of moving objects this could be a significant overhead.

    So from this I think I can add a couple more benefits to the existing variable-step/v-sync approach:

    • does not add any extra input delay
    • guarantees a new logic step is ready in advance of every rendered frame
    • does not add any extra CPU overhead for tracking interpolation

    Just to clarify, I don't claim that the existing variable-step system is perfect, and there may well be some games that can or do use some of those techniques and have it work well. But I think being an actual engine developer gives me a unique perspective. Through some of the bug reports I've seen I know people routinely take the engine to the absolute limits and do completely crazy things. Ideas like extrapolation are interesting, but from this kind of experience, I *know* there are some cases that will just be totally broken by it. I feel the approach we have to take is to choose things which generally work OK everywhere over things that optimise for certain types of game but make others worse.

  • It's probably something to do with mipmapping. You could try setting the downscaling quality to low in project properties.

Ashley's avatar

Ashley

Early Adopter

Member since 21 May, 2007

Twitter
Ashley has 1,777,880 followers

Connect with Ashley

Trophy Case

  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • Forum Mega Brain Made 20,000 posts in the forums
  • x126
    Coach One of your tutorials has over 1,000 readers
  • x74
    Educator One of your tutorials has over 10,000 readers
  • x5
    Teacher One of your tutorials has over 100,000 readers
  • Sensei One of your tutorials has over 1,000,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x42
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs