tarek2's Recent Forum Activity

  • Can you show a screenshot of your events where you request and load this JSON?

    Hi Doop

    Sure, I forgot to leave a picture of the events here you go.

    As you can see they are all correct, I normally use Ajax all the time I know there is nothing wrong with the events. I have a feeling that it could be the bug that was fixed a while back here or maybe a new one but it's hard to reproduce on an empty project even using the same JSON that is failing.

    https://www.construct.net/en/forum/construct-3/general-discussion-7/ajax-request-failure-beta-r228-157055/page-3

    The problem only fails with this JSON in particular, not sure if it will help but is a 16MB JSON file that contains a lot of data compressed with base64.

    This layout has nothing else just those events and there is nothing else that it could interfere.

  • -Something similar to "C2 Preview ober Wifi" for testing mobile games fast and fullscreen on phones

    -Improved Functions to pass multiple parameters easier as we had on C2

  • Hi

    It's been a while now that I'm having this weird bug that the Ajax fails to load the JSON, especially when you first run the Game for the first time through the website, it fails always but if you keep refreshing it will load it at the end.

    Two Notes:

    1-It doesn't happen on C3 preview

    2-I cannot replicate on an empty project, I grabbed my Json file from my main project and put it on an empty project then uploaded it to my website and it works. Not sure why it only happens on my main project, there are no events just the Ajax loading and nothing else on the layout that loads the Ajax and also there no many assets just one Background and a few small pictures so I don't see why it would fail on my main project.

    Any ideas what it can be?

    Here is the Console Log Error:

    I'm using R251.2 stable

    Update:

    I just tested R259 and it fails less but still fails example at the 12 try

  • I was just showing you what I am working with. in some cases I use los to determine shooting and in other cases I am using it to determine length of a beam. The main issue is that its global and changes a different object's obstacles because they share the same family behavior.

    So when I clear obstacles for one, it clears them for all, which is NOT as advertised!

    Hoh I see No worries, that's cool then

    you said this is by design. I wonder why?

    I guess it's for performance as it's easier to maintain just one list for all the instances than each instance having its own list but this is just speculation not sure if it's 100% accurate.

    Indeed I had the same problems in the past as LOS is one of the behaviours that I most used and I needed that too so will be nice if could have an update:

    1-Per instance obstacles (This one I guess it could be added easily as they already have collisions filters) so it should be the exact same thing but with custom objects

    2-LOS to Bounding box instead of just Origen point will be very helpful too

    I have never seen anyone requesting it on the official feature request so maybe you could try

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • tarek2 okay, yeah I think I can see what is going on.

    it's pretty complicated the way I have things set up.

    but you see here I have a laser pointer for the turret, and a laser pointer for the ship, they keep going through each other, only one works at a time. And they share the LOS behav in the same family. (sorry I know its hard to see in the GIF)

    It's hard to understand what's going just from that clip

    If you still having problems I think the best thing is to create a small separate demo of what you trying to do and someone can help you to see where the problem is otherways I'm a bit lost now of what you are referring or what you are trying to do.

    It will be much quicker to find your solution.

  • tarek2 > > do you know if it also applies to families?

    >

    > Yes, the family you can count as one single object so the same rules apply

    >

    >

    >

    so that does that mean I can't have the same Family objects using a Family LOS behav and target each other?

    If you mean for example you have Family1

    And then you have events:

    Family1 has LOS to Family1

    That will cause you to target yourself so the LOS will be always true so nope that's not what you wanna.

    The same as Object1 has Los to object1

    To be independents and to not target yourself you need to use a family and a normal object

    Object1 has LOS to Family1

    Or a family that don't have the same objects on both sides Example:

    Family1 has Los to Family2

  • do you know if it also applies to families?

    Yes, the family you can count as one single object so the same rules apply

    I don't understand why out of the 3 Team2 sprites, the 2 to the right start as yellow.

    I was trying to make you visualize that add obstacle are global

    Example:

    -In the first example I used the add obstacle the same as you did but I just added to the green instance that has the "boolean Active" true which is the First at the left

    But as you can see that doesn't work because the last two don't turn yellow at the Run time meaning that they will have LOS

    -In the second example we try the same thing but this time is working as I use the solid obstacle instead and collisions filters that's why you can archive per instance obstacle filter So:

    1-If its yellow it means they have LOS to the Team1 therefore the are no obstacles on the way

    2-If its not yellow it means they have No LOS to the Team1 therefore the is an obstacles on the way

    Meaning that each has their own obstacles independently on the second example

    oh, also the issue I am having is with casting rays, not the bool HasLineOfSight. I'll try to replicate it.

    It should work the same, as if you have an obstacle it will intersect

    I will recommend you test it out first in a small demo and see if it works because if you test it on your main project they may be a lot of other events of things interfering.

  • Yes you are correct the LOS is Global

    Basically, even if you filter instances from the same object and then add to that picked one an obstacle it will be global for all the other instances of the same object.

    You can test it here:

    https://www.dropbox.com/s/ips3dsytougtljf/L.O.S%20Obstacles.c3p?dl=0

    If you notice at the start of the layout I pick only the first Green object at the Left and I add to it the obstacle but the obstacle will be added to all three instances as you can see the last two green instances will not turn yellow at the run time.

    This is by design.

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

    However, One thing you could do but this may not work for all projects, it depends on what you have interacting with solids as it can interfere.

    Instead of use custome, you need to use solid if you can and then use the collisions filters to add obstacles to specific instances this way you will be able to do per-instance obstacles, it's a bit more work to do but at least it's an alternative and is not that much work.

    https://www.dropbox.com/s/ron6eojm8h6a0pw/L.O.S%20Obstacles2.c3p?dl=0

    Will be nice if we could use collision filters swell when using the LOS by custom obstacles or any other behaviours that you need to filter obstacles, maybe could be a feature request.

  • I didn't know there was any difference in Safari between C2 and C3's previews. Their fullscreen rules are obscure, undocumented and change pretty much every Safari release, so it's hard to know why that happens or what to do about it.

    I see, is understandable

    Browsers don't have permission to run a HTTP server, which makes it impossible to implement preview-over-Wifi in the browser, which is why we made Remote Preview instead.

    Hoh ok I didn't know that I guess not much it could be done, good to know so I don't hold any hopes.

    Since that's the only option, it would be better to try to figure out why it's not working at LAN speed for you and what could be done about it. It seems it's working fine for the vast majority of users, as complaints about it seem to be rare.

    I understand

    I must be living in a very difficult area as there are just one or two internet providers here, will be nice if it was available that Virgin internet provider as they are the only company that has real fibre optic with high speed.

    Though our "C3 LOCAL PREVIEW" works really well for me, as fast as C2 Wifi preview or faster and it's consistent because it never fails, the only issue now is that full screen I cannot get it to work which will make it perfect. It Will be helpful if you have any idea how we could make it work in full screen when we export for HTML to work with our "C3 LOCAL PREVIEW" for testing purposes only, that will be the best possible solution as it works fast even in older phones like iphone6 etc...

    I will not take any more of your time then and thank you very much for your time.

  • Hi, Thanks for your response,

    I don't know what you mean. I would have thought they both displayed the same in a mobile browser or supported the "request fullscreen" action equally. What difference are you referring to exactly?

    If I Remote Preview on C3 into my iPhone6 this is how it will look like using Scale Outer:

    it adds the top and bottom grey bar which makes it difficult to set the UI for all the screen sizes + desktop

    Also, I tried to add Request full screen with events but that doesn't work either

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

    But if you use C2 Preview over wifi it will go full screen automatically no events needed, this is how it looks like:

    No Top or bottom grey bars

    So this is exactly how it will look like if you export it to the App store with Cordova so it's easier with c2 preview over wifi to create and adjust all the UI as you never need to export it just to see how the UI will look like at full screen, saving you the need to export each time just for testing UI etc....

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

    Also as I've said in the past, remote preview should be as fast as local preview, so long as the device can establish a LAN connection. Whether or not that happens depends on your network configuration, which is out of our control unfortunately.

    Yes, I understand, that's why I was asking the why? because as a company knowing that no everyone has fast internet normally you would add the tech that would cover most of the cases and that it will not depend on the internet so everyone can experience fast-loading the same as C2 Preview over wifi does just to be on the safe side to appel all the customers not only the ones that have fast internet, I guess wouldn't hurt to add as an extra the C2 preview over wifi and don't forget that also has the bonus that it previews directly on full screen on mobiles which is very important if you build Apps because otherways it forces you to export as Cordova and install on the phones each time just to test the UI etc... to see how it will look on real life. You will fix two problems at once.

  • This is incredible!! very inspiring))

  • Hi Ashley

    Is there any possibility that you can show us how you managed to preview in C2 with a full screen? to use it with our "C3 LOCAL PREVIEW"

    https://www.construct.net/en/forum/construct-3/plugin-sdk-10/c3-local-preview-remote-151788/page-2

    Why does the C3 Remote preview doesn't preview in full screen and on C2 it works?

    I'm wasting many many hours trying to make the mobile game UI as I needed to test in full screen to make work for both (Web & Mobile) but it's very difficult and time-consuming as I have to export each project and install it on the phones, makes changes export again etc.... just to test them in full screen.

    Also on old phones like iphone6, it's still loading very slow the C3 remote preview. I don't understand why you don't include the C2 preview over wifi into c3? as this works perfectly, it loads the games very fast and also it previews them in full screen so it's easier to make mobile games and test them.

    If you don't want to add it in c3 because you want to leave the "C3 remote preview" as a Paid feature then you can add the C2 preview over wifi in c3 as paid feature too, so you don't lose anything. I really don't understand why you remove it when you could have added them both as paid features. You made our lives so hard for making mobile games.

    Tagged:

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