tarek2's Forum Posts

  • fps is a result of the performance of the processing, optimize the code, objects and the fps problem will solve.

    The correct is to measure by the use of cpu, that in his case have peaks of consumptions unnecessary and for this the fps is unstable.

    Link to example

    Subscribe to Construct videos now

    course of optimization of games in construct 2:

    viewtopic.php?f=191&t=200735&p=1162604#p1162604

    The Problems stated on this thread I dont think is nothing to do with "optimize the code" have a look at this

    Can you optimize the code on here and stop the Stutters?

    Capx:

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

    I run a test with the capx I posted there

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

    Videos Tests Exported with Cocoon Webview

    Iphone 6 Test

    https://www.dropbox.com/s/35k4dykvq2ma7 ... 6.mp4?dl=0

    Iphone 7 Test

    https://www.dropbox.com/s/3fxf7xzxanv2o ... 7.mp4?dl=0

    ==========================================

    If you can fix that with your optimization man you have a bright future on Scirra, you gonna fix something that Scirra couldn't do all these Years, and who knows they may end up hiring you lol <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    by the way, I saw really quick you video looks interesting I will have a look more in-depth when I have Time

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Great job, Signed

  • Toby R

    Thank you for your detailed report, that's exactly what I been experiencing and that's exactly what I was trying to explain on this thread.

    =================

    [quote:2mf8hfec]So again, it looks that we will get rid of the performance issue with WebView at some point (few years I guess)

    That's Exactly what I thought and is the only reason I see some hope and I don't go completely insane

  • No, Apple devices generally aren't blacklisted. But what has pathfinding performance got to do with this thread? Maybe you should start a new thread to discuss that separately.

    I think you missed the Point

    -Is nothing to do with the PathFinder, yes I use the Pathfinder but the truth is to show that Webview is Miles a way to compete with Canvas+ I would say two different universes

    The point was so you can see how slow is WebView executing exported Games from C2/C3 and for that I used the "Pathfinder" as you can see is very clear that they are huge delays in how is processing the C2 code, and I gave you the comparison with Canvas+ which for me is very clear to see who is best for performance

    So yeah it is all related to the thread, did you ever think that perhaps maybe the problems related to stutters can be because of Webview delays in executing the code? between one thick and the other sometimes maybe there is a delay that may cause the stutters and other different problems maybe? this is just a theory to think about it, but I'm not an expert so it could be anything really, I just suggest some ideas in hope of helping fix the problem

    by the way here is a Test done

    in an Iphone 7 exported with Cocoon WebView

    https://www.dropbox.com/s/ezute95v4o9rw64/Iphone7-WebView.mp4?dl=0

    Let's not forget that these tests have nothing just the pathfinder events, still, we didn't add the Game Logic, menus etc.... and look the Performance, can you see anyone doing a Mobile Game like that

    And you Right I think we should open a dedicated Thread for these things as is an important Topic

    https://www.scirra.com/forum/viewtopic.php?f=191&t=201781&sid=1b195ea261512a544da05a8fdcff365f

  • You do not have permission to view this post

  • tarek2 - you've previously reported issues that sound like GPU blacklisting. If the CPU is tied up doing software rendering, that will impact other CPU-bound things like pathfinding too.

    The problem comes down to the GPU drivers, which are made by the graphics chip vendors. It's an industry-wide problem that affects everyone developing with graphics. It's completely out of our hands. Changing technology won't get you away from it: you still have to deal with the same GPU drivers. It's unreasonable to expect us to go and fix Qualcomm's drivers or something.

    Sorry I was tired and I forgot to mention that the videos test is done on an iPhone 6, are all the Apple Devices Blacklisted?

    Because it happens with all the iPhones, I Printed on the screen the render they use and they all say WebGl.

    One thing that I can't understand is why if the device is blacklisted why the delay it shows only on Webview and not in Canvas+? shouldn't be delayed in both cases?

    And I would like to say that we not here to blame scirra or give bad Reviews or anything like that, we just looking for if there are any solutions so it gets fix and so we can carry on making Games. I think now is the best time to talk about this as you are rewriting the new run Time so you should take into consideration these problems and maybe find a solution for the future.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley

    [quote:1dnkvluy]Webviews on modern devices are perfectly fast. I doubt you will be able to measure any performance difference to something like Canvas+, unless the device has a blacklisted GPU,

    A simple test can Revel the truth

    Capx:

    Its done really quick and I didn't look to make it perfect, but it shows my Point very clear

    https://www.dropbox.com/s/nzgkezqa6oehywo/1-WebviewTest.capx?dl=0

    Videos: Test done in an Iphone 6

    This is a test Exported with Cocoon WebView (but exactly the same happens with PhoneGap)

    https://www.dropbox.com/s/ni44kmt4g4svr ... w.mp4?dl=0

    And This is a test Exported with Cocoon Canvas+

    https://www.dropbox.com/s/568asek26khbc ... B.mp4?dl=0

    Steps to Reproduce

    Move around so the Enemies (Red Squares) can find a path to the Player, Every 1 second

    On the Trigger were they start looking for Path I set their frame to 1 which is = Yellow

    On Trigger Path Found I set the Frame Back to 0 which is = Red

    Observed Result

    WebView:

    it takes for Ever to find a Path, you will see that the frame stays Yellow for long periods of Time when it should only blink really quick, meaning that is that slow that sometimes they stack in the same position looking for Path.

    Maybe Here you will not appreciate much but when this happens on my Game where the enemies should continuously hunt the Player and they are about to catch the Player and suddenly they just stop taking a sun bath for long periods of time, doesn't look good at all you cant call it a Game.

    Canvas+:

    Is that Fast that you cant even see the blink from one frame to the other

    And again here you will not appreciate but in my Game, you can see how everything moves Fast, how quick they swap Directions, how quick they execute the Events and many more things, so yeah is a big Gap and you can easily compare them both and find out who is faster, I do.

    ===============================================

    And you would think ok maybe if I do my custom "Path finder" will be Much better but no is not the case, the same thing happens with "loops" you cant use them as it brakes the Game and the stutters make it unplayable swell. there is no solution whatever you do.

    Honestly, between Stutters and WebView processing the code so slow is making us the Live Hell and miserable at last for me, it shouldn't happen especially now that we pay 99 a Year

    I personally spend and waisted 4 exclusively months trying to make work a "Path Finder" that it supposedly should work out of the Box, let alone the Problem with the Stutters all of this thanks to WebView

    In four month how many games, or things I could have done?

    If I was making a living from Mobile Game Development how can anyone afford to lose such a long time just to make work a behaviour or Loops with Webview?

    When you guys gonna start to take seriously the Real problems that we face on our side. when are you gonna start listening to your customers? I mean this is getting really tiring.

    Is there anyone at Scirra doing Tests with Exported Games?? because it cannot be that only us experiencing these things.

    Are you doing anything to fix these Problems in the New Run Time??? I hope yes because it really starts to be depressing.

    I played many many Mobiles Games and I never experienced any of this problem on them only Construct does these things

  • marceloborghi

    I will be interested swell

    [quote:1lggw2n7]the best case I could think of in this situation would be for you to present a game before and after optimistion; do you have any examples?

    +1

    [quote:1lggw2n7]Yes, I have examples Elliott, but I am evaluating whether or not I will do the course, I am measuring only the interest.

    Wouldnt even easier if you show first the evidence so People will be more interested? then you can easily Evaluate if there are enough people interested, the way you are doing it sounds a bit mysterious plus weird and can put people off. Normally if that was true the first thing any will do is put some kind of video showing the Results so people can have an idea of what to Expect and Jump on your course right away.

    I don't say you are laying or anything like that, it just sounds no Right

  • juniorasmj

    [quote:3fu3jlb2]

    So yesterday I had been able to figure out what was wrong and what I could do to fix it. But I just forgot to update the post, sorry!

    Glad you figurate out by yourself that was the main purpose so you can understand why it needs to be that way

    [quote:3fu3jlb2]

    Now the action will only happen when the character collides with the enemy, in the way it should be <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz">

    Excellent you go it <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    [quote:3fu3jlb2]

    I believe everything is working the right way now, you can test the game here: https://juniorasmj.itch.io/ghost-archer-017

    Awesome game and Graphics, this looks perfect candidate for a ( .io) Game Multiplayer keep it up m8 you are doing a great Job

    [quote:3fu3jlb2]Sorry to bother you so often with something so simple, I promise I'll try my best before coming to the forum again :b

    No problem man it's Cool, axially I'm quite surprised how far you went with that short time using C2.

    I have to add here honestly with two weeks only using C2 you did a stunning job you already have a great playable game on the Web in that short time it's a big accomplishment ¡Bravo!

    It puts me into a shame when I look back at when I started I couldn't even dream to make something good that fast jaja <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    [quote:3fu3jlb2]THANK YOU for the help so far, really! You are awesome

    You're Welcome m8 Glad to help <img src="{SMILIES_PATH}/icon_cool.gif" alt="8-)" title="Cool">

  • tarek2

    Btw , I found a solution, but I only managed using System Wait X seconds, as in the print below:

    Using the timer is not working

    Why would work with the "Wait" and not with the "Timer" since they both star a timer for a 1.83sec?

    Here is something to think about it

    Most Devices check 60 Times a second, so this means C2 Checks all your events 60 Times a second

    Now when you have an Event like event 30 which has a condition "Health Is > Grater than 0" and your Player starts with Health = 5 is this event true or False??

    obviously true will be true as longs as the Health is Grater than 0

    So Event 30 is asking if "Health Is > Grater than 0" the Run Event 31

    >>Event 31 is asking is there any "Heart" that match the Instance Variable "Frame" to the Players "Health" ???

    If yes >>>

    Set animation to Break

    Active a timer for 1.83

    Then set invisible

    Now so far good

    Enemy on Collision with Player subtract 1 to Health >>>> Health is now = 4

    Let's analyse your events

    C2 Checks all your events 60 Times a second

    -Event 30 "Health Is > Grater than 0" >>>> yes

    is there any "Heart" that match the Instance Variable "Frame" to the Players "Health"?? >>>>Yes

    Actions:

    Set animation to Break

    Active a timer for 1.83

    Then set invisible

    Question:

    How long can pass until the Enemy collides with Player again? can be anything 1 second or 20sec or 10 Minutes or even 1 hour

    Now let's choose just the lowest 20 seconds, so the player is health = 4 and it didn't collide with the enemy for 20 seconds

    Let's analyse your events

    C2 Checks all your events 60 Times a second

    -Event 30 "Health Is > Grater than 0" >>>> yes

    is there any "Heart" that match the Instance Variable "Frame" to the Players "Health"?? >>>>Yes

    Actions:

    Set (20x60) = 1200 times >>> animation to Break

    Start (20x60) = 1200 times >>> a timer for 1.83

    Set (20x60) = 1200 times >>> To invisible

    And if it didn't collide for 10 minutes?

    60 x 10 = 600

    600 x 60 = 36.000 Times

    Actions:

    Set 36.000 times >>> animation to Break

    Start 36.000 times >>> a timer for 1.83

    Set 36.000 times >>> To invisible

    The poor Heart I think will quite the Gaming Job once for all

    Can you see any problem here? is all explained in post 1 & 2, I gave you the link for "how events work", also check what is the difference between an event that "Triggers Once" and the One that Runs "Every Thick" which is = 60 times A sec

    Take your Time to understand this and many more things, don't rush, is better to spend a few days or weeks understanding this than Rush and after to have to restart the project from the beginning Plus spending Time understanding those things

  • tarek2

    I'm at this very moment trying to redo the game, but I've encountered a problem.

    I did the same way you did in the example, in regards to the hearts disappearing. But here something is happening that I do not know how to fix.

    Whenever I lose 1 life, the heart (frame = 4) begins the animation of being destroyed, but it keeps repeating itself until I lose 1 more life, so it becomes invisible. And so, the heart (frame = 3) stays the same way, repeating the animation until the next life is subtracted.

    The strange thing is that I put the 'HeartHide' Timer with 2 seconds, and in the On HeartHide Timer I put it to leave the heart invisible, so I'm not really finding the solution.

    Here is a print:

    Sorry for the english and for asking one thing you've already explained :/

    Oh, and by the way, here's the link so you can test the game and understand what I'm talking about: https://juniorasmj.itch.io/ghost-archer-122

    The password is: asmj

    The controls are: WASD(Walk), Left Click(Shot), Space (Tumble) and F (show and hide the FPS). I put only 1 enemy, but for you to keep losing life, just keep following him with Tumble or something, I left him very slow to be able to test.

    That's the last question I would spect you not to ask me, since we discuss it extensively on this thread by two persons, me personally on my first post I explained and Doop2000 also explained the same thing so that's why you need a few lashing <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    [quote:30t4y8lt]I did the same way you did in the example

    Not Exactly, yes you use the same Method but you placed them separately Making event 30 the Top Event which is fine if you wanna do it that way but you forgot to put something there if you wanna do it that way.

    If you read the Replays 1 & 2 of this thread you would have found the solution really quick to why is behaving that way or if you had followed exactly the example of my capx you wouldn't have that problem, this means after all this talking you still don't understand the difference between an Event that is "Trigger once" or "Every thick".

    [quote:30t4y8lt]Oh, and by the way, here's the link so you can test the game and understand what I'm talking about: https://juniorasmj.itch.io/ghost-archer-122

    The password is: asmj

    Your game looks Really cool keep up the good work <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile"> I like the Graphics and the archer Games I'm sure you gonna do a great Game