ashes's Recent Forum Activity

  • Ok i found the answer... didnt plan on it but i got stuck behind the pc a bit longer :P

    So what i did was, add 8movement to the rocks and bam it works. The new rocks move to a spot close to the old one and everything works as i want it.

    Now i just need to figger out how big the impact is from using 8movement on so many things, and why does it work with that on? Is it because they are now allowed movement?

    Ow well, thanks for the help :) and if u can answer some of the other questions that would be awesome ;) Otherwise i will keep experimenting.

  • hmm i tried to remove the image point that was outside the collision zone but i dont see alot of change :) Il try another way in a min then im off for this evening.

    If this doesnt work il make that mockup tommorow and i'l find a way to link it here.

  • aha now we are getting somewhere, on start of layout i need to remove things? even if i dont see stuff there can be something leftover? And i have 1 central image point and one off to the right, outside the bounding box. No pixel rounding. Rocks are solid nothing else.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Right took a bit longer then i had hoped but here is my reply :)

    It works... sort of.. I dont know why but even with a hidden proxy size equal to the rock the rocks sometimes overlap. Its not always, and 90% of the time it works but for somereason there are exceptions.

    i will keep working on it, if i find i cant get it to work atall il make a mokup quickly and post that here, perhaps im implementing something wrong :)

    Thanks again for the help. Back to my rocks :)

  • To keep it easy i kept the blocks 1size, not animated and there is no gap. The only requirement is that the colission EQ false

    What you sugested i tried without the invisible ;). I made a rockproxy, put that in place, did a check if there was anything there then replaced it, all until it found some spot without a colission. Problem is i made it visible so the proxys where bouncing over the place. It would offcourse (duh) work better to just hide it hehe. Thanks for the tip, on that note i can just do a rock.spawn and have the spawn be invisible until it finds a spot. Nice! Il try it tonight but pretty sure if it performs that it will do what i want. :D Sometimes its just so easy... :) il let you know how it went tonight :)

    Thanks Pixel!

  • Hello all,

    This is my first post here, just started using consctruct. Im trying to make objects spawn but still check for collision.

    I seem to get everything working except the spawn collision.

    Example:

    So i have for instance a rock with solid and collision enabled.

    And every 10seconds this rock spawns a new rock.

    The rock is spawned on a image point to the right of the original rock outside of the collision area.

    It is then given a new set position to a random spot Random(-20,20) away from this spot.

    The trouble is that each rock does this and the rocks start to randomly overlap.

    So i do a check for collision after the move and if it has collision it moves again. However this is verry ineffective because say i do it with Rock{1} (so i only remove the 2e rock of the collision) i see the rocks moving around on the screen to slowly form a non overlaping pattern, but everything jumps and does things... i dont really want that.

    What i would have liked is calling Move(true) or spawn(true) or something similar to explain to the spawn or move function that it needs adhere the collision and move or spawn to a new spot but adhere to collision (perhaps do a collision check before moving and getting new coords if the collision is true).

    Now i did manage to get this working someway or another (but not like i want it) by adding physics and not setting the position of the rocks but by actually moving them a giving amount of px/pt in a random(0/360) angle. This will make sure i get 0 overlap however everything ofcourse moves abit and its also extremely slow if i for instance generate 10000 rocks...

    So thats a whole bunch of string:), i hope its clear, if not i can post a file here tonight to show what i mean. However perhaps somebody understood what i want and knows a easy way to do this.

    Regards,

    Jasper

ashes's avatar

ashes

Member since 8 Mar, 2013

None one is following ashes yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies