Hi, I'm in the making of a rogue like game and I bumped into two problems.
The first one is my attack system.
It's turn by turn based and I'm having difficulties to create a solution to solve my line of sight problem.
Basically, there is the player and there is the wall. I want the squares behind the wall to be unable to receive damage since the ''fire breath'' started from the player.
Does anyone have a good way of doing that?
Radius and blocked line of sight on a grid.
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Sharkinmytea
- Prole
- Posts: 11
- Joined: Wed Sep 30, 2015 6:03 pm
Radius and blocked line of sight on a grid.
Hey, i'm not a native english speaker, so if you think the word I used is not the one I meant, please tell me
- DeltaF1
- Citizen
- Posts: 64
- Joined: Mon Apr 27, 2015 4:12 pm
- Location: The Bottom of the Stack
- Contact:
Re: Radius and blocked line of sight on a grid.
There are some really good articles on this, that I can't seem to find again >.<
Basically you raycast from the player to find the squares affected by the breath, but there's some other stuff you can do to get rid of irregularities, like flood filling tiny patches where the player might have seen through a wall or something.
Here are some of the articles I found with a cursory Google search, but I'll post here if I find the ones I was thinking of.
http://www.adammil.net/blog/v125_Roguel ... ithms.html
http://www.roguebasin.com/index.php?tit ... dowcasting
Basically you raycast from the player to find the squares affected by the breath, but there's some other stuff you can do to get rid of irregularities, like flood filling tiny patches where the player might have seen through a wall or something.
Here are some of the articles I found with a cursory Google search, but I'll post here if I find the ones I was thinking of.
http://www.adammil.net/blog/v125_Roguel ... ithms.html
http://www.roguebasin.com/index.php?tit ... dowcasting
- Sharkinmytea
- Prole
- Posts: 11
- Joined: Wed Sep 30, 2015 6:03 pm
Re: Radius and blocked line of sight on a grid.
Thanks, with the information you gave me, i searched a little bit more and found exactly what I needed there:viewtopic.php?f=5&p=159707
Hey, i'm not a native english speaker, so if you think the word I used is not the one I meant, please tell me
Who is online
Users browsing this forum: Amazon [Bot], Bing [Bot] and 8 guests