tarek2's Forum Posts

  • I'm gonna add some pictures as examples so its more clear what I was trying to explain above:

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

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

    And the same three examples but using LOS to Origin Points

    Se how on the LOS Origin Points example we need to adjust the LOS Range depends on how big is the enemy, this makes it impossible to keep track what LOS Range you should use especially when you have near multiple enemies and all have different sizes, is not possible at the moments with "Origin Point LOS"

  • I totally agree it should be included the option of "LOS to polygon" for the people that need to use instead of Line Os Sight to the Origin Point, as many Games needed LOS to polygon not Los to Origen, Example many years ago I was making a game like Agario and the biggest problem I had is how to detect the Enemies with LOS as each enemy can have different sizes and you cannot use one LOS Range size for all, example one object can have 3000 px sizes while other can have 100px size, so if you have some Ai logic that has to trigger only when you have an enemy at 100 Range then is impossible but if we had the LOS to polygon then doesn't matter how many different sizes the object will have then you can always detect them at the same range 100px for example, I had to drop the project on that Time as it was quite complicated to make it without this feature.

    Here is more visual using the same example as above:

    Player 200px

    Enemy 3000px

    Enemy 1500

    Enemy 100px

    So if I want to have AI to do attack the Player when an enemy is on Range 100px of the Player, then first the player has to have a LOS Range minimum of 1600 so it can detect at least the enemy that is size 3000px

    SO I have to set Player LOS Range =1600

    but here is the problem:

    Enemy 100px Size >>>>It ill be detected at player distance 1550px away not 100px Range as we wanna

    Enemy 1500px Size >>> It ill be detected at player distance 850px away not 100 as we wanna

    Etc......

    This was making any AI impossible to make because you had to create hundreds of extra filtering events due to this problem because this Agario type Game the Enemies are constantly (Growing & Shrinking).

    So if instead, we had "LOS to polygon" then I could have only one Event

    Start of layout >>>> Set Player LOS Range = 100 & "LOS to polygon"

    Then:

    Player has "LOS to polygon" To Enemies >>>>> Actions

    It should be included as is essential for many Games, it can not hurt to add the extra option so people can choose which they need most why it should be limited, maybe its been working for people because they didn't have the option but not everyone had the same luck as I remember I had a lot of problem because of this specific problem and I requested many years ago as you can see here

    https://www.construct.net/en/forum/construct-2/general-discussion-17/plans-upgrade-line-sight-c3-129012

  • Greaver

    Are you testing on iPhones? if so I had similar problems but I managed to fix it, you can read it here

    https://www.construct.net/en/forum/construct-3/how-do-i-8/view-landscape-phone-151204

  • A little project I'm making for a jam. Trying to create a 3D platformer.

    https://media.giphy.com/media/Wm8R8vsZ0ZYo6y56s3/giphy.gif

    Nice Doop looking Grate, anything with Ninjas has high chances to win ))

    Good luck with the Jam

  • LaurenceBedford Np problem mate

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

    ciko

    It seems that SafeAreaInsetLeft/Top/Right/Bottom functions could solve those problems but they don't work, they show 0 in every situation...

    And don't now why those functions work in Cordova app (for Android with cordova-plugin-android-notch), but don't work in Construct which uses Cordova?!

    So it's possible then? I haven't seen anyone doing this thing yet using Construct

  • Here is one for how to Pick instances directly by UID with the new "getInstanceByUid" that Ashley added, Really handy Thank you for adding it.

    The best thing about the new Pick by UID is that you don't have to reference it first on the scripting with "const Variable = "

    C3P: https://www.dropbox.com/s/8x315bbnfex7etf/Pick%20by%20UID.c3p?dl=0

  • Just adding another example of using arrays & events.

    Array examples

    Awesome sizcoz really nice addition, Thank you

  • Here is an example of one App Covering the Notch counting when it's rotated also:

    Notch at the Left;

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

    Notch at the Right;

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

    But covers just the Notch area so it doesn't lose more screen size from the other side

  • If you want the Apps to look good at their native full-screen size the best option is "Cover & ScaleOuter & Hide Statur Bar" but Unfortunately the problem still persists as we don't have the way to detect where the notch is located at the "Right or Left" side because the phone can be Rotated, so you have to add two black bars one on each side if you want to cover the notch area but this will be limiting the screen size view because we can't detect the Noch Position.

    If we had the Notch Position will be much straight forward to adjust the UI even if they rotate their Phones

    So at moments is not possible to do this:

    or

    This

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

    If you need to something like this you need to count as the phone has two notches and add two black bars one on each side it's very limited at the moments.

    Many apps they adjust their apps UI as I show you above very easy, will be nice if we could that too to make better UI design.

  • Unfortunately, the trick didn't work on iOS as it adds black marks on both sides like if we use letterbox Scale but much smaller Black bars.

    Also the "construct-mobile-notchfix" is not included on the config.json and config.xml when you export to iOS.

    Here are the results:

    Auto & ScaleOuter & Hide Statur Bar

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

    Cover & ScaleOuter & Hide Statur Bar

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

    Letterbox Scale & Auto

  • > > tarek2 It only cuts from the top (my game runs in portrait mode), and I only tried it on Android.

    >

    > Awesome I will give it a try, I hope it works for ios too, Thanks very much for the tutorial ))

    tarek2

    Let me know how it goes as I'm planning on releasing to apple but I haven't yet due to the notch bug with c3 exports.

    Sure np, I will update here the results the sooner I test it

  • tarek2 It only cuts from the top (my game runs in portrait mode), and I only tried it on Android.

    Awesome I will give it a try, I hope it works for ios too, Thanks very much for the tutorial ))

  • Yeah, if you remove the plugin, there will be a black area where the notch is. So the viewport will be smaller than the screen size, but at least it will not cover your graphics.

    Ho that's what I tried to do but it never worked for me as it cuts from both sides and put black marks on both sides instead of just where the Notch is located.

    Does for you cut from both sites or just from where the Notch is? dop2000

    I forgot to mention that I was testing on iPhones if that makes any difference

  • Which problem do you have guys?

    is the Notch plugging no detecting properly that the phone has notch?

    or

    That you cannot detect where is the Notch locate? example for landscape it could be at the (Right or Left) side depends if the phone is rotated

    Because if is the later one, I have the same problem that I couldn't detect on which side is the Notch so I can adjust the Game UI, also apart from leaving the space for the Notch I also wanted to cover it on black so you don't see two empty holes where is the notch located.

    If you have the same problem as me maybe we should open an idea request for voting as the Notch at the moment is very limited and we need more settings to properly work with the UI of our Apps

    Here is the problem I had

    Normal phone view without counting for the Notch

    Here If we no the way to know where the Notch is located right or left I could cover it in Black the Notch part Area and move the UI separate from the Notch and keep track of the phone if rotates so we can adjust it again on the other side, because right now you have to leave spaces on both sides and you cant cover both sides on black as that will cut to much space of the Screen.

    And this is how will look if we knew where the Notch is located

    Covering the space Notch Area in black and leaving space so the UI starts after the Notch Area

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

    I already mentioned to Scirra on this bug report

    https://github.com/Scirra/Construct-3-bugs/issues/3431

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Funny around one week ago I finally said that's it today I'm gonna learn the New Function Maps because it's been too long on the waiting list to study and my c2 project uses Call Function by string everywhere, so I took the example from c3 main page called "Functions Maps" and I read it so many times the Tutorial until my brain fried, I couldn't make any sense of what I was reading and I gave up, luckily some good heart on Discord suggested to use Scripting for that.

    It's a shame because it was so useful and Fun and simple to call Functions by strings.