kimtaein1's Recent Forum Activity

  • I read https://www.scirra.com/tutorials/298/performance-tips-for-mobile-games and it says i shouldn't have too many sprites, saying more than 20 is too many.

    Did he mean different sprites or different objects using the same sprite?

    My game becomes really slow on iphone 6 when it has more than 100 objects but it needs to have many objects: many units bouncing off of walls and all of them has collision enabled. Walls have collision enabled too so that i can detect when my units are hitting walls (using Solid + Bullet behavior)

    Thanks

  • In the above image, i have center red point and a few circles around it.

    In a repeat loop, every second, i want black circles to move toward the red point until they reach the point.

    After that, i want in a loop, every second move them back to where they were.

    How would i do this?

    One solution that is in my head is

    1. remember black circles' initial position in their local variable

    2. make each circle face the point

    3. each second, slowly move circles toward the point

    4. detect circles touching the point and if yes, face the circle toward its original position (read from local variable)

    5. slowly move toward the original position.

    I think this would work but i have a gut feeling that construct 2 should have something that makes it easier than having to have multiple local variables and 5 actions....

  • I have 2 different colored unicorn, each has 2 direction, left right.

    So I have 4 animation:

    Red unicorn facing Left

    Red unicorn facing Right

    Blue unicorn facing Left

    Blue unicorn facing Right

    I remember my last X position so that i can see which direction the unicorn is moving toward (left or right, ignoring vertical motion).

    See attached.

    I don't understand why but "R_Left" animation is always playing even when unicorn is moving toward right.

    What is wrong with my set up?

  • I have a sprite that has 3 animations: Default, Left and Right.

    Left is a unicorn running toward left. Right animation is similar.

    I am stuck on what condition i need to use to detect when the object hit solid and bounce back and therefore change direction.

    I only care about X direction (left, right).

    I disabled Bullet's 'set angle' because the object can move in any direction but i only have left or right animation.

    Things i have tried:

    1. Check the object's angle between -90 and 90 to detect facing right and else for left.. It always think it is facing right...

    2. remember the object's last X. Basically i have 2 'on every tick' event, and on the first one, compare the last X to current X and if the last X is less than current X, i assume it is facing right. in the 2nd 'every tick' event (it is right below the first 'on every tick'), i update the instance's last X variable. Doesn't work for some reason.

    3. Debugger shows that bullet behavior has vector X but i don't know how i can use it in Event sheet.

    There gotta be an easier way to do this...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thank you both, using distance to detect border line is really interesting and i might go that route but i am curious is there a way to invert collision polygon? that would be most neat and ideal solution.

    thanks

  • here is what i want to do but don't know how to:

    I created sprite that is just a circle. I only care about its border so both inside and outside of the circle is transparent.

    I added the sprite, and in "edit image" i clicked set collision polygon and later added "solid' behavior to it.

    Now i spawn smaller boxes with bullet behavior that bounce off of solid objects.

    I create them inside the box and set their angle to arbitrary degree.

    At this point, they do not move and i am guessing this is because the collision polygon is set to all areas inside the circle, not just borders. What is the most efficient way of setting up a circular wall so that other objects can move freely inside it?

    Thanks

  • thank you for reply.

    enemies can approach the player from any angle, so if i follow the approach i would have to create many points around the player.

    i feel like there should be a better way to do this.

    I want it to also handle the case where there are multiple enemies surrounding the player and i don't want any of them overlapping each other.

  • I have a top down view game with a player and an enemy.

    Enemy moves toward player using pathfinder but when it collides with the player, it stops.

    At this point, i don't want the enemy to overlap on top of player object.

    I've tried setting solid behavior on both objects but they still overlap.

    I've tried giving them physics but then when the enemy collides with the player, it pushes it around when i don't want them to be able to push each around.

    Thanks

kimtaein1's avatar

kimtaein1

Member since 4 Oct, 2015

None one is following kimtaein1 yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies