Page 1 of 2

recursive shadowcasting FOV in ascii rogue

Posted: Wed Mar 14, 2012 11:24 pm
by pch
hello

that's just a demo of WORKING fov- I followed a tutorial and managed to make it work:)

enter - generate a new level
arrows - move
esc - quit

pls post any comments: bad and good :)

Re: recursive shadowcasting FOV in ascii rogue

Posted: Wed Mar 14, 2012 11:37 pm
by teh8bits
:O
Vury nice

Re: recursive shadowcasting FOV in ascii rogue

Posted: Wed Mar 14, 2012 11:39 pm
by pch
thanks, but I just found a small problem :( - need to fix it

Re: recursive shadowcasting FOV in ascii rogue

Posted: Wed Mar 14, 2012 11:39 pm
by coffee
Nice, seems working well but ambient is limited. Trying to find flaws. Do you mind add some columns to your rooms? :)

Re: recursive shadowcasting FOV in ascii rogue

Posted: Wed Mar 14, 2012 11:44 pm
by pch
if you want to change the size of whole level:
main.lua: mapH, mapW

if more rooms needed:
main.lua: generateMap(a,b,c)
a - how many times the map will be divided
b - min room size including walls
c- not used

this generateMap is called twice in main.lua: in love.load and in keyPress Enter

eta:
COLUMNS!! - sorry but after writing that for the whole day my brain seems to slow down a bit:)
I'll try to.

Re: recursive shadowcasting FOV in ascii rogue

Posted: Wed Mar 14, 2012 11:45 pm
by teh8bits
You should load maps from a txt file, that would be awesome ;P

Re: recursive shadowcasting FOV in ascii rogue

Posted: Wed Mar 14, 2012 11:53 pm
by coffee
pch wrote: COLUMNS!! - sorry but after writing that for the whole day my brain seems to slow down a bit:)
I'll try to.
lol, np. I think why know why I'm suggesting add them. your rooms were too open and haven't real obstacles so we could see the view intersections with various blocked objects. take your time and go sleep first... :)

Re: recursive shadowcasting FOV in ascii rogue

Posted: Thu Mar 15, 2012 12:05 am
by pch
well, columns are already implemented (not in attachement yet) but there is a problem with algoritm now.
it was much better without collumns:)

will update it tommorow.

Re: recursive shadowcasting FOV in ascii rogue

Posted: Thu Mar 15, 2012 12:11 am
by coffee
pch wrote:well, columns are already implemented (not in attachement yet) but there is a problem with algoritm now.
it was much better without collumns:)

will update it tommorow.
You do well. Get some rest.
I bet it looks better without columns but with them you could notice eventual sight problems.
It's about your FOV be too 45 angle degrees? I noticed that usually rogue FOV's are more "streched"...

Re: recursive shadowcasting FOV in ascii rogue

Posted: Thu Mar 15, 2012 12:15 am
by pch
visible area is divided by 8 (so 45 deg each) - you can see the borders (overlapping "O"make the lines brighter)