New type of object

  • Hello, Scirra!!! I would like to ask if it is possible to add new type of object to construct 2 that will have properties of sprite:rotation point in the center of image, and properties of Tiled background: doesn't use collision polygon.

    And it would ve been nice to be able to paint actions and actions in different colors.

    Best regard , Ivan

  • You can set the tiled background image point to the object center.

  • ooops, found it, but still it'd be nice to have possibilities to lock tiling... Sprites always so havy cause they count collision every tick

  • I don't think they do unless you actually ask them to!

    Can someone confirm?

  • sqiddster's correct, they only check for collisions every tick if you add a event to check for collision every tick.

  • R0J0hound i would agree but why when i use TB i have 62 fps on device and when i use sprites i have 5 fps, same device(ipad) same exporter)

  • TiledBG does draw faster than Sprites, that could be the reason. Does the fps still drop if everything is invisible?

    The only other way for collisions to be tested every frame is if the object has the solid behavior and there is another object with a behavior that reacts to solid.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • R0J0hound - are you saying that a single tiledBG, without actually tiling, would draw faster than one sprite?

  • in my opinion yes, sprites has so many options and stuff, it is impossible that html engine does not request info in the time of processing, the object without tiling, which is pretty annoying, but also without rotating points, and collision polygon would be nice solution for Bg parts that doesn't need to be tiled

  • Tiledbg was faster at drawing in CC, and last I checked my testing showed the same is true in C2.   It's only a bit faster though.

    ElRei

    You could try your hand at plugin making to make such an object, reusing code from Tiledbg and sprite.

  • For the record: if you have a sprite with a single animation frame with a bounding box collision mask, it should have identical performance to a tiled background. It will both render and collision test with almost the same code, so one is probably not faster than the other.

    The biggest performance difference people come across is using grids of sprites vs. using tiled backgrounds. A single tiled background showing a 10x10 grid of tiles renders as fast as a single sprite. However a 10x10 grid of sprites will render 100 times slower, due to there being 100 sprites. The manual warns about this in Performance Tips.

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