Page 1 of 1

Line of Sight Demo - IMPROVED VERSION

PostPosted: Fri Aug 22, 2008 2:11 am
by feral
This is a DEMO, not a GAME -
EDIT This version has a small bug - see my next post down - END EDIT
los2.jpg

LOS2.zip
ged and data
(30.13 KiB) Downloaded 233 times

This demo shows how you can set up all the bad guys, to check whether they can see you ( or if you can see them..) - it works with as many enemies as you want (within limits) and works much better then the canvas draw method I showed in another demo.

if they are "red" they can see you... if they are "black" they can't...

It is based on something DST said to me.. so many thanks DST. :D i hope this is what you meant.

you can set it up so that the "line of sight" gets blocked only by walls, or by walls and objects, and/or walls and objects and other characters etc etc

The enemy movements are completely random - and the player movements are a bit off ( too lazy to code it all..)

use cursor keys to move, press space bar to see how it works (in the "how it works" demo everything will slow down because of the number of actors being drawn) so, press space bar to remove the "how it works - demo"

it can be improved somewhat and if/when i do i will post a cleaner faster version, until then ...

Re: Line of Sight Demo - IMPROVED VERSION

PostPosted: Fri Aug 22, 2008 2:46 am
by j2graves
this is great!

Re: Line of Sight Demo - IMPROVED VERSION

PostPosted: Fri Aug 22, 2008 3:29 am
by feral
A slightly different version, but it does not have the bug which somehow crept into the version I posted

In the previous version I posted the "sensors" detect the enemies as well :? which they shouldn't...and they didn't before.... but ...grrrr

I will try to fix both copies into one soon.

in the mean time - here is the version without the bug - sorry - latest version should be los3_2.zip
viewtopic.php?f=6&t=6067

Re: Line of Sight Demo - IMPROVED VERSION

PostPosted: Mon Aug 25, 2008 2:35 pm
by MrJolteon
It says you made that topic at 4:11am :!:
And added Los3_2 at 5:29am :!:
Maybe the time differances. :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :) :) :) :) :) :) :) :) :) :) :) :) :) :) 8) 8) 8) 8) 8) 8) 8) 8) :wink: :wink: :wink: :wink: :wink: :wink: :wink: :wink: :wink: :wink: :wink: :roll: :roll: :roll: :roll: :roll: :roll: :roll: :roll: :roll: :roll: :roll: :twisted: :evil: :idea: :arrow: :| :mrgreen:

Re: Line of Sight Demo - IMPROVED VERSION

PostPosted: Tue Aug 26, 2008 12:51 pm
by MrJolteon
feral wrote:use cursor keys to move, press space bar to see how it works (in the "how it works" demo everything will slow down because of the number of actors being drawn) so, press space bar to remove the "how it works - demo"

I think it's Arrow Keys, not Cursor Keys.