The stupid question is the question not asked | |
PerlMonks |
Re: 2d field of view, vision algorithm in grid (ray casting)by Don Coyote (Hermit) |
on Jun 29, 2019 at 08:39 UTC ( [id://11102114]=note: print w/replies, xml ) | Need Help?? |
The '-' ReadKey conditional goes into negative territory. That may cause some metaphysical disturbances for our X. I'd suggest limiting the lower end of visibility. elsif ($key eq '-'){ ! $pov_radius < 1 and $pov_radius-- }The ReadKey function can take octal values for timings so the program will self close after some time without a keypress. while ( my $key = ReadKey(010) ){
In Section
Cool Uses for Perl
|
|