Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by hurik

i'm making a little strategy game and had a lot of problems with the line of sight of my soldiers. I was trying to check the line of sight with the collision map trace function, but it is not working very good, actually it was a mess.

so i made this little plugin, which checks the line of sight and also is taking entity types in to account ... don't now how fast it is. i'm using small maps ...

and your entity shouldn't call it too often! i, for example, only call it when an enemy is in weapon range and it is the nearest of any possible enemys ...

it a early release so there a lot of problems:
- improve the line of sight check, because when objectWidth, objectHeight are very big and their are very small entities, they can slip through
- collision layer changes are ignored (the collison map is loaded on the init!), this is NOT affecting entities
- no slopes support (i will NOT implement this! but you free to help me!)

here you can find the plugin: https://github.com/hurik/impact-line-of-sight
download: https://github.com/hurik/impact-line-of-sight/archive/master.zip

read the readme!!! no example at the moment ...

questions? suggestions?

edit: how i change the topic? should be: line of sight plugin with entity support

1 decade ago by hurik

hi,

i made some updates and added an example.

you can check out the demo, there you can see how it work with entities. the obstacle in the middle was removed from the check.

the plugin: https://github.com/hurik/impact-line-of-sight
download: https://github.com/hurik/impact-line-of-sight/archive/master.zip
demo: http://www.hurik.de/impact-line-of-sight/
Page 1 of 1
« first « previous next › last »