Alternative to Bullet physic behaviour?

0 favourites
  • 11 posts
From the Asset Store
Template for an alternative to falling shapes, fully documented in comments and video
  • I've been reading on ways to improve performance on my game and read that having too many objects using physics (Bullet behaviour in my case) can cause slow downs/frame drops.

    I've got an endless runner game and i've got 7 seperate objects that use Bullet behaviour (4 or 5 of them are for backgrounds and the rest are for gameplay such as platform, obstacle & powerups). The bullet behaviour i'm using is from the auto runner template with just some tweaks to the bullet speed.

    So i was wondering if there is an alternate method, other than Bullet behaviour, that i can use for some of my objects (mainly the background ones) so that it still has infinitie scrolling (as i've got right now) and in turn hopefully improve performance?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • try this : everytick ==> set BG's X to BG.X -1

  • Naji Thanks for the reply. I've tried it and although it does scroll as it does with the Bullet behaviour, it doesn't have Infinity scrolling, so it doesn't loop when it gets to the end of the sprite/image.

    This seems like it could work but is there a way to make it have infinate scrolling/loop?

  • SteveKane

    I think it's fine using Bullet Behavior here. Using an "everytick scrolling" will not improve much.

    But if you want the everytick method, use dt together.

  • This..?

  • Try this ( on a tiled background sprite ) for getting your background to loop after scrolling? Its what I used for my infinite scrolling game and it works pretty well.

  • Thanks you guys for the replies, really helpful. Combining RandomOutput method with Naji works well but I went with eli0s method, it does what i need without using physics or every tick, which i also read can have an effect on performance if used too much (although i'm not using every tick, i'd prefer to only use it if its really necessary)

    Thanks again.

  • Glad you got it sorted, hope your project goes well and to see your game soon SteveKane

  • SteveKane , you can't avoid using every tick if you want smooth movement. In my example the every tick is included at the first condition, any event that is not a trigger (a trigger is displayed as a green little arrow on the left of the event) it's been calculated on every tick, unless its told otherwise. Even an empty condition is equal as like having the "on every tick" condition.

    You could use the "every x seconds" condition to skip ticks and have less calculations, but this will also affect the smoothness of the BGs movement. Here is the same example with the movement at every 0.1 of a second (so it is effectively doing only 1/6 of the original calculations). As you can see, it's like a stop motion, but perhaps I guess that this can actually be aesthetically desired.

  • Oh OK, I didn't know that. Thanks for the info

  • You are welcome

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