tarek2's Forum Posts

  • 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

  • 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

  • Or even better can you share a demo? that will be quicker

  • tarek2

    Yes sorry for not being clear enough. I'll do my best. The walls are the grey objects. The black shadow behind the player is actually a sprite and not a shadow. The other black parts are shadows (you can ignore them as they are not part of this question).

    I want the wall to be over the player as you can see in order to make it a little bit more 3d.

    Haha Thanks, we getting there slowly

    Forgive me but its all-black there I cannot disguise the Shadows from the dead black zone, could you colorate the dead zone on a different colour? so we know who is who as I still don't understand how it will ever overlap the dead zone if its always behind the player

    This is one of those tricky ones to understand if you don't explain it with precision

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks rolandzarmy that's much better

    I'm still trying to follow what you say

    who is the dead angle? Grey object?

    Who are the Walls? Black object?

  • Also, the example that oosyrag for who it is? for people that they been using the engine for at least 1 year as its more for advance people. ibiz could be just a beginner that just starter with Construct so there is no way that you could spect to do those advances things right away but instead, if you had the LOS to "Collision Mask" integrated with C3 then any beginners can start using it since the first day that they started learning Construct and this is by just adding one event

    Enemy has LOS >>>>To >>>>>> your.Object "Collision Mask"

    This is more in line with the Construct Filosofia of an easy to use Engine with behaviours integrated

    That's my two cents

  • The engine does already provide an efficient line-of-sight capability. So it should be possible to customise it to your needs already.

    mm No without hurting Performance huge time, I tried it already before but you have to remove completely the LOS Behaviour and do all the LOS checking by Events, the problem is when you have 50 to 100 Objects that need to use LOS with Events it hurt so much the performance, it will be better to be integrated on C3.

  • rolandzarmy Can you give a visual example like a PNG to what you trying to do exactly?

    I didn't understand this part

    "player overlaps dead angle (dark zone behind the player: where the player can't see)"

    How he can overlap dark zone if it's behind him all the time? didn't make sense to me