tarek2's Recent Forum Activity

  • 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.

  • 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">

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

  • tarek2

    Thank you very much again!

    I'll read everything you've explained and read the content of the links! This helps a lot!

    After understanding everything, I will redo the game completely, after all, I had not done much until now xD

    And when I finish the game, if you want, I can send a link to the game.

    It's really simple, it's a different version of Ghost Shooter, but with an archer and monsters for him to kill, and I did pretty cool animations of just about everything (at least I think they're cool hahah), actually I'm just doing it to understand how Construct 2 works, to be able to apply what I learned in a more complete and nice game.

    Your Welcome m8

    Sure I would love to test it and see what you come up, the Game it sounds a really cool idea

  • juniorasmj

    Your Welcome m8, I'm glad to help

    1-The short answer is No

    Let's go back the Basics:

    Construc2 Runs the Events from top to bottom

    Now you have "Top Events" and you have "SubEvents"

    "Top Events" = To the First Event where all the action starts, it can have many conditions, here is where you Start the Picking for the (Objects or Variables, etc...) to who you want to apply your Actions.

    As longs as the Conditions are true it will always run their actions plus any subevents.

    Just to make sure you follow me I'm gonna point you the Top Events from the "Capx example" that I gave you

    Event: (1, 6, 8, 11, 12) are all Top Events the ones with Green Arrow are "Triggers" by the way which means they run once only when they trigger, but for now, lets refer to them as top events

    So now as for your question (Bullet On collision with Player) has just one condition if is true will always Trigger & Run his actions and subEvents

    "SubEvents" = is an Event under the rule of the "Top Event" ins the name SubEvent.

    Now these works different, the subEvents will Never run unless the "Top Event" runs.

    so is like saying

    -Unless the bullet hit the player the subEvents (2 & 4) will never be checked

    -Unless event (6) Triggers SubEvent(7) will never be checked

    -Unless (8) Triggers SubEvent(9) will never be checked

    SubEvents have many benefits example to help you filter more the Picking into a different Groups, another one is to help organise your Events and structures so your code becomes easier and simple to understand, plus probably more things that I cant remember

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

    2-Here we have two things going on

    -The first you need to understand that I would like to use and Else as you can see on SubEvent 4 to separate the logic into two categories

    -The first category = equal to if the Health is (equal or greater) than 1 then run these Actions and subEvents

    -Else = if the Health is lower than 1 then Run these actions and subevents instead

    so I have to separate the event 2 from 3 because other ways if I put them together it can mess up the Else on event 4 also is to help me understand the events much quicker because the else is related to the player's Health not to the Hearts so it makes sense to separate event 2 from 3

    So the answer why event 2 has no actions is empty because I use it just to filter players health is => than 1 so I can use the else on event 4

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

    3-Here "Frame" is an Instance Variable of Hearts be careful don't confuse it with the hearts "Animation Frame" you can change the name to a different one if you wish if you think it will confuse you.

    you can do this by clicking on each heart and on the left properties panel look for the section that says "Instance Variables" there you will find one Variable which is "Frame" you can change it to your needs.

    Also there you can see the Values of the hearts example

    You have 5 hearts

    Heart "Frame" = 4

    Heart "Frame" = 3

    Heart "Frame" = 2

    Heart "Frame" = 1

    Heart "Frame" = 0

    So in event 3 or 5 when we ask if heart "Frame" = to players Health it will Pick the heart that has "Frame" = players health

    Example

    Players health = 1

    sub event will pick only the Heart "Frame" = 1

    That's how c2 knows wich heart to Pick as we don't have any two hearts with the same value there is no confusion

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

    4-I explained it on the answer 2

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

    5-Yes, Timers has many benefits, one is to replicate what you were trying to do with the "waits" but the difference is that

    -Timers Are independents to the object or instances that are calling them

    if an object calls a Timer for 2 seconds then the Actions will not trigger until the Timer stops

    Example:

    Event 3 Picks the right heart and starts the Timer for 1.83

    on Timer ended then >>>event 6 will trigger and Pick the heart who called the Timer

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

    6-AFTER the 1.83seconds the Event 6 Triggers and run their Actions

    -you create and you can choose any name you like but make sure you put the exact name when you call the Timer as when you call the Trigger

    example

    event 3 and event 6 both reference the same Name "Hide_Heart" so they are linked

    -Yes event 6 will only Run if you call the Timer first like in event 3 or 5

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

    7-Normally most of the games they link Players Health with the HUD display, where they show the players Health like I did with the Txt object on the screen showing the Health.

    Now I don't know if it will happen in your game but there is the possibility that example 20 Bullets hit the Player at the same time and if the player was already Health = 1 then it should go down to -19

    making the HUD health looking -19 which is weird at list I didn't see it yet on any Game Health going down less than 0

    So the short answer is to limit and reset Health so it doesn't go under -0

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

    8-When you leave an event empty it becomes like "Every Thick"

    -So the Event reads like >>>Every thick update the Txt to display Health

    Note this part is just for debugging where I like to use Txt and update every thick but you should know that this way is very Cpu demanding and is not the correct way of doing it if you wanna display on an exported Game

    The correct way will be to use

    -Sprite Fonts

    -Update the Txt only when you need it, example you could delete event 8 and just update the Txt on event 1 because is when we manipulate the Health, I didn't do it because I didn't want to add more actions there to confuse I prefer to leave them clean just the action related to the event to avoid any confusion

    I hope I clarified all your questions

    Special recommendation for you to check Asap

    https://www.scirra.com/manual/75/how-events-work

    https://www.scirra.com/manual/167/timer

    https://www.scirra.com/manual/134/performance-tips

    https://www.scirra.com/blog/83/optimisation-dont-waste-your-time

    https://www.scirra.com/manual/73/instance-variables

    https://www.scirra.com/tutorials/253/how-to-make-a-platform-game

    https://www.scirra.com/tutorials/243/building-a-platform-game-a-beginners-guide

  • juniorasmj

    Your Welcome

    juniorasmj One thing I can understand why you like to create extra events, is it really necessary?

    Since you did the same set up again every "Health Check" separate on his own Event I take it as you wanna do

    -Every 1 Health substracted then Play destroy animation for a specific Heart Right?

    So if you insist on doing it on separate Events dop2000 give you the best solution use "Else" so you can skip all the events bellow once one of the (Health events check) is true and save extra checkings

    But why not do it even simpler

    you must have a (trigger Event) where you subtract the Health

    Example say the Trigger Event is : bullet on collision with Player >>> subtract 1 from Health

    Then why not Run all the Logic under that Trigger so all the Health checks run only if is necessary

    Example Capx:

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

    Also, use Timers as Doop200 recommended other ways you will keep having Problems that you cannot Debug, you have so many waits there

    Even the Hearts Probably you can combine all of them in one instead of having 5 separates ones

tarek2's avatar

tarek2

Early Adopter

Member since 26 Jan, 2016

Twitter
tarek2 has 12 followers

Trophy Case

  • 8-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
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x5
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

15/44
How to earn trophies