Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

PVI Quad in Visual Basic

Posted on 2003-02-27
5
Medium Priority
?
277 Views
Last Modified: 2010-04-07
Greetings,

I'm working on a terrain visibility model.  It currently works very well, but I really need to optimize it. I have a height map that is 1000*1000.  I am currently doing line of sight calculations in real-time, however with 64 players on the terrain, doing calculations every turn, the overhead is tremendous. Each calculation can be up to 1400+- iterations per test.  There are 32*32 tests per turn. This is 1,450,000 iterations per turn.  I would like to precalculate the line of sight iterations, but can't simply do it to an array-  To do it with an array of bytes would require a Gig of memory.  My C++ gurus have recommended a PVI Quad algorithim, which I understand conceptually, but haven't written one.  Can someone show me this or any other algorithim to help me speed up this process?  I've scoured the net and come up empty handed.
0
Comment
Question by:ChristianHolmes
5 Comments
 
LVL 4

Expert Comment

by:joachimc
ID: 8041055
Well the answer that comes to mind is to switch language :(
0
 
LVL 1

Expert Comment

by:Hermetic
ID: 8141628
This document might be of help particularly the section on height fields:

http://www.tecgraf.puc-rio.br/publications/artigo_1999_efficient_lineofsight_algorithms.pdf
0
 
LVL 1

Accepted Solution

by:
PurpleFlux earned 150 total points
ID: 8156498
I don't know for sure if this is up your alley, but it might be interesting for you:
http://www.gamedev.net/reference/articles/article1485.asp
0
 

Author Comment

by:ChristianHolmes
ID: 8167156
That was a helpful article.  I have create a psuedo quad-tree that works very well, and requires ONE call to test, so it has increased the speed substantially.  It unfortunately has a max. resolution of 50x50, which is actually very sufficient for my purpose.
0
 
LVL 1

Expert Comment

by:PurpleFlux
ID: 8168674
glad to help :)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is RenderMan: RenderMan is a not any particular piece of software. RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of …
As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question