tunepunk's Forum Posts

  • Nice examples guys, I'm gonna try this when I get home! I thought it would be impossible. Basic things like this should be built in to the engine. ASHLEY. *cough*

  • Normal map extended by matriax

    Would be awesome to have this one on C3.

  • Sorry for the necro, but been looking around for a solution to the same problem i'm having now. 4 years later and still no way to get this position? *sigh*

  • tarek2 thanks for the example. I managed to solve it already by limiting how much the second object could turn. Not very pretty solution but worked for now.

  • I have an object that is moving along a set path, at various speeds. Attached to this object is another object a bit further back, (kind of like a pony tail). When the main object turnsm I want the object that follows to keep the inertia, so it kind of drifts out from the main path. Like the picture. The object that follows want's to continue in the motion before the turn. I searched the forums for inertia examples, but didn't really did what i was trying to do.

    The second object should be like on a string behind the main object, so the inertia is delayed, so the g force want's to pull that object away when turning.

    Any help appreciated.

  • It shouldn't be any problem. Everything outside the view is not rendered, so will not use draw calls or fill rate, so it shouldn't have any effect on performance. The only thing that could affect performance a little bit is total number of instances in your layout, since picking becomes more heavy with more instances.

    But everything in memory is loaded when the layout start, so memory use would be the same regardless of where you scroll to.

    Everything outside the layout will be loaded also, but shouldn't affect the fill rate, or draw calls.

  • I'm fiddling around on some projects on an iMac 24Gb RAM, i5 at work, and I didn't notice any lag so far. Although I'm not really using any effects, and blend modes etc.

    Are you able to reproduce the problem in a clean project, to identify if it's any particular effect that's causing the slowdown on your Mac?

    I tested the c3p file in your bug report and no slowdowns for me, so seems very strange.

  • vubidugil No I don't use it any more. I just played around with it a little bit, so i don't know very much either.

  • Does anyone know any good reference source for swordfighting. I have a project where i plan to rotoscope character animations similar to this at link below.

    I've tried to google but didn't find much good resource material. Any help appreciated.

    Or Maybe better to record my own?

  • tarek2

    Here's a capx I did that has 160 in layout and checking distances between everything on screen very low CPU usage. The trick is to use nearest, you dont have to check distance of every single one every tick. if the nearest one is not even within range there's no point to check all the rest of the instances either.

    Hope that can help you out.

    https://www.dropbox.com/s/3mc7dmbnfs8o8 ... .capx?dl=0

  • tarek2

    16 objects doesn't sound like a lot. Care to explain how it works?, maybe I can come up with something more efficient in your case.

    Are they all checking distance too eachother and get picked if colliding?

  • Maybe just a Trigger once while true will help?

    Otherwize it could probably trigger the jump every tick while Y is more than 0.

    in case the analog is not 100% accurate it may be better to raise the value as well.

    Gamepad: Gamepad 0 Left analog Y axis < -10 or something?

  • Ashley

    Awesome news. I will join the edge bug hunting after the official creators update though, as I have too much important work related stuff on my computer so not very comfortable running insider preview.

    I'll probably mostly look for bugs related to working with touch and pen as main input, as I'm a couch developer :p

  • do you know if is possible example you have 20 objects on the screen the idea is to take the UID of all those 20 objects and just loop between them checking distances between them and depends the distances do some actions those objects, is it possible without looping through the whole 150 instances that are not on the screen

    Forgot to answer this one.

    For this you can just use the "is on screen" condition. I think that's the best way to shortlist.

    Sprite is on screen

    check distance

    That way you first pick only the instances that are on screen, and then you can run your distance calculations on just those.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > I don't know if this work for you, but I sometimes use dictionary to store picked UID's. That way the for each loops doesn't have to loop through a whole family, but only the ones stored in the dictionary. That might work when you have many units in the same family, but let's say 20 out of 100 selected, as you don't have to loop through the 80 that are not selected. I found it to have some performance benefit in some cases.

    >

    > For me the picking itself seems to use a lot of cpu in some cases, so i try to find ways to use some more lightweight way of picking objects. Restructuring the condition order can help a lot too.

    >

    > For example:

    > For each unit (loops through all units)

    > is Selected. (then picks and filters the ones selected)

    >

    > insead use.

    > Is selected (pick the selected ones)

    > For each unit. (loops through only the selected ones)

    >

    > Small things like that can help a lot, but you probably know that already. Trying to filter down with conditions as much as possible before running any for each loops and actions, seems to work pretty well in most cases.

    >

    Hi tunepunk I show you did an interesting test on this how-do-i-pick-multiple-by-uid-string_t190930 very good test Thanks

    Did you manage to find any good results or ways how to improve ?? I will be very interested in that

    do you know if is possible example you have 20 objects on the screen the idea is to take the UID of all those 20 objects and just loop between them checking distances between them and depends the distances do some actions those objects, is it possible without looping through the whole 150 instances that are not on the screen

    In some cases i found that using LOS behaviour could be a bit better, it's pretty much a range check as well, if you set a 360 cone, and they can also utilize the "use collision cells" option.

    Another way that is way less CPU intensive is to use pick nearest/furthest, if something is within the range you set a boolean, and loop through that a few times per tick. It updates slowly but uses less cpu, so can be good for something that doesn't need to be instantly updated, or if you have a lot of instances but most of them are outside the viewport, in other areas of the layout.

    Code looks like this:

    Edit: Added link to C3 project.

    https://www.dropbox.com/s/96e7y0njoqyqd ... e.c3p?dl=0