Jump to content
Sign in to follow this  
  • entries
    223
  • comments
    165
  • views
    79660

Apparently not

Sign in to follow this  
Stephen R

115 views

Apparently I could get the FOV done by thisevening because I just finished it. The reason I'd thought that it'd take much longer ws that I was thinking of loads of complicated ways to make sure that the fov followed walls and got blocked by objects near it center and all that kind of stuff. I went trough several different ideas and then just realised that I could make a few assumptions for the fov code and make it both faster and easier to code.

The first is that the FOV is infinite in range - and given the feel of the game, and the style of the maps, this is a perfectly reasonable assumption. The other is that there are never going to be huge open spaces - an assumption which is also true given the setting. So instead of working through a complicated system I just throw out a few rays and make the FOV based on them - it is a tiny bit rough around the edges but hardly noticable. My first assumption isn't that necessary, but it means one less check. The second assumtion could be fixed by increasing the number of rays. But the number I'm using at the moment looks grand.

And here's the screeny.
Sign in to follow this  


3 Comments


Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!