Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When the arena is very empty, vision behaves weirdly #34

Open
samm81 opened this issue Nov 15, 2014 · 4 comments
Open

When the arena is very empty, vision behaves weirdly #34

samm81 opened this issue Nov 15, 2014 · 4 comments

Comments

@samm81
Copy link
Collaborator

samm81 commented Nov 15, 2014

In theory, you should be able to see anything blocked by walls, but when there are very little walls you can still only see in about 3 columns/rows.

@alanhdu
Copy link
Owner

alanhdu commented Dec 6, 2014

Hm...I actually coded it this way. What should the alternative be? That if you're facing one direction, you have 180 degree field of vision?

I'm not sure you should be able to see infinitely off to your left and right. That's how the original hunt does it, but I think it detracts from maze-like quality.

Hopefully, with wall regen, this won't be that big of a deal.

@samm81
Copy link
Collaborator Author

samm81 commented Dec 6, 2014

Well, I think it doesn't make sense if you can't. If there are not walls in
the way, you should be able to see that person in real life right?

But like you said, with wall regen it shouldn't matter as much. I can only
see it becoming an issue in games with lots of people.

On Fri, Dec 5, 2014 at 7:43 PM, Alan Du [email protected] wrote:

Hm...I actually coded it this way. What should the alternative be? That if
you're facing one direction, you have 180 degree field of vision?

I'm not sure you should be able to see infinitely off to your left and
right. That's how the original hunt does it, but I think it detracts from
maze-like quality.

Hopefully, with wall regen, this won't be that big of a deal.


Reply to this email directly or view it on GitHub
#34 (comment).

@alanhdu
Copy link
Owner

alanhdu commented Dec 6, 2014

Hm...fair enough. I guess the question then is how to technically do it.

Write now, I just use the four cardinal directions (except them one to your back) and extend them until you see a wall to get the current view. So, for example

        *
        T
        T
   *TTTT<
        T
        T
        *

How would we make walls block line-of-sight if we do 180 degree vision?

@samm81
Copy link
Collaborator Author

samm81 commented Dec 7, 2014

Yeah, it's tricky. I never said it would be easy hahahaha. Could do some sort of primitive ray tracing, where a square visible only if there's a direct path to the you from it.
Could just make every square visible that doesn't have a wall between it and the direction of the player, like so:

UBUB
 - -
UU^U|B
B|UUUU

Where B is not seen or "blocked" and U is seen or "unblocked".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants