Underdog's Recent Forum Activity

  • ok. I think I found the problem but I have no clue how to fix it.

    When my knights and enemies are on screen, I reach a pick of 40000 collision checks :(

  • Hi everyone and happy new year.

    I'm working on a Tower Defense that has some inspiration from Kingdom Rush and I meet a big performance issue with Bullet Behavior at the start of my project :(

    Example:

    After creating a Tower, I can spawn 2 knights who reach a defined position. While moving, my FPS drop from 50 to 30 FPS until they reach position. Once they arrived, my FPS is going back to 50.

    I can create 5 towers, and each time, I have this drop of performance and back to 50 when they do not move.

    I also noticed that my enemy (only one) is taking 20 FPS alone. I was surprised by it. I spawn this enemy 10 times each 3 sec in a random position and they follow the path where I put a few sprites to change the angle of motion.

    I was expecting that it would have been much efficient that the Pathfinding behavior which has the issue of having all the sprites ending on a line.

    By doing the test with 5 Towers (10 knights) and 10 enemies, my FPS drops a lot.

    I tried to add a short delay in order to check every X sec instead of every tick, but it remains slow.

    I really don't understand how I can fix this performance issue, especially that I'm testing on PC :(

    I also tested it on another PC and it is the same.

    I read a lot of threads about performance issue but I did not find any idea for me :(

    I also set the project and layout at 1024,768

    My sprites are 32x32 or 64x64 and the biggest for the castle is 256x256.

    I only have one sprite (knight) that has a weird format 64x101.

    I hope someone may have an idea because I really wanted to do a TD game with Construct 2

    Cheers everyone

  • Thanks Jayjay and Happy New year to all.

  • Hey Katala,

    It would be awesome if you can upload it in CS2 (capx)

    Thank you for your examples.

    Cheers

  • Yeahhhhhh Thank you very much Blackhornet.

    It works!!!

    here is the capx if some people need to do the same kind of stuff

    dropbox.com/s/swdu3508ypb0yfv/Buttons02.capx

  • Thank you Blackhornet, I will try that as soon as I'm back home :)

  • Hi everyone,

    I really need your help or a link that may help me to find why it does not work.

    I have 3 Buttons (sprites)

    When I clic on the Sprite named Target, it creates a BlueButton close to it. When I clic on the BlueButton, it should create a BlueObject on the position of the "Target" that was selected.

    Sometimes it works and sometimes it does not work and I don't understand why?????

    It seems that I have an issue with UID. I posted my capx if someone can help me, I would really appreciate.

    Thank you everyone

    dropbox.com/s/qzb474t9usk6jmh/Buttons.capx

  • I resolved it :)

    I needed to pick instances by evaluating distance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi everyone,

    I have 2 issues here and I don't find any solution. Even by using UID.

    I have 2 enemies that are the same sprite.

    They have Line of Sight, Path finding and solid behavior.

    When the Player is in Line of Sight Range of one of the sprites, the sprite who detects the Player moves. When the distance between Sprite and Player is <40, Enemy sprite stops and plays "Attack"animation.

    This behavior works for the original sprite but not for the instance

    Each sprite detects the Player normally and behaves correctly except for attacking <img src="smileys/smiley18.gif" border="0" align="middle" />

    As you can see the picture below.

    At the bottom, the original sprite works.

    At the top of the pic, you can see that the instance overlaps the Player and does not perform his attack.

    In the middle, if the original sprite reached the Player and then the instance reached the Player, both sprites play their "Attack" animation but they overlap the Player instead of stop at 40 from the Player.

    <img src="https://www.dropbox.com/s/t6hhknwq7yep8gy/MultipleEnemies.jpg" border="0" />

    Do you notice anything wrong on the capx?

    In addition, I would like to have both sprites surround the Player instead of overlapping each other. Is there a way to say, if Player left side is occupied by an enemy, search other side (right/top/bottom)

    If the four sides are occupied, stay at X from Player and check if one side becomes free?

    Thanks

  • Hi TELLES0808

    maybe you removed the file but your link does not work anymore :(

    Would it be possible for you to link it again?

    Thanks

  • Hi TELLES0808

    Not yet, it is my next plan indeed :)

    but I don't have Construct 2 license yet :( so, I can't work with families but I will get my license soon :)

Underdog's avatar

Underdog

Member since 1 Feb, 2013

None one is following Underdog yet!

Trophy Case

  • 12-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies