Download Construct 2 release 43

0 favourites
From the Asset Store
Casino? money? who knows? but the target is the same!
  • nice work Construct folk - I'm hanging out for audio!

    Then, Max/MSP for Construct

  • Ah, yes, that results in a a grid being made, thanks.

    Edit: So I've update the .cap because there's still a problem with it once you swap the events. I'm pretty sure the events should only create a grid 128x128x1, as only one Y coordinate is specified. However, it appears to be making a sprite for each and every value in the array. Am I still missing something?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Why are tiledbackgrounds more efficient than sprites? Sounds like its best to use them for anything static.

    It's the same rules as Construct Classic. Grids of sprites are incredibly inefficient at two things: rendering, and collisions.

    For rendering, graphics cards are very good at repetitions and can draw a tiled background of any size in about the same time it takes to draw a single sprite. However, if you have a grid of sprites, they're all drawn separately (because it isn't aware that their positions and angles align to make a grid).

    So if you have a 20x20 grid of sprites on-screen, it draws 400 times slower than if you had a tiled background the same size. It could have rendered an entire tiled background by the time it's finished rendering the first sprite in the grid of 400. That's a pretty massive performance hit. So, always use tiled backgrounds wherever you can!

    Secondly, for collisions there is a similar case. To test if an object overlaps another one, it generally has to test if it overlaps any of its instances. A tiled background counts as one instance, and again a 20x20 grid of sprites counts as 400 instances. So instead of making 1 collision check, it makes 400. Again, 400 times slower.

    Imagine if your grid is bigger than 20x20! Even worse! Once more for luck: always use tiled backgrounds wherever you possibly can!

    However, it appears to be making a sprite for each and every value in the array.

    ceil(random(0, 1)) is almost always 1, because ceil(0.0000001) is still 1. It will only ever be 0 when random(0, 1) returns exactly 0, which is basically never, because there are a lot of possible values between 0 and 1!

    You should also know that 'for each element' also triggers once for every element in a 3D array, including repeating the event for each element down the Z axis. If you have a 128x128x32 array, For Each Element is repeating the event 32 times for each 2D cell, which you probably don't want...

  • by the way, reading this i wanted to make something like that, but with a grid of tiles.

    Here is the result:

    http://dl.dropbox.com/u/23880596/Pasto.capx

  • Hi,

    The link to the "custom movement demo" is broken (in first post).

    Can someone post a link to a well commented demo file or a tutorial using custom movement?

    I'm also interested in any pathfinding that works in Construct 2. Any suggestions?

    Thanks!!!

  • Loathian: In the last release of C2 (r58 available here) you have a folder "Example" which contains at least one working example with the CustomMovement behavior.

    Pathfinding sits here.

  • Locking thread because it's from a very old release and I don't want anyone to get confused and install r43!

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