Bullet movement vs coding movement

0 favourites
  • 10 posts
From the Asset Store
5 levels with simple coding Source-code (.c3p) + HTML5 Exported
  • I'm building a game based on the flying template built into Construct 2 and I want to export it to CocoonJS.

    Does anyone know what is the difference in performance using the bullet behavior to move sprites across the screen versus creating the movement through actions (i.e. every tick, move X + 5 pixels)?

    Many thanks!

  • It may depend (I'm not sure) on the size of the sprite, the animation, ...

    Anyway, best way to know is to try both, and look in the debugger the difference in performance (CPU usage).

  • I was just curious if someone had a definitive answer based on their experience. I agree - I'll probably run a test with a bunch of sprites and compare them. Thank you Guizmus.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Bullet behavior uses Delta time to determine number of pixels moved per tick, resulting in a constant speed in fluctuating framerate conditions

    So depending on your game you have to decide if you want smooth looking or accurate per pixel positioning...

  • To clarify, the code to produce the movement in this case will also be based upon delta time.

  • No performance difference if you code the movement well. If you overload it with superflous math of course performance will go down. Other wise there is no difference.

  • I have tested this when I started, Bullet Movement is very efficient, it hardly stresses the CPU at all so its my go to for any sort of movement.

    You could even simulate physics with it, using on collision + random(Angle of Motion) to simulate two objects colliding and bouncing off each other, add in "Set Gravity" and "Set Speed" variables and you get realistic mid-air collisions of objects, falling into the ground. It's something to think about until CocoonJS start to properly accelerate box2d/native, which at the moment it struggles at.

  • i wonder how it compares to the moveto plugin

  • Bullet behavior uses Delta time to determine number of pixels moved per tick, resulting in a constant speed in fluctuating framerate conditions

    Is collision detection continuous or there is the possibility that when FPS is low the object "passes through walls"?

  • Only a beginner with CS2 myself, but after trials I decided to run with bullet speed for this endeavour. It was more convenient to use by far.

    "https://dl.dropboxusercontent.com/u/32755330/Splodged%20v1.05/index.html"

    Admittedly my coding for every x seconds to take objects current Y position, add the rate of descent, then set the new Y position, did not use the (dt) command, so it was rather jittery.

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