tarek2's Forum Posts

  • Valid arguments from both sides. I'd really like to see some of Rex's plugins/behaviors become officially adopted, but I know that probably won't happen, and if it does, not anytime soon.

    I've already started to remove his plugins from one game I'm working on and replacing with stock event/action coding. Disappointing, because what could be accomplished in one line, requires several. Something like Pin To Image Point should be included in the official Pin behavior.

    Vote for it here: https://construct3.ideas.aha.io/ideas/C3-I-421

    And yes, I too would love to have Scirra adopt Rex's MoveTo behavior. I've added the idea, please vote for it here: https://construct3.ideas.aha.io/ideas/C3-I-440

    3 Points from me To MoveTo <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy"> , it hurts me so much to give 3 Points from our limited Points Basket because for something that it should be included as Default without any botting and those Points it could have gone to something else but hey what can we do I would have given 100 if I could <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    [quote:1b8w85do]Disappointing, because what could be accomplished in one line, requires several

    The same for MoveTo, That's one of the main things why I like MoveTo has the trigger on hit target where you can build all the Logic from that and organise all the events on a cleaner manner, plus much more useful things

    On the side note, I understand the Scirra arguments up to a certain point but we didn't request like you do it right now at a list I didn't, we could have waited longer without any problem, obviously if I have to choose between you work on the new Run Time to make it faster and fix most of the performance issues that we have, I have no doubt I will choose Performance always first anything else can wait, but you see the difference between please wait a bit longer when we will have Time Or >>>"Definitely nooo" there is a big Gap here

  • Have you tested with anything else than Canvas+? That would tell if it's C2 or Canvas+ issue. Also note that Scirra does not support Cocoon officially so you should check if there's a similar issue with Phonegap.

    Hi Toby R Thanks for your suggestions

    [quote:169oxpl9]Have you tested with anything else than Canvas+?

    The other Platforms is hard to say if yes or not both

    PhoneGap = run the Game at high Cpu all the time 90+

    Coccon WebView = the same high Cpu all the time 90+

    one thing good on those Platforms is that (The Layout by Layout) is working at last but still shouldn't run that capx at 90+% on an Iphone (8 or X) when on Canvas+ Runs just at 6% Max so its very ard to say if are not affected those Platforms swell or at least half affected

    Here is the Video Test was done on iPhone 8 Plus

    Video:

    https://www.dropbox.com/s/luun7tld3y9c9br/PhoneGap%20Test.mp4?dl=0

    [quote:169oxpl9]

    Also note that Scirra does not support Cocoon officially so you should check if there's a similar issue with Phonegap.

    I understand what you are saying but That's the thing is hard to know who is the fault as you can see on the first Videos that Special thing that C2 has about optimization (Layout by Layout) is not happening or is not working at all so who is the fault? shouldn't Layout by Layout work irrelevant off the Platform we choose to export??

    I could be wrong though that's why I posted on construct 2 Bugs first, honestly I don't mind who is the fault as long they can find a fix thanks for your suggestions though

  • [quote:32fhzq1h]Hey, thanks goku.

    jeje jeje its been a long time after my retirement that no one recognised me lol Thanks for reviving my legacy

    https://www.dropbox.com/s/r2o8nsnb6fqwirh/SetAngle.png?dl=0

    Add the same thing as you did with the bullet to set angle but this time for the (ship sprite angle) swell not the bulle angle of motion, on event 8 at the first action and it should work like in the picture

  • Scofano

    Angle(Planet.x, Planet.y, Ship.x, ship.y)

    Also you may wanna look on this thread maybe you can find different Ideas

    https://www.scirra.com/forum/viewtopic.php?f=146&t=199630&p=1158099#p1158099

  • Update

    I just Downgraded C2 to the Version R250 and I did the same test but with the same Results

  • Update

    I thought the Problem will be linked to how many objects are created which I had like 300+ on the capx I posted here, so I had another test without any objects just the Player Moving and a Tiled Background with a Super Tiny 8x8 Sprite to visualize that the Player is Moving and my surprise it does the same thing

    At the beginning of the video, you can see that this App it should Run at 3% only I closed the App and reopened and Jumps to 100% staying there I changed to (Layout 2) which is Empty and the 100% wouldn't go back to layout 1 and still the 100% is there, I didn't want to keep longer recording on that 100% Cpu as I'm worried to Fry the Phone but I think you get the point with this short Video

    Video Test for iPhone 8 only But all the iPhones are affected

    Video:

    https://www.dropbox.com/s/mpn6219utr75g ... 9.mp4?dl=0

    Caxp: Exported With Cocoon and used Canvas+

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

    Also I wanna point that I reported High Cpu for no reason on this thread and it took me a very long time to put the videos together and uploading them which you haven't even looked at them wich it may be related to this case and not related to any (containers or Families) as I reported there on that thread if you where to take seriously the reports it may these things would have been avoided really quick, because it looks like you makes look like we trying to give negative reviews to C2 when is not, we just want to improve c2 to keep using it, if we werent reporting these things it will never be adressed and we are the ones that sufer the consequences as we been ignored

    https://www.scirra.com/forum/high-quot-engine-quot-cpu-usage-when-using-families_t197952?start=40

  • Hi guys.

    I'm using 8 direction controls to program movement for AI zombi. The problem is zombie sprite flipps up and then back to normal depending on the player location.

    If the player is to the left zombie flips up and if the player is to the right zombie is normal. I tried flipped appearance but its not working.

    Any ideas?

    Thanks,

    Green321

    Click on the Zombi Sprite and at the Left Properties panel check on 8Direction Properties that you have set the "set Angle" to no by default is at 360

  • netdzynr

    I'm not sure if I understood everything but it sounds something like this maybe?

    https://www.dropbox.com/s/fy4q0y30exjhhf5/ReferenceObjects_InFunctions.capx?dl=0

    you have Picking and passing through the Parameters (normal & as String)

    Using Objects.UID

  • Hello, I am trying to code something that will, when the player stands on a certain object and press a key (shift for example), it would do something (for example, displaying a text).

    I could use "Is overlapping" but since I have multiple objects I wondered if there is a way to make things faster. Thank you in advance for your answers

    You mean is gonna overlap multiple instances of the object at the same Time?

    if not, Player is overlapping object is fine as you gonna use it in a subevent under a trigger

    "On Shift Pressed"

    Subevent: Player is overlapping object

    but an alternative if you don't wanna use overlaps you can use "Pick the Nearest"

    On Shift Pressed

    subevent >>object "Pick the Nearest" to the (Player.X, Player.Y)

    >>Distance is Less than (your Value) >>>do your Actions

    An alternative

    On Shift Pressed

    subevent >>you can use "Line Of Sight" to the object

  • JMTook

    You can try something like this too

    Capx:

    https://www.dropbox.com/s/tztczj1zxqfd3qg/JumpWhithoutDelay.capx?dl=0

  • I'm not sure if this is related and is not to blame C2 but the iPhone 8 is only one month old has been replaced for a brand new phone because the previous one went completely dead after 3 Month of use ,these phones are only been using for testing the games made in Construct, not for personal use so barely they get used unless if is for testing, I know this thing can happen with any phone even if it was a 1 day old can be faulty from manufactury fault and not specifivally c2 faults but can it be this related to this bug??

    as sometimes the Cpu I saw jumping to 120 or 129 % for a very short time but it happens

  • I appreciate Rex's efforts, the above comment makes me once again question why a lot of these plugins need to be community built and not included inside construct to begin with.

    Things like the type effect, moveto etc.

    Anyway not looking to hear the excuses from someone at Scirra yet again - I know not all plugins can be included to suit everyone, but there are a few that are really being used a lot. My comment sounds worse than I'm actually meaning it to be, just a "rhetorical questioning" if you will. I guess there are more important things taking up time.

    +1

    I completely agree they are some of plugins or effects that they don't have to go through the (Vote or Selection) Proces as they are so widely used and are basic staff that C2 should have by default long time ago, why we have to use this useful plugin but with that scared feeling that any time can break and with the possibility that the developer stop gave support to this Plugins.

    Will be nice to have someone that works on this plugins but someone that understand the developer's minds as they will create exactly what the developers needs and things that are missing from the official ones and not a generic Plugin

  • Problem Description

    it seems there is a memory leak or something like that I have no idea how you will call it.

    The first time the App starts and Runs is all good and smooth Runs between 7 to 10% Cpu and as long as you keep Playing without closing the App or change the Layout the Cpu stays stable on those values.

    Now the problem starts when the App closes for the first Time or at the change of the Layout the CPU jumps straight to 100 and stays there permanent the phone gets hot really hot, in one of the occasions it froze the IphoneX.

    Here is the weird thing even when I change to (Layout 2) which has nothing just a Txt box and a Button the Cpu is still at 100 permanent I thought between layouts it shouldn't get affected by other Layouts

    Closing the App and opening it again the same puts the Cpu to 100%

    doesn't matter how many times you close it and open it the 100% Cpu doesn't calm down.

    The only way to stop that and normalize the Cpu back to normal is by turning off completely the iPhone and restart again, but after restart the first time you open the App it will play normally at 7 to 10% Cpu and the sooner you close the App or change the Layout Cpu will be back to 100% permanent.

    is quite serious as it nearly kills the phones

    I tried to reproduce a Capx with the first thing that came to my mind so I didn't optimize anything and is nothing to do with my game I just put something quick roughly putting the number of objects

    that I have on my real project and a loop to give c2 some work and it did the same so I manage to reproduce it Again

    Attach a Capx

    https://www.dropbox.com/s/c46xh0u38j8a8ep/3-Bug%20%28Cpu%20High%29%20When%20Reopen%20App.capx?dl=0

    Description of Capx

    The capx has just a basic controller so you can move around 300 Tiles and some enemies moving around,

    and has some loop to change tiles frames just to keep C2 busy

    Steps to Reproduce Bug

    • Step 1 >> Export and Install the App on iPhone, I used Cocoon and Canvas+
    • Step 2 >> The first Time you play as long you don't close the App or change the Layout keep watching the Cpu to have an Idea how the App it should run normally I got around Cpu = 7 to 10 on Iphone 8 and X Cpu = 40 % on Iphone 7
    • Step 3 >> once you have an idea about how the App it should perform close the App and reopen it again you should see that the App jumps to CPU:100% and stays there permanent you can change to (Layout 2) swell and the 100 Cpu will not calm down
    • Step 4 >> After you opened and closed many times and changed layouts and you are sure that is something wrong going on then you can turn off the iPhone and back on again and try the App again you will notice that the Cpu is back to normal, it will stay normal as longs as you don't close or change the layout if you do then the 100cpu will be back again
    • Step 5 >>I recorded some videos to help reproduce the Problem I didnt want to make the videos long so this is what I did 1-I open the App for the first time and I move around for a few secs/min enough to show the real Cpu usage wich the App it should run normaly 2-I close the App and open it again to show how the cpu Jumps to 100% and there is no way to drop it down even I changed layout to layout 2 many times and is still showin 100%Cpu on a layout that has nothing just a few objects with no events at all Iphone 8:https://www.dropbox.com/s/4h0am6u4pvvjlxo/Iphone%208%20Plus.mp4?dl=0 Iphone X:https://www.dropbox.com/s/bn98tl1xelm2ife/Iphone%20X.mp4?dl=0

    Observed Result

    while you play if you close the App or change the Layout the Cpu jumps to 100% and stays there permanent,

    even when you go to (layout 2) wich has 2 objects only no events the cpu is still 100%

    Expected Result

    I expect that the Cpu stays normal the same as the first time you play wich is when is totally normal doesn't matter how long you play the CPU stays cool, example on Iphone (8 and X ) Cpu is (7 to 10) %

    I expect when I close the App and open it again if the App normally runs at Cpu: 7 to 10 % then it should be back to the same values not jump to 100%Cpu for no reason Trying to kill the Phones

    I expect when I change Layout to (layout 2) which is empty and has no events to run I would expect if (Layout 1) Runs at Max Cpu: 10% with all those events and enemies and loops, then I would expect as an empty Layout Cpu should Run = 1% Maybe? 3%? Not Cpu:100%

    Affected Browsers

    • Chrome: (YES/NO) I don't know is an Exported App
    • FireFox: (YES/NO) I don't know is an Exported App
    • Internet Explorer: (YES/NO) I don't know is an Exported App

    Affected Iphones

    Iphone X

    Iphone 8 Plus

    Iphone 7 Plus

    Operating System and Service Pack

    Windows 10 version 1709

    Construct 2 Version ID

    Yesterday I installed the latest version R254

    but previously I had R252 which is still affected

  • Hello guys,

    A simple thing that I can not do, can you help me? He wanted that when a VARIABLE had the value X, the FOR loop was interrupted.

    I did it, but it did not work:

    global VAR = 3

    System: For "" from 1 to 10

                   system: VAR > LoopIndex

                                  system: Create object Sprite on layer at 360, 450 - 40 * LoopIndex

                   system: Else

                                  system: Stop Loop

    But it does not work. Can anyone help?

    Thank you.

    It works but you need to make sure you put the Loop under any "Trigger" a Function can be good swell or A variable where you can turn it (on or off ) other ways the Loop will keep running none stop because you comparing against the (LoopIndex) the loop stops when is > 3 but starts again from 0 because the Top Event Condition is always true after you stop the Loop >>> For "" from 1 to 10 will be like Every thick if is true do this

    Or another way to stop it the way you do it is on

    The Else>> StopLoop & one more Action set global VAR = -1

    but the proper way will be to put it under a trigger or Function or etc....

    https://www.dropbox.com/s/7j8had08tlgh3sg/Stoop%20The%20Loop.capx?dl=0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi tarek2, Thanks for looking into this. I tried with your bug capx too and got the same result. Interestingly, if you check the timer tags in debug you can see that each sprite has a different tag ("change0","change1","change2") so it seems that the UID is being applied to the tag correctly.

    So the problem is that even if they have different tags if they finish on the same tick then "change"&self.UID still picks them all together, so the function Call "ChangeAnimation"(sprite.UID) will only fire for the first sprite in that group. Adding the "for each" to the function call (as suggested) fixes it, which renders the UID unnecessary.

    OK, I'm pretty sure that explains the issue I've been having - time to rewrite some code! Cheers again

    You Welcome mekonbekon

    Yeah the best thing is For each forever jaja