Nilom's Recent Forum Activity

  • Okay I will use instance variables if someone doesn't come up with a better solution. Maybe there is a simple trick or event call for that. :D

  • There is no difference, the number of collision checks (which you can see and test yourself in debug preview mode) remains the same. As mentioned above, optimize performance by using other conditions to narrow down the number of objects that need checking, by using within distance or is on screen or something similar.

    That was the case in Game Maker. Because the engine would focus on one object to check its collision instead of check all hundreds of objects and their possible collisions. It was recommended to check the collisions of the objects with fewer counts. And if I narrow the objects down with distance or is-on-screen wouldn't that also need the engine to check each objects x and y etc.?

    I would use an instance variable to keep track of the state of the tree (0 for stationary, 1 for falling ect.).

    I did not do that because I assume that the engine would need to check each of the trees instance variables first.

    Use an "Else" event after an is overlapping event to set oacity to 100.

    Wouldn't this set all the trees opacity to 100 every tick? That could cost a massive amount of performance.

    Not familiar with this, but the golden rule is that if you can't measure a difference yourself, its not worth worrying about!

    For now I do not have enough of the gameplay ready for testing the childs performance loss. So I wanted to ask before.

    Thank you for the reply.

  • Oh I didn't know that! I thought if it is not picked all of the other objects are affected. But now I see that if another object is picked instead it behaves differently than that. Great to know, thanks.

  • Hello there!

    I have multiple different interactive objects which overlap each other.

    I know how to pick the top most of an object. And I know how to put these objects into a family and pick the top most of this family. But my problem now is that each of these different objects have different things to happen if clicked/tapped.

    So how can I do something like this:

    If object touched "InteractiveFamily" {
    	Pick top "InteractiveFamily" {
     		If object touched "objectA" {
    			..things to happen..
    		}
     		If object touched "objectB" {
    			..things to happen..
    		}
     		If object touched "objectC" {
    			..things to happen..
    		}
    	}
    }	
    

    How can I pick the top most of different objects and then check which of these is picked?

    Thank you in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would not use drag & drop behavior for that. When touched, just set the "angle toward position" -> touch.x & touch.y.

  • My first attempt in doing that would be to spawn a hidden object on the enemy if you cast your trail skill. Let it face the players direction in every step. Then check if its angle changed from the base angle to +360° (if it circled itself one time).

    But there might be better ways to do that. But you could give it a try as a first solution.

  • Hello there!

    I have some questions about performance.

    1) Am I right that it will result in a better performance if I let the player object check if it is colliding with one of the hundreds of trees in my game instead of letting hundreds of trees check if they collide with the player object?

    2) For the tree falling animation I use the spin behavior and check if the tree is 1° to 90°, if so change it to a laying tree object so it will stop spinning. Am I right that it will have a better performance if I swap this tree to another unique tree object before the spinning part so that the eventing will only need to check trees that are actually falling instead of also checking all the hundreds of other trees degrees that are not currently effected from chopping? Or is it more demanding to destroy an object and let another spawn on its position?

    3) I use player to tree collision checking to make the tree 50% opaque if the player is behind. For setting the tree back to 100% opacity I use "on every 0.2 seconds -> tree set opacity 100%". But this affects every tree. Is there a more elegant way to achieve this?

    4) If I set an object to anothers child, it has better performance if I unselect as many of the "child-syncing" options as I can, right? Or do these only really take up performance if their parents are moving or changing their angles?

    Thank you in advance!

  • Thank you! After some testing after my post I got it to work. I guess it was too late to have good ideas. Now I even used timers and got it to work. :)

  • Hello!

    For the interface of my game I want to use the tween behaviour. If the user mouse-overs the interface preview it will tween up. Then he can press buttons inside what came up. When the mouse leaves this area the interface should tween down again.

    How can I detect "on mouse leave"? I tried using a boolean true on mouse-over and setting it to false every tick. But when not mouse-overing that results in the interface permanently tweening down till abyss.

    Any better solutions? Thanks! :D

  • I could indeed just cover the parts with blocks. That would have way less impact on the performance, I guess. But I would need a way to check the background color on runtime. Is there a way to do so?

    Thanks for the demo. I need to learn more about these blend modes.

  • Hello there!

    I'm still figuring out how to make a proper slide menu. Currently I'm trying to find the best way to only show a small area from all the objects of the slide menu.

    The rectangle is the visible area of the slide menu. Inside this rectangle the overlapping (blue) parts of the circles should be visible. The circles are the individual menu objects.

    Every (red) part of the circles who are not inside this rectangle should be hidden.

    I tried to achieve this by just using a sprite with the same color as the background which is placed on top and bottom of the rectangle area. So this sprite just overlaps the parts of the circles that should be hidden with the backgrounds color. The problem is that I do not know how I can set this "HideArea"-Objects color the same as the backgrounds color. How can I check the background color in runtime?

    Or is there a more elegant way to achieve this? Like make a sprite invisible and just make the rectangle overlapping part of it visible?

    Note: There are other objects outside the rectangle that must still be visible.

    Thanks in advance! :)

  • I need each of these buttons to be slideable. The day, month, year etc. .

    The problem I have with the family system inside the editor is that this way I would need to make one separate object for each button and can not use my ButtonCreation function.

    That's a pity that it can not be changed in runtime.

    Edit: Thanks for the demo though. It helped me with another problem. :D

Nilom's avatar

Nilom

Member since 26 Dec, 2019

Twitter
Nilom has 1 followers

Trophy Case

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

Progress

9/44
How to earn trophies