Rhindon's Recent Forum Activity

  • Ashley - Perhaps this will help me further understand the inner-workings of C3 so I can better manage how I set this game up...

    What are the - oh, let's say - five most CPU-demanding features of C3? Such as the use of Families, For Each, Picking, etc.

    There was a post by one Eleanor who was quite vocal about their opinion on what aspects of Construct worked faster (eg: Picking an object specifically by UID versus Pick All). So, I'm wondering if, however remote, this could help me refine my approach to large scale numbers of objects all running on one very large layout.

    It has been my understanding, further, that For Each literally runs through each instance of an object during that tick it is called on. Naturally, with hundreds, or even thousands, of objects, whether by Family (or perhaps more so because of Families), that's going to demand more CPU. But then again, generally speaking, For Each might not be so demanding. ... That's just an example of my weak understanding of things "under the hood" of this engine.

    I would estimate that this list, if you can provide me with such, won't always be objectively that way - it may shift depending on how the event sheets are set up and other factors. So, I'd expect such a list may be "on average".

    (I'll post this in the Discord channel, too, just in case you're not able to get back to me right away. I know you're quite busy and I always am grateful for your responses.)

  • A task, in of itself, for sure.

    I understand the difficulty in trying to help me isolate the issue but I'll see what I can do from what I've learned. Thank you, as always! :)

  • Hello!

    I'm working on a rather large-scale shoot-'em-up which will have an increase in enemies (and other related objects) that grows exponentially. I'm noticing in the debug that my CPU is topping out at around 95% (more or less) and dropping to 12 fps. Even after adding some checks that disable collision checking on non-essential objects, I'm still seeing upwards of 50,000 collision checks per tick with only 2500 objects.

    I was hoping I could get some tips on how to better manage (and lower) collision checks and speed up the game even when there is a lot of activity going on.

    If it helps, here is the .c3p file to review: https://drive.google.com/open?id=1hMqLnBz9wqTBQbRAEQD3hrdt2TdSEbfv

    Some things to note about what I have so far:

    - One enemy type generates up to 144 small sprites that fade away after a few seconds and destroys.

    - All enemy types can "replicate" themselves, which is how there will be so many very quickly.

    - A second enemy type will use another object to navigate a path it should take. This object that accompanies the enemy type uses pathfinding behavior. At present, I have not instructed the pathfinding to do anything, but it is enabled.

    - The layout is 8100 x 8100.

    - I'm using mostly sprites that range from 30 x 30 to 900 x 900 (and other variances of sizes along these values).

    - I have mostly 9patch objects for wall obstacles.

    - Movement behaviors are mostly limited to 8Direction, TileMovement, and Bullet. The aforementioned object that uses Pathfinding will be used in as limited a capacity as possible.

    Any thoughts or suggestions I could work on to reduce the CPU demand with so many objects and lower the collision checks even with a growing number of enemies?

  • You do not have permission to view this post

  • LOL That should have been so obvious to me by now. I'll test it on my end in the morning. Thank you!

  • It's hard to describe the issue so briefly in the subject line...

    Basically, the Pathfinding behavior of the Virus_DoorsAttk object (the attack type for the Virus_DoorsDef object) for some odd reason seeks out the lower-right corner SectorDefense object regardless of the starting point of the Virus_DoorsAttk. The origin point of the SectorDefense object is dead-center and the bounding box is uniform (octagon shape). The Pathfinding cell size is 5 while the SectorDefense object is 60x60. Even with no other objects in the way, the Virus_DoorsAttk object seeks the lower-right corner.

    The event lines in question start at line 153 (group "Blue Attack").

    Here is the .c3p: https://drive.google.com/open?id=1O4DTsJaHk33fSkghFSRU0gbQYxAScIC_

    Can anyone see why this is happening?

  • dop2000 - While waiting for a reply I continued to do some more digging and re-discovered exactly what you just said. So everything is working perfectly now. Thank you, though!

    However, I did not know about the Set Color action within the sprite, itself! Not sure how I ever missed that!

  • I'm trying to set an object to change its color after a random period of time. After such time, it changes to a randomly selected color (yellow, green, blue, or red). I'm using 3 variables on the object and then plugging those variables into an action that determines the values of the Set Color effect. Initially, all values are 0. After that, the only color I'm getting is red even though I've confirmed that the randomly selected color variable and the other color variables are all working just fine. It's the actual Set Color effect that's not registering.

    In the event line where I use the Set Color effect parameters, I have three separate actions for each color parameter of the effect - 0: red, 1: green, and 2: blue - and plug in each of the object's color-related variables to set the effect value. But, as mentioned, the only result I'm getting is RED. Am I doing something wrong when setting the values of the Set Color parameters?

  • Beautiful! Thank you, Ashley!

  • Aaaah! That makes sense. I've checked and rechecked the documentation many times before to see if I wasn't misunderstanding that...

    Is it possible to update the documentation to make this detail clearer? It's always been my understanding that the evaluations all took place in the text box and the operators were essentially use-as-everything-else (if that makes any sense).

    Anyway, I get it now. Thank you both!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh okay. So, in the text box I would type...

    "text1" | var = "text2"

    .... Correct?

  • I want to use the | logical operator symbol when testing the value of a string instance variable.

    If var = "text1" | "text2"

    However, when I try this, the expected outcome doesn't work.

    I checked the documentation page and it doesn't explicitly state that you cannot use string values but only references numbers.

    Am I correct that | only checks for numerical values and not string? Or is there something else I'm doing wrong?

Rhindon's avatar

Rhindon

Early Adopter

Member since 8 Jan, 2013

Twitter
Rhindon has 2 followers

Connect with Rhindon

Trophy Case

  • 11-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
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies