tunepunk's Recent Forum Activity

  • Found this c++ code that might solve it.

    if (RectA.Left < RectB.Right && RectA.Right > RectB.Left &&

    RectA.Top < RectB.Bottom && RectA.Bottom > RectB.Top )

    Just hope i can translate it to something usable in C2

  • I'm trying to Pick objects that has overlapping BBoxes. So I would guess Object1.BBoxRight < Object2.BBoxLeft would detect if they were intersecting, but would also pick every other instance of Object1 left of Object2. How do I pick only the intersecting instances using BBox?

  • Got it to update now. Don't know why it didn't update before.

  • lennaert I yes using animation frames works well, but it doesn't seem that the layout view updates and shows the correct frame. Not showing the animation/frame i've set it on, for that instance of the object. Always the first frame of the first animation. Maybe a bug I'm having? I have to investigate.

  • My library of sprites in the game is growing rapidly. Is there any good way to bundle them except for placing several of the sprites as frames in an animation? or bundle them as a sprite font? Tilemap doesn't really do the trick since they can differ quite a lot in size. From small pebbles, to buildings, but i want to bundle related stuff in a single object by category, rather than having to scroll through lots of single sprites in Construct.

    Best option so far is adding all my sprites as animation frames, but the layout view doesn't update when i set initial frame for that instance of the object, so I can't really see what I'm placing and how it will look. The benefit of this is that they export as a spritesheet as well.

    Maybe there's some feature that I've missed or overlooked?

  • Looking good, and despite the minimal content i even had fun hunting and getting hunted by other players.

    LG G3

    Chrome

    CPU - ~53 average, Min 45, Max 65

    FPS - ~59-60 average, Min 50, Max 60

    Thanks for joining. I'm gonna have another playtest shortly on a better map. To compare how how wild & crazy I can go with sprites and effects, but still keep good performance. So i guess It was you i shot a couple of times.

  • I've been twaeking and optimizing quite a bit for better performance, and would like some help reporting CPU and Framrates on different devices. (mobile & tablets) If anyone interested in testing please surf on your mobile device http://tunepunk.com/Archer/. Please don't mind the graphics as this is just a test stage.

    To see FPS and CPU usage, click the blue "game settings" icon at the top. Send me a pm or reply here with:

    Device:

    Browser:

    Min-Max CPU:

    Min-Max FPS:

    Other: (if you noticing anything else odd or have any suggestions)

    Controls:

    Left thumb

    Movement

    Right thumb,

    press and pull back to aim and fire, (like drawing a bow)

    tap to dash

    hold to sprint.

    If you wish to join in on more playtests in the future join my facebook group https://www.facebook.com/groups/arrowheads.playtest/

    Thanks a lot for your help and see you in the test area.

  • or something like that?

    yeah that could work.

    I tried that but it seemed that Sprite.X never reached exactly 300. it was 299.249859284752975029478520938752095786209587625

    but i didn't think of rounding in the condition :p round(sprite.x) = 300

    way easier.

  • Just basic movement of an sprite, towards another sprite.

    lerp(self.x, object2.x, 0.1)

    will round actually stop it? i was thinking more of having a condition to make the event false if it was close enough, if the distance between object1 and object2 is less than a certain amount ... The point is that I'm trying to optimize for a lot of objects, so i don't want heavy calculations.

    maybe compare condition like this would be suffice, but I'm not sure if distance calculations for a lot of objects is very performance friendly?

    distance(object1.x, object2.x) > 0.5

    lerp(self.x, object2.x, 0.1)

    Or maybe it would be better to add a variable to object 1 which holds the last x postion, then checking if last position x (minus) current position x is less 0.5? or something like that, but I guess i always have to return a positive value then.

    abs(object1.lastpos-object2.x) > 0.5

    lerp(self.x, object2.x, 0.1)

    set object1.lastpos to self.x

    or something like that? lol

    Just specilating Maybe that would work... better try.

  • I'm using lerp quite heavily and while using the debug i can see that some objects actually never stop. (They just move too small steps to be noticeable) My guess is that this could cause a minor performance hit, so how do I stop the lerp when it's close to the destination, like half a pixel or so?

    And is there a good way to limit decimals in calculations?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Making event sheet clearly is the most important thing in a large project.

    The performanc of plugin or behavior is better than every tick In event sheet usually.

    Thanks. It would make sense, since I'm trying to limit top-level events, which i noticed can increase the performance quite a bit. Instead of running a en set position event every tick, I could just pin once, on layout load or in a function.

  • I'm currently optimizing my event sheet a bit, and wondering if there's any performance benefit to using behaviours instead of Events? From the looks of it, it seems that I could make the event sheet a bit cleaner by using behaviours in some cases, but does it have any impact on performance? Positive or negative?

tunepunk's avatar

tunepunk

Member since 2 Mar, 2014

None one is following tunepunk yet!

Connect with tunepunk

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies