El Constructorr's Recent Forum Activity

  • Here are the screenshots of debug Inspector/CPU/GPU Profiler etc. Again, I want to know what should I focus on most to eliminate the 'heating' issue. The following is taken from Web preview on my HP OMEN Laptop (GeForce GTX 1060, 8GB shared, 120Hz Display).

    Inspector State 1 (this state remains for 70%+ of the game)

    Inspector State 2 (this state appears for 20-30% of the game)

    CPU Profiler:

    GPU Profiler:

    I hope everything is normal in all of them above?

    Ok fine, better question: I hope not everything is abnormal?

  • My game makes the phone literally heat up.. I've already tested on a few high-end phones too, other users have the same complain. It's a Massive physics-based multiplayer game, been working on it since many years on-and-off, which is why things are not as efficient as they should be. Didn't care about performance back then when I started learning!

    With some experience now, I have short-listed the reasons, but I need to be sure which ones are more critical than the other. I need to know which one(s) are likely to be causing the heating issue the most:

    1. Numerous collision events (20+ Physics objects, only two of them moving)
    2. High-resolution sprites! 40+ of them! (max is the background 1080p)
    3. 600+ Events (not grouped, all of them in 1 layout/event-sheet) and 30+ global variables
    4. Layout size: 15300 x 1480 (however, scroll-to enabled with viewport of 1920x1080/scale outer)
    5. Other possible factors: Layer Scaling (not constantly), Time-scale set to 1.5, Photon plugin?

    Note: I'm not using any Effects.

    Thank you!

  • I use anglediff(angle(B.x, B.y, A.x, A.y), B.Angle), this will always gives me a result between 0 and 360. But angular velocity is either a positive or negative value(for clockwise or anticlockwise). Im probably a little stupid here, but I dont understand how a can apply an angluar velocity in the opposite direction of a number thats always positive (0 -> 360)

    anglediff will give you the smallest angle (the difference between the two angles) that should be from 0 to 180 degrees. However, in your case it will probably be within 0 and 90, which is even easier to work with.

    That value should help you find the 'impulse' amount (smaller anglediff means larger impulse) and also the amount of angular velocity (smaller anglediff means smaller torque).

    However, yes, you cannot find out the direction (plus/minus) angular velocity from that. You need to check if the Physics object 'is clockwise from' the bullet direction or anticlockwise.

    So, if [PhysicsObject] "A" is clockwise from [ angle(B.x, B.y, A.x, A.y) ]
    Then, angularVel = angularVel
    Else: angularVel = - angularVel

    All you're doing is checking if the Physics object's origin is towards left or right from the perspective (direction) of the bullet. That will define - or + angularVel.

  • An easy solution could be to have an invisible and tiny Physics 'bullet' sprite pinned to the bullet at all times? So it will be a realistic Physics collision.

    If not that, then you can do it with a Bullet (non-Physics) and hitbox (Physics) by measuring the perpendicular distance from it's pivot (and/or center of gravity that you define) multiplying with a factor of bullet speed, which will give you the amount of 'Torque' that should be applied to the Physics object combined with (inversely proportional to distance) an impulse. This will require a lot of trials and errors. To save time, you can set up a repeating algorithm where you simply adjust the Torque factor and Impulse and perhaps compare it with an identical clones of two Physics objects to see which values match best to the real impact.

    I would personally go with the first option and make life simple.

  • Yes, that's the problem as the above user explained. And yes, increase the text box size (or reduce font).

    Alternatively, if you want Ranktxt exactly where it is, then you can just do this:

    This 'Wait 0 seconds' simply skips the following actions and runs them on the 'next tick'. (So by then, it has already completed reading and writing the Array, and comes back to update Ranktxt in nearly 0 seconds)

  • For the long way (i.e. searching between multiple numbers against numbers to find the match) I suggest using Arrays to store the numbers, instead of strings. Then looping through brute force method. It will consume a lot of CPU, so this searching should be through a function, as a trigger when a new line has been placed.

    But for the shorter way, I do believe there could be. Imagine if each Dot can find out how many lines are touching? then you don't need to do anything else. Each dot will display a text, that's all you need for the game right.

    How can each dot know how many lines are touching? I have no idea! or I must be missing something. Perhaps dop2000 may be able to help here.

  • If only two dots, it shouldn't be hard. You can improvise in many ways.

    For example:

    Pick first one (you can pick it by Top of layer), then send its "num" to a Function.

    That function will Pick the second dot (Bottom of layer), and compare its "num" with the parameters sent (of the other dot).

    So that function will help you pick the other, and also return the matching number.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No. Scirra does not own any percentage or part of your game. Your creation is all yours.

    Except of course, the C3 Splash screen, which you can pay to remove... or let there be.

  • "Wait for signal 'touched' " is why it is not working.

    The signal "touched" is probably signaled 'before' you enter that Event. --OR-- since it's inside a Trigger event (On Touched) it may be just checking for signal at that very moment only.

    Anyway, You must remove the 'Wait for signal "touched" ' and if you think it's important, then try program it differently.

    For example: Have an instance variable for menuButton called "touched', and instead of using signals, use that variable to True. Then, On Touched menuButton, also, if that "touched" is True, then go to Levels.

    hi i'm AC and this Discussion is for chatting you can do what ever you want

    Yeah, until Ashley closes this thread :P

    ..and Welcome Anthony, nice to have you here.

  • Are you sure you're using "Touch" and not "Mouse" object ?

    You must share your c3p project file for us to look what's wrong. OR if your events are not too many, then share a screenshot of eventsheet where Touch conditions are used.

  • It's easily possible. Simple maths would do it, by using the % 'Modulo' (remainder) operator.

    Go to System --> Compare two values, then write this:

    It means, when the remainder of (shots/10) = 0, then do something. So every multiple of 10 (of shots) it will become true.

    Your events will then simply be:

    ..and so on!

    (Note: It will also unexpectedly trigger when shots or kills are 0, because 0%10 is also 0. So just have another condition of shots > 0 to solve that). Let me know if it works.

El Constructorr's avatar

El Constructorr

Member since 3 Aug, 2019

Twitter
El Constructorr has 2 followers

Trophy Case

  • 5-Year Club
  • Forum Contributor Made 100 posts in the forums
  • RTFM Read the fabulous manual
  • Email Verified

Progress

8/44
How to earn trophies