nimos100's Recent Forum Activity

  • If Textbox = Manuel

    ---Set Textbox = Auto

    Else

    If Textbox = Auto

    ---Set Textbox = Manual

  • Thanks for the clarification, think that was greatly needed

    However in what circumstances is the extra functionality of "On collision" a benefit or where is it intended to be used? At least in my experience I mostly used it with bullets hitting an enemy and then the bullet is destroyed. However you say that it needs to keep track of when the separation happens and touch again. Where as "Is overlapping" doesn't do this and just checks for an overlap, which is really what you need when a bullet hits an enemy for instant as the bullet most likely is destroyed.

    Im a bit uncertain how to formulate the question , but can you give an example where "On collision" would outshine "Is overlapping" meaning where the extra functionality is obvious or what to say? or if anyone else can? I would appreciate it, because im happy with the clarification, but sadly I still don't see the reason to use "On collision" over "Is overlapping", so an example would help me?

  • "Make sure collision conditions are the first condition in the top-level event"

    But then again you should put them first, since that will improve performances regardless of what is stated in r155 as some others have mentioned as well

    Ashley and those did some tests that are in r155, which clearly shows improvements, so something must have happened from there to now, because I doubt they would have missed this performance difference if they tested both of them back then, especially because in there tests they also uses a lot of objects and you don't really need any numbers to see that there is a difference between them.

  • i dont get it, can someone please post a image of how you must do this¿

    "Make sure collision conditions are the first condition in the top-level event"

    how it would look like in a event sheet?

    is

    is overlapping

    >>>> >damage = 0

    or

    is overlapping

    damage = 0

    can someone please explain me?

    As far as I understand it, it shouldn't matter, what is important is that you don't pick any objects first, since that is what should disable the collision cells and force brute force. So both your examples are correct or the way it should be according to r155.

  • Here is an example of how you can do it, I don't think it does exactly what you need, but it might give you some idea of how you can make it.

    It just uses as list where each attack type is stored (Light attack, Heavy attack) When the list reaches 4 attacks, it will call the function "Execute attack" and in that function you can specify what should happen when a certain combo is made. In my example it only deals with up to 4 "Light attacks" but should show you how you could make the others if that is what you need.

    Also it uses an automatic execute counter, so if the player haven't pressed any attack for 2 seconds it will just execute whatever attack combo is in the list. Anyway maybe It can give you some ideas of how to make what you want.

    [attachment=0:23imn4e4][/attachment:23imn4e4]

  • I think its easier to pick them if you convert it to Tile coordinates. That way you can just add integers values as distance to what you want to pick. Here is a very simple example:

    Now in this case I have just chosen a fixed point of the table at (2,2) but it would be the same if it weren't fixed, and then I use a Range variable to set the desired range.

    So you just have to convert the mouse click to a tile coordinate or the sprite thing you use, which you can do with PositionToTileX and PositionToTileY.

    Tilemap.PositionToTileX(Mouse.X)

    Tilemap.PositionToTileY(Mouse.Y)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This kind of depend on your design. But from what I get from looking at the game, you have the line in the middle and to this there are linked two other objects to the end, which if the player touches them they kill hims. So you could do it, so when you create the line and the end points, you store the UID of the line as a variable in the end points.

    Create Line
    
    Create End_point_1
    Set Parent_UID = Line.UID
    
    Create End_point_2
    Set Parent_UID = Line.UID
    
    On Collision Player with line
    Pick End_point_1.Parent_UID = Line.UID
    Pick End_point_2.Parent_UID = Line.UID
     [/code:32doi3q8]
    
    This way of doing it is not really the best way of doing it, but since you don't use families etc. and I guess you are fairly new to C2, if im not wrong, then this way is probably the easiest and then you can always change it later.
  • You have a picking problem, when the player collide with, for instant "Barritaentera" you destroy "Barritalzquierda" and "BarritalDereccha" as well. (Sick names btw ) But you never pick which of these to destroy, so it just automatically pick all of them and then destroy them. You have to pick the correct ones of "BarritalDereccha" and "Barritalzquierda" as well, and the same goes for all of your "On collision" events.

  • Think that's a good idea

  • Use Set animation "<The name of the animation>"

  • FYI to everyone: debug readings are not to be trusted. If you really want to run comparisons, make a spritefont readout and populate it with fps/cpu/objCount/etc.

    Anyway: When I experimented with this back a few months ago, my impression was that 'on collision' and 'is overlapping' tended to be similar to each other vis-a-vis CPU usage. However, when pushed really hard (bullet hell shooter with thousands of bullets), 'is overlapping' had pretty consistent performance, whereas 'on collision' seemed to cause more instances of stutter and slowdown, even if the average CPU/FPS was the same.

    I know that the readings are not 100% accurate, but I don't see the huge importance in that, as stated earlier, its not that important whether its 90.1% CPU Util or 91.3%. But that you can and will see a difference in performance and a severe FPS drop, which you don't have to measure really because you can see everything is lagging around.

    According to the r155 collision changes that someone posted earlier, not all of it seems to be working as stated there. It says that for optimal performance it is suggested that you put "Is overlapping" before any other picking condition to avoid C2 having to brute force collision checks. However in another program I made for testing collision, I get better performance (10-13 FPS improvement) when putting "Is overlapping" as the last condition, after Im done with the picking conditions, which should make it brute force and therefore give worse performance, but its the exact opposite from my experience at least. And that test is with 1700-2000 moving objects, so 10-13 fps is not a small increase.

    (After running it again, its actually more like 17-23 fps with 1740 object)

  • Each bullet has to check against enemies, each enemy has a separate left & right shield which when depleted, the collision is ignored and checks if it collides with the hull afterwards. Drones also check for collision to enable/disable some movement.

    Looking at your collision count in the screenshot, even though you have 1300+ objects, it doesn't actually do a lot of collision checks (approx. 115 / t). Which obvious is because it not 900-1200 bullets, but mostly all kinds of other objects. But you could try for fun to increase the fire rate of your ships and maybe set the bullet damage to 0 or something and just really let the ships fire like crazy to crank up the numbers of bullets and see how much performance drops and how quickly. Because with low amount of objects, you wont really see a huge difference. And 115 /t collisions are very low already, which ofc is just good that you don't need more.

nimos100's avatar

nimos100

Member since 23 Sep, 2012

None one is following nimos100 yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies