Visual line of site

Get help using Construct 2

Post » Tue Mar 01, 2016 3:42 pm

Hey follow tinkerers!

I've been working on a visual representation for the line of site mechanic. My take is to create two lines at the same angle as the LOS angle and change the size if the line is/isn't colliding a wall.

Here is the .capx where I have built this: https://www.dropbox.com/s/hlulm66qypu3j ... .capx?dl=0

What I'd love to know is if anybody has any ideas for tightening up this system or even a different way of doing it.

This isn't for any planned projects, its just a bit of fun!

Cheers,
Rob
Need help finding the right look for your game? I can help! hayes2D.com
B
28
S
5
Posts: 177
Reputation: 2,128

Post » Tue Mar 01, 2016 4:03 pm

Message: horoblast can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Maybe this link can help you : https://www.scirra.com/manual/163/line-of-sight ? Also, i haven't tried this yet, but couldn't it also work with solids? If there's a solid between 2 sprites, they can't "see" eachother?
B
6
Posts: 50
Reputation: 367

Post » Tue Mar 01, 2016 4:08 pm

@horoblast You might want to try the capx. I believe you have the wrong end of the stick.

I've made a visual representation of the line of site behavior and I'm looking to improve it.

In essence, I'm attempting to re-create this: https://twitter.com/JoeGribbs/status/701924446429437952
Need help finding the right look for your game? I can help! hayes2D.com
B
28
S
5
Posts: 177
Reputation: 2,128

Post » Tue Mar 01, 2016 4:12 pm

Message: horoblast can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
0Hayes wrote:@horoblast You might want to try the capx. I believe you have the wrong end of the stick.

I've made a visual representation of the line of site behavior and I'm looking to improve it.

In essence, I'm attempting to re-create this: https://twitter.com/JoeGribbs/status/701924446429437952


Oh i see, wow, i'd have no idea :). I've only just recently tried using Construct 2 and am not too "skilled" with it yet :). Hopefully someone will know how to do this and can answer, or you could try to tweet the creator?
B
6
Posts: 50
Reputation: 367

Post » Tue Mar 01, 2016 4:30 pm

@horoblast No worries, it's not a pressing issue. It's just out of curiosity =]
Need help finding the right look for your game? I can help! hayes2D.com
B
28
S
5
Posts: 177
Reputation: 2,128

Post » Tue Mar 01, 2016 9:48 pm

B
94
S
33
G
113
Posts: 5,356
Reputation: 73,273

Post » Wed Mar 02, 2016 9:14 am

Thanks @R0J0hound it looks like ray-casting is the key. A Quick google came up with this tutorial by @sqiddster which I think will do the trick: https://www.scirra.com/tutorials/902/li ... raycasting

Granted, I can't make by mind up how performance will be operating with multiple enemies using 2-4 (4 to create a closed gap) of these. It will be fun to play with either way!
Need help finding the right look for your game? I can help! hayes2D.com
B
28
S
5
Posts: 177
Reputation: 2,128

Post » Thu Mar 03, 2016 9:42 am

@0Hayes i hope you have found/will find a solution to your problem pretty soon with the raycasting you found :)!
B
6
Posts: 50
Reputation: 367


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests