Nabu's Recent Forum Activity

  • R0J0hound,

    Because it's tricky to fix it ? Or maybe you got no time.

    By the way, thanks for clarifying.

  • Hello,

    I'm having issues when pasting objects that have your Outline effect applied. When pasting, it draws black pixels around sprites outline. This only happens under Node Webkit export not preview as far as I know.

    Do you know something about this ?

    I found later that it may be related to Outline effect only, and not Paster, but I don't know.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Some kind of magic, thank you very much for your contribution !

  • Up ?

  • Hello,

    I was wondering how to make an AI for moving physics driven space ships. I thought of some things, like readjusting trajectory, compensating torque and trust, set velocity on target, etc... But I don't really know where to start. There gonna be small ships probably with dampeners to make them agile, and large ships with very different movement. Any suggestion ?

  • Hi maugiroe,

    The Construct 2 built in Pathfinding behavior does not work per instance, and has only one global map for everything. You have several add on plugins that may do this. I made a request for this but no answer yet.

  • Hello,

    rexrainbow, I'm doing some performance tests and I noticed that with your plugin I can decrease CPU usage of a heavy loop from 10/15% to almost 0. But it also increase the CPU usage of the C2 Engine. Is it normal ?

  • Hello,

    If you don't know the type of the target, you can create a family that includes all the targetable objects. And then you first pick the family by UID using the Turret Behavior's TargetUID, and try to pick one of the object with same UID.

  • Thanks 99Instances2Go, the plugin looks great. Hard to adapt an already existing project, but promising !

    Also thank you oosyrag for the advices.

  • blackhornet, I could make a little capx but it's more about ideas on optimizations for many units.

    Yes, thanks What I did and explained in my last post is very similar. But as I told it's very small improvement unless you have hundreds or thousands of units. It basically splits the amount of calculations, that remains the same, onto multiple smaller loops. Instead of having one periodic "big" stutter, you get small ones.

    I thought it could be a great optimization, but it's "only" a good little trick. Am I wrong ?

  • Hey fm4fanAT,

    Thanks, that seems to be the way. But I just made a stress test and found no improvement, CPU usage is the same. I set an instance variable for the sprites and a global variable for keeping track of checked groups. On sprite creation, I set the instance variable to the global and increment the global (from 0 to 2, so I got 3 groups of sprites). In the loop I filter the selected sprite to check with condition (if instance variable match the actual global) and increment the global. Before I tested every 0.6 seconds, now 0.2 with 3 times less calculation per loop.

    So it does not lower the total amount of calculations needed of course, but only better divide the amount during same time as before. It only decreases little stuttering that can occur when there is too much calculation in one big loop, by doing more smaller loops.

    Very good in theory, but few results in practice.

    Do you know other kind of optimization when it comes to large number of units ?

  • Tilemap object is relatively well optimized for drawing or collision, as it is a bunch of rectangle polygons to check.

    So it should not be a problem. Thus optimization is very project specific. It would be great if you could provide a capx.

Nabu's avatar

Nabu

Member since 14 Feb, 2015

Twitter
Nabu has 1 followers

Connect with Nabu

Trophy Case

  • 11-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
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

16/44
How to earn trophies