View unanswered posts | View active topics It is currently Tue Apr 21, 2026 2:23 am



Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
 Question about built in Info in TWX 
Author Message
Commander

Joined: Sun Feb 25, 2001 3:00 am
Posts: 1838
Location: Guam USA
Unread post 
Prom , here is an example ..
use _vid_quickfigs to read in your fig list ..
the paramiters are set in twx data .. and if your running _vid_fighits they will be removed as aliens or players kill them.

Now for speed , without these paramiters you will have to reload your fig list before having acuate info.

So for my choice its a no brainer .. paramiters is the way to go.
for ease and speed.

_________________
TWGS V2 Vids World on Guam Port 2002
Telnet://vkworld.ddns.net:2002
Discord @ DiverDave#8374
Vid's World Discord

Founding Member -=[Team Kraaken]=- Ka Pla

Image
Winners of Gridwars 2010
MBN Fall Tournament 2011 winners Team Kraaken
Undisputed Champions of 2019 HHT Just for showing up!

The Oldist , Longist Running , Orginal Registered Owner of a TWGS server :
Vids World On Guam


Wed Nov 21, 2007 3:27 am
Profile WWW
Ambassador
User avatar

Joined: Mon Feb 09, 2004 3:00 am
Posts: 3141
Location: Kansas
Unread post 
Vid Kid wrote:
Prom , here is an example ..
use _vid_quickfigs to read in your fig list ..
the paramiters are set in twx data .. and if your running _vid_fighits they will be removed as aliens or players kill them.

Now for speed , without these paramiters you will have to reload your fig list before having acuate info.

So for my choice its a no brainer .. paramiters is the way to go.
for ease and speed.

From what I've seen, I do not use my fighter list in the standard way because I found it slow.

_________________
               / Promethius / Enigma / Wolfen /

"A man who has no skills can be taught, a man who has no honor has nothing."


Wed Nov 21, 2007 8:56 pm
Profile ICQ
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post 
For me it's always less than 1ms to write or read a sector parm. That's rarely a problem, but in some places (like a ptorp) where it might be you can always precache the parm list into a static array.

Code:
:start_fig_read
     echo ANSI_14 "*One moment please, loading fig list.*"
     setArray $figlist SECTORS
     setVar $idx 11
     while ($idx <= SECTORS)
             getSectorParameter $idx "FIGSEC" $figged
             isNumber $result $figged
             if ($result < 1)
                  setVar  $figged 0
             end
             if ($figged > 0)
                  setVar  $figlist[$idx] TRUE
             else
                  setVar  $figlist[$idx] FALSE
             end
             add $idx 1
     end
:end_of_fig_read
echo ANSI_14 "Fig list has been read.*"
return


Not too difficult at load, takes a few seconds at most and you can re-cache the data whenever you go to recheck the planet number or whatever every half hour or so.

Still, for me parms take so little time to load that the extra effort isn't worth it. Last time I checked my torper routine the whole thing took a whopping .3ms from start to finish. And I can't possibly think of any other situation where that kind of reaction time matters.

I use parms more while I grid tho than for grid defense. It allows me to update my figlist as I go and cut back on the number of refreshes. You can, of course, get similar results with a static array... but that requires that you stay within the script. When the script halts, the array is cleared... but with parms you can run a half-dozen different scripts or stop and restart the script as needed and only refresh when you're done.

The latter comes in handy when you're gridding in an early unlim and some bozo starts plowing figs... you need to shut it off and kill, then restart when you're done. If I had to refresh my figs every time it would really slow things down.

_________________
May the unholy fires of corbomite ignite deep within the depths of your soul...

1. TWGS server @ twgs.navhaz.com
2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads
3. Open IRC chat @ irc.freenode.net:6667 #twchan
4. Parrothead wrote: Jesus wouldn't Subspace Crawl.

*** SG memorial donations via paypal to: dpocky68@booinc.com
Image


Thu Nov 22, 2007 1:51 am
Profile ICQ WWW
Display posts from previous:  Sort by  
Reply to topic   [ 18 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: No registered users and 27 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by wSTSoftware.