Lncredible's Recent Forum Activity

  • I swear I tried that! But your version works!

    I suspect I made an error like using "loopindex * 1" instead of loopindex +1 which gave me the impression it was all happening at once...

    Thanks for your help all!

  • OK so imagine this.

    1) The red object 2 already overlaps objects 1 but it is not checking for overlap yet!

    2) The red object now checks overlap.

    3) It detects 3 instances of object 1.

    4) It removes them one by one over 1 second intervals in order of Y axis (forget Flash for now)

  • I had a go at it. You indeed need a For Each (ordered) but only for picking the Object2 with the minimal Y coordinate.

    Objects stop flashing if the overlap cease to be, dunno if it's what you wanted but it made more sense to me that way !

    Hi,

    Thanks very much for the help! I don't think I quite explained what I had in mind though - in your game object1 slides over object 2 at different times whereas mine all happens at once (i.e. you place a block that covers multiple objects but it resolves destroying them 1 by 1 based on their Y axis coordintes, regardless of when the overlap began).

    Do you know what I mean? If not I could mockup a diagram to help explain it

    Thanks

  • Hi all,

    I want to write a loop which will:

    • Find all instances of object "1" which overlap object "2" and make them "flash"
    • Sort them by value of their Y axis
    • Loop through them in order of Y from low -> high
    • Destroy them one by one, every 0.5 seconds.

    I have scoured the forums for more information about For Each (ordered) but it seems to be performing the actions as many times as the objects are found, so it isn't helping me! There must be a simple way.

    Hope you can help, Thanks!

  • Hi all,

    I am trying to work out a way of cutting holes out of a layer so that the true background is revealed through a second single "blanket" background. In the picture if you tapped any of the objects on the "Tile Layer" it would disappear and leave a cut-out the same size as the tile that goes as deep as Layer BG but without losing any more of Layer BG+1.

    Until now I've simply been removing one object and creating another on top of it, but it is making the game very object heavy after a few minutes of destroying and discovering more blocks.

    How do I accomplish this? From the picture the following is true:

    Tile Layer = The tiles that sit on top of the game waiting to be tapped by the player.

    Layer BG+1 = The background mask that sits on top of Layer BG.

    Layer BG = True background image - burgundy colour.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I guess this quote also applies:

    'This means our 1920x1080 tile takes up 2073600 x 4 = 8294400 bytes, or about 8 megabytes.'

    'In this case the 1920x1080 image will be placed on a 2048x2048 sized texture in memory!'

    from blog/112/remember-not-to-waste-your-memory

    so if I had an extra wide 32 x 720 tile it would take up the space of 1024 x 1024 sprite in memory, whereas a repeated 32 x 32 would take 32 x 32 in memory.

  • Thanks Ashley - I'll give it a go and post results if I find anything meaningful.

  • Hey,

    I have a question about performance as I am working on a mobile game (1280x720). Which of these conditions is best practice, or if neither, can you explain how best to accomplish the goal without sacrificing FPS? I have read in the performance guides and manual that using large objects is not best practice especially when you could be repeating a smaller object with a Tiled Background.

    GOAL: Create a single coloured object (no colour deviation) in the UI which is 32x720 for minimum performance cost.

    OPTION1: Create an Object and size it to 32x720, fill in the colour, then drag it onto the Layout.

    OPTION2: Create a Tiled Background object and size it to 32x32, fill in the colour, then move it into position and stretch it out to be 32x720.

    OPTION3: Create an even smalled Tiled Background object (2x2), fill in the colour, then move and stretch into shape: 32x720.

    Thanks for your help,

    Lncredible

  • Thanks for your help, R0j0hound; it works well.

  • And some more examples (please consider a 0 as a non existent block):

    000

    021

    111

    Clicking the two in this example should destroy the block, because it has found that there are no blocks directly above it, or directly to the left.

    000

    121

    111

    Clicking the two in this example should also destroy the block because it has found that there are no blocks directly above it.

    111

    121

    000

    And one again, clicking 2 is fine because there are no blocks below it this time.

  • Hi forums,

    I am creating a mining game where you use touch controls to tap blocks to destroy them. At the moment I am using a simple function which identifies the block that was tapped by UID and feeds it to a function that destroys the block.

    These blocks are all in a grid next to each other and none of them overlap. They are all the same sprite but different animation frames (which gives them a different appearence).

    I want to make the function destroy blocks ONLY if there is not completely surrounded by other blocks, i.e.

    010

    121

    010

    If you imagine that the numbers are all blocks of the same sprite. If the user tapped the '2' block it would NOT be destroyed because the game, ideally, chcked and found that it was surrounded.

Lncredible's avatar

Lncredible

Member since 10 Sep, 2014

None one is following Lncredible yet!

Connect with Lncredible

Trophy Case

  • 10-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies