How do I rotate behaviour and performance ?!

0 favourites
  • 11 posts
From the Asset Store
Simple resize and rotate events for any sprite, quick and easy event sheet that you can use for your own projects.
  • hi all,

    i'm building small game wich contain one sprite with rotate behaviour

    i just test it with / without this behaviour and i see that if it's enabled the game lagg and performance is bad

    is there any way / solution about this problem ?

    thanks in advance

  • Check your projects configuration settings..........Is your "Use High-DPI Display" is Yes.., "Downscaling" is high quality...... and also check which physics engine is being used,,,

  • high dpi is set to set yes (if i set to no the image quality is horrible)

    downscaling is set to low quality

    physics used is box2d asm

    ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, all the rotate behavior does is the same as a event like this:

    Every tick: sprite: rotate clockwise speed*dt

    With just one object, there isn't much you can do to make it faster.

    How is the performance bad?

    If you're getting a low framerate then you might have a blacklisted graphics card. If you can update your driver it may help.

    If instead you're getting a rotation that's not buttery smooth, then it's a current browser issue. You can have lots of sprites/events/behaviors or very few and it doesn't affect that. Chrome supposedly has a fix coming in a newer version, but other than that other browsers have varying degrees of stutter. Once one solves it well I'm sure the others will follow suit.

  • i'm developping on mobile phone

    i just try every 0.017 set angle to self.angle+10*60*dt

    it's better than before ... but still some times lag

  • i'm developping on mobile phone

    i just try every 0.017 set angle to self.angle+10*60*dt

    it's better than before ... but still some times lag

    Not sure why you'd use dt inside the "every x seconds"-event

  • > i'm developping on mobile phone

    > i just try every 0.017 set angle to self.angle+10*60*dt

    > it's better than before ... but still some times lag

    >

    Not sure why you'd use dt inside the "every x seconds"-event

    i always use it like that

    is it bad ?

  • >

    > > i'm developping on mobile phone

    > > i just try every 0.017 set angle to self.angle+10*60*dt

    > > it's better than before ... but still some times lag

    > >

    >

    > Not sure why you'd use dt inside the "every x seconds"-event

    >

    i always use it like that

    is it bad ?

    Not sure if it has any effect, positive or negative, but seems illogical..

    Every x seconds is framerate independant as far as I can see, why re-add framerate to it?

    But then again, maybe it's one of those things outside of my knowledge..

  • Every 0.017 seconds and lower is the same as "every tick". So dt can make sense there.

    All every x seconds does is check the time since it last ran, then if it's >=x it runs.

    The rotate behavior and doing it with events should be identical for performance. Actually the behaviors often should perform better.

  • Every 0.017 seconds and lower is the same as "every tick". So dt can make sense there.

    All every x seconds does is check the time since it last ran, then if it's >=x it runs.

    The rotate behavior and doing it with events should be identical for performance. Actually the behaviors often should perform better.

    what you suggest to me please ?

  • I don't really have one. It's just that the rotate behavior is a very light behavior, and since it's only used on one sprite it's hard to believe it's a contributor to bad performance.

    You can't really squeeze any more performance from something so simple.

    My thought is the lag you're encountering has nothing to do with your game.

    But perhaps someone else has tips. I've only ever used the html5 and nw.js exports.

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