.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
About the VISTABLE
Old
  (#1)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,618
Join Date: Jul 2004
Location: Bulgaria
Default About the VISTABLE - 14-02-2005

I want to ask is there a way to save somewere this vistable because on the bigger maps while this vistable is initializated the lag of CS is very big. In this way the vistable will be loaded from a file and will not lag CS. And some other question - For what is this vistable? What it actualy do? I still don't understand for what is and how to use it in the E[POD]bot coding.
  
Reply With Quote
Re: About the VISTABLE
Old
  (#2)
@$3.1415rin
Council Member, Author of JoeBOT
 
@$3.1415rin's Avatar
 
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
Default Re: About the VISTABLE - 14-02-2005

hm, just calculate the vistable when adding the waypoints and then store it with your waypoint file ... havnt had lagging problems that way.

you can use the vis table to find cover places, for supressing fire, for guarding locations, etc. pp.

It's quite useful to have a nice bitfield class here, you might wanna look that up in the joebot xp sources.


  
Reply With Quote
Re: About the VISTABLE
Old
  (#3)
sfx1999
Member
 
sfx1999's Avatar
 
Status: Offline
Posts: 534
Join Date: Jan 2004
Location: Pittsburgh, PA, USA
Default Re: About the VISTABLE - 14-02-2005

Do you mean visdata? Visdata is a bit field that shows what is and is not visible from any given leaf. You need it.


sfx1999.postcount++
  
Reply With Quote
Re: About the VISTABLE
Old
  (#4)
@$3.1415rin
Council Member, Author of JoeBOT
 
@$3.1415rin's Avatar
 
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
Default Re: About the VISTABLE - 15-02-2005

I think he's not referring the the visdata in the bsp, but to vistables for waypoints


  
Reply With Quote
Re: About the VISTABLE
Old
  (#5)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: About the VISTABLE - 15-02-2005

That's the first thing I changed when I've been working on podbot. I added code to save/load the waypoint vistables inside a separate file (this was not to alter the waypoint format). Maybe Splorygon even improved stuff since. Anyway, look in the pod-bot_mm source code, I'm sure you'll find tons of interesting stuff for you



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: About the VISTABLE
Old
  (#6)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: About the VISTABLE - 15-02-2005

well I changed it to calculate the Vistable at the map start (just when the ServerActivate() is called) at once, not "sliced" like Count Floyd has been doing.
  
Reply With Quote
Re: About the VISTABLE
Old
  (#7)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,618
Join Date: Jul 2004
Location: Bulgaria
Default Re: About the VISTABLE - 15-02-2005

Thanks you guys. I will try to do what I can. But I still don't understand how to use this vistable. Can you give me examples whit C++ code to see how actualy to use the vistable.
  
Reply With Quote
Re: About the VISTABLE
Old
  (#8)
@$3.1415rin
Council Member, Author of JoeBOT
 
@$3.1415rin's Avatar
 
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
Default Re: About the VISTABLE - 15-02-2005

A little code snippet from detecting where supressing fire could be put on. This could of course be done using thousands of traceline, but this'd for sure cause lags.

Code:
// look if we can see some of the nearby waypoints to the enemy
g_Map.m_Waypoints.setDistanceMask(&BFNearEnemy,1,350,p->m_VOrigin);
// dont take the waypoints which are less than 250 units away
g_Map.m_Waypoints.setDistanceMask(&BFNotNearBot,1,250,m_pBot->getOrigin());
BFNotNearBot.negate();
// take only visible waypoints from here
g_Map.m_Waypoints.setVisibleMask(&BFVis,m_pBot->m_iNearestWP);
BFNearEnemy &= BFVis; // everything that's near to the enemy and visible to us
//g_Map.m_Waypoints.broadenMask(&BFNearEnemy);
BFNearEnemy &= BFNotNearBot; // everything that's far enough from me
long lShootAt = BFNearEnemy.getSet(); // get the first suitable waypoint ... randomizing this would be fine too
or to search a waypoint suitable for guarding the bomb

Code:
g_Map.m_Waypoints.setVisibleMask(&BFBVisible,iNearBomb);
g_Map.m_Waypoints.setVisibleMask(&BFPVisible,m_pBot->m_iNearestWP);
g_Map.m_Waypoints.setDistanceMask(&BFBNear,1,450,pGoal->m_pPerceipt->m_VOrigin);
// search only the waypoint which are visible to the bomb and to the bot
// if you would just search the best waypoint in the view of the bomb,
// you would have sometimes more than one bot near a waypoint, this way
// they may guard the bomb from more than one side
BFBVisible &= BFPVisible;
BFBVisible &= BFBNear;
// search the waypoint with the least visible waypoints around
// only those which are marked in the bitfield
iDestination = g_Map.m_Waypoints.getMaximum(&BFBVisible,CWaypointGraph::WG_SEARCH_AVDISTVWP,-1);


  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com