tarek2's Recent Forum Activity

  • Hi

    Does the NW.js Work when you preview from the browser?

    I create a text file on my Download folder with Name = A

    And I'm trying to read if the file exists with NWjs but is not working

    Someone suggested me to put double "\\" but it doesn't work either

    Project https://www.dropbox.com/s/ar2svkuvl5q2ec2/nwjs%20test.c3p?dl=0

  • Woow I'm not gonna lie to you at the end I was completely lost and my brain smashed into pieces on this one lol :))

    In your opening post, you talked about overlapping only but it looks like your problem it was the Z ordering of the objects if I understood right by looking in the pictures that Ashley posted.

    So the problem is if you talk about only overlapping the issue is that when two objects overlap doesn't matter which one is on the top or bottom both counts as overlap:

    Example:

    (A is on Top of B)

    A overlaps B

    B overlaps A

    Both are correct as both overlapping each and doesn't matter who is on top or who is on the bottom at least this how C2 Events works, both conditions will be true if you test both conditions one by one separately.

    So that's why I was following your original question and how C2 Events works: and I just concentrate on overlaps in general (Collisions or which objects are touching) ignoring the Z-order.

    So if you wanted to make it more clear from the beginning you could just have talked about the Z ordering:

    Example:

    Walls have to be at the top (Oberlaping Player & Dead zone)

    The player on the Middle (Overlapping dead Zone)

    The dead zone has to be at the bottom

    Position Z ordering Matters

    Now all made sense as you when you were referring (A overlaps B) in the true you meant (A is on top of the B) so if (B was on top of A) then for you doesn't count as overlap if I'm not mistaking.

    So there is it the whole confusion

    Example:

    For you: if you looking (A Overlaps B) so if (B was on top of A) then for you doesn't count as overlap if I'm not mistaking.

    For a C2 User: (A Overlaps B) so if B was on top of A then for us it counts as overlap as is touching it.

    I'm glad Ashley made the problem clear as I don't think I would have figured out by just looking into "Overlapping" in general by C2 definitions, as it doesn't have the concept of who is on (Top or Bottom)

    Anyway, I'm glad you found a solution:)

    I will keep it in mind this whole overlap (Different Perspective View) thing just in case I end up on the same situation in the future Jeje

  • No lol.

    It was in my example (the picture) that:

    Walls over player: True

    Player over Dead angle: true

    Dead angle over walls: No true

    But I want Dead angle over walls to be true.

    I'm really lost, is it not that what I gave you on the capx? have you checked it?

    If you checked the example and is not what you need, can you explain what in my example is wrong?

    The only difference I don't make the dead zone as you because I don't know how you make the dead zone but I think the events to how you check overlap will be the same so that shouldn't be a problem

    On my example you got:

    If Walls overlap player: True

    AND Player overlaps Dead Zone: true

    Dead Zone overlaps walls the same that Player overlaped: true

    Action: Then set Player animation = red

    Will be easier if you could just post a small demo, you don't have to post your whole project just make a small demo enough to make the point, that it shouldn't take you long

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

    Also when you say "But I want Dead angle over walls to be true." what exactly you mean with that?

  • The pick closest suggestion is for less than specific question.

    The overlapping at offset suggestion is for a specific use case.

    I feel like you guys didn't get what we are requesting or I'm missing something?

    the pick by closest by itself it doesn't work as LOS check as it picks only one object and also you need to make extra events to check the distance to simulate if it's inside the LOS Range

    The overlapping at offset you need to make a 360 degrees check at offset to detect any enemy as you could have one enemy at the top RIght and another one at the bottom left for example or more on different Angles, the point you guys missing is the LOS check when it detects it picks multiple enemies in one Pick and they can be at any Angle:

    SO to replicate the LOS for what you guys saying has to loop every tick 360 degrees to check all the Angles by checking overlapping at offset Angle by Angle and pick by pick

    or

    The same thing you loop 360 degrees trowing Ray cast rays at all 360 angles to detect enemies, also here you pick only the first object that intersects no the one is behind

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry I didn't get it fully

    Walls over player: True

    Player over Dead angle: true

    Dead angle over walls: No true

    Are you saying that Dead zone shouldn't overlap walls?

    but player & Wall should be overlapping

    & player should be overlapping dead zone at the same time

    is that correct?

  • You said Doops which I assume meant dop2000 and his use case for blocking objects either along the x, or y axis which is what overlapping at offset was made for.

    Yeah I'm still on Dop200, What I was trying to say is that he point just that specific case but you have to count that it can happen the same thing but on different positions, the enemy could be at the top or bottom of left or right etc.... so you have to look 360 degrees using overlap at offset to detect any enemy at any position

  • No raycasting, or los needed there either.

    Overlapping at offset for platforms.

    So you want to Loop check around the 360 degrees to check for overlaps at offset every thick? doesn't make much sense

  • rolandzarmy

    If I understood correctly this is what you need as you say you use Sprites objects for (Walls & Dead Zones)

    So Following your original request:

    Target:

    -Walls overlap Player

    -Player overlaps dead zone

    -Dead Zone overlaps walls

    Capx: https://www.dropbox.com/s/g8zynip5dj53hal/1-oberlaping.capx?dl=0

    Drag Player blue Object and check for overlaps

    If it's not this what you need let me know what is wrong with it

  • Also, the Doops example is a good one, how many raycasting you will need to cast to detect Enemies on those situations?

  • You would filter out the unwanted results into a variable comparison using distance(), and an instance variable with its radius once you have picked closest.

    Edit:

    This is a completely different topic should you need to figure out more.

    That's the thing I'm trying to point out, You need to do a lot of extra events for filtration so it becomes double or triple performance hit, I know this because I tried it already that's why if it was integrated the "LOS to Collison Mask" then it will be much simple as you don't have to do any extra events by replacing it just with one event and the performance will be better.

    his is a completely different topic should you need to figure out more.

    No worries, I tested everything that it could be tested as once I been working on a project like this for over a year and half or more and I had to drop it because of the performance issue but thanks for the offer.

    I'm just trying to point out that is not that simple for some games to use (Los To Origin or Raycast) as they are more occasions when you need to do (Los to Collision Mask) instead

  • You mean like picking the closest object?

    Yep just picking but not the closes that will be easy to do, instead, you need to pick all the objects that are an example at 400 Pixels away but 400 pixels away from both objects "collision Mask" not origin point as the origin point it doesn't work on this kind of Games because as you can see you have many variations of objects Sizes so you cannot do just one Size Range to fit all of them

  • This is just semantics. Line of sight denotes point to point.

    I can see you, and you can see me.

    Point to polygon does not fit that, raycasting does.

    How would you do Ray Casting if you want to do a game like this? which you need to be aware constantly of all the enemies around you, not just the first object that the ray can intersect, did you get what I'm trying to say?

    https://www.youtube.com/watch?v=E8xO8jWS8NM

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