?
Solved

PVI Quad in Visual Basic

Posted on 2003-02-27
5
Medium Priority
?
273 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

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…
Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris. Well, a long time ago, in a galaxy far far away, I was…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

765 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