Natural Selection Economy Simulator
zubata
Join Date: 2003-02-04 Member: 13090Members
<div class="IPBDescription">..check it out</div> People are arguing all the time what number of gorges is optimal or what building order is optimal etc. but their opinions are mostly based on intuition, not on hard calculations. I thought that I could make a tool to calculate this kind of stuff. So I wrote a web page heavily based on javascript (MSIE 5 required, sorry) which purpose is to simulate Natural Selection "economy".
You can see two panels, one for marine team and one for alien team. Those panels show you what res they got, what buildings they built, state of hives, species of players and similar things. You can build structures, upgrades, hives, evolve aliens. You can even kill aliens (this has influence on economy) or let the program kill them randomly. Time is advanced by seconds or by ticks or until given alien players gather given res amount.
You can execute different building orders and the program will show you that e.g. third DC would be reached at 5th minute and second hive started at 9th minute.
I regard this program to be in beta stage - I hope it works fairly well but it's really not flawless.
Unfortunately I am not a NS developer so my insight into the real thing is quite limited. We have no accurate description how the game really works. E.g. the developers said that the tick length is 6 seconds but actually alien tick length is 5 seconds .... on the other hand, aliens per-tick income seems to be adjusted so the real income seems to be as if the alien tick was really 6 seconds ..... Another problem is with times of building of structures which are dependent on fps. Same with the time it takes to evolve to certain liveform. And there are other problems .... Fortunately many of these inaccuracies do not have important impact on the results.
But it seems that the simulation is fairly accurate, at least at the beginning of the game (which is the important phase).
The link is
<a href='http://nakyveci.wz.cz/NSEcoSim.html' target='_blank'>http://nakyveci.wz.cz/NSEcoSim.html</a>
Take a look and tell me your opinions/suggestions/corrections :-)
You can see two panels, one for marine team and one for alien team. Those panels show you what res they got, what buildings they built, state of hives, species of players and similar things. You can build structures, upgrades, hives, evolve aliens. You can even kill aliens (this has influence on economy) or let the program kill them randomly. Time is advanced by seconds or by ticks or until given alien players gather given res amount.
You can execute different building orders and the program will show you that e.g. third DC would be reached at 5th minute and second hive started at 9th minute.
I regard this program to be in beta stage - I hope it works fairly well but it's really not flawless.
Unfortunately I am not a NS developer so my insight into the real thing is quite limited. We have no accurate description how the game really works. E.g. the developers said that the tick length is 6 seconds but actually alien tick length is 5 seconds .... on the other hand, aliens per-tick income seems to be adjusted so the real income seems to be as if the alien tick was really 6 seconds ..... Another problem is with times of building of structures which are dependent on fps. Same with the time it takes to evolve to certain liveform. And there are other problems .... Fortunately many of these inaccuracies do not have important impact on the results.
But it seems that the simulation is fairly accurate, at least at the beginning of the game (which is the important phase).
The link is
<a href='http://nakyveci.wz.cz/NSEcoSim.html' target='_blank'>http://nakyveci.wz.cz/NSEcoSim.html</a>
Take a look and tell me your opinions/suggestions/corrections :-)
Comments
But when I tried to add another Alien, it crashed my browser. <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif'><!--endemo-->
***KILL THE FATTY***
<!--emo&::asrifle::--><img src='http://www.unknownworlds.com/forums/html/emoticons/asrifle.gif' border='0' style='vertical-align:middle' alt='asrifle.gif'><!--endemo--> <!--emo&::gorge::--><img src='http://www.unknownworlds.com/forums/html/emoticons/pudgy.gif' border='0' style='vertical-align:middle' alt='pudgy.gif'><!--endemo-->
thx dude <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->, im busy comparing tactics with it <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
The marines had an IP an Armory an Armslab 3 RTs Armor Upgrade Weapon Upgrades then the Aliens 2nd RT finished <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif'><!--endemo-->
The marines had an IP an Armory an Armslab 3 RTs Armor Upgrade Weapon Upgrades then the Aliens 2nd RT finished <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif'><!--endemo--> <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
yeah, how often are marines allowed to ahve three RT's without spending a dime on mines or turrets? not often. pretend your skulks did something successful and the marines will slow down.
Sticky this.
[Edit] omg, it's all javascript....oh the humanity....I commend your dedication to JS <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo--> Some bugs. Counts dead aliens in "advance until", hives, etc.
Looking forward to a final version of it once everything's included. Is the resource generation rate formula the same as the "# of players" based one in 1.04?
great page tho
For a 1 Marine team, you need 266 RTs in order to get 3114.1 resources in 30 seconds.
> But when I tried to add another Alien, it crashed my browser.
People often tell me that their IE crashes but it never happened to me :-/ What is the version of your IE ? I tried it with 5.0 and 6.0, no crashes
> AngaDraug
> Thats all well and good, but why don't you just play the game?
The point is not to replace NS, the point is to experiment with "what will happen if ...".
You can't do this so easily by actually playing the game.
> Frogg2
> Perhaps you could add in the time it takes to research marine tech.
> Also I noticed a bug that aliens only rein 1 at a time even though 2 hives were up.
I did not include research times because I considered it irrelevant to the main goal of the program - simulation of resource flow. But I changed my mind - this is certainly useful.
Regarding the REIN issue, I guess the reason is that REIN time is determined when the alien is killed. So when you kill an alien right before hive construction is finished, this could happen (REINforcing alien won't use the new free hive). If this is the case, then I think its not worth fixing ;-)
> *Dread*
> GJ! Btw, I think you forgot siege.
Actually you can "buy" anything via the "Spend res" button, you can't see number of built sieges though. I think that number of sieges is not important but I will probably add it.
> [USCM]Lieutenant Ripley>
> Very impressive. Normally, these "types" of statistical tools are crap, but this one is a
> near perfect design and perfect is a STRONG word.
Thank you, I am surprised that you like it so much, there is certainly much room for improvements <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
> I note that there is no way to indicate that multiple gorges are building a
> structure...which relates the tactics I wanted to assess.
I may add this (already suggested by someone else) but do you know how does this influence the construction time ? I guess that each gorge builds a "constant bit" each video frame.
> [Edit] omg, it's all javascript....oh the humanity....I commend your dedication to JS
LOL javascript rulez <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->) I like that only about 50 lines of the code from the overall 1419 is HTML <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
> Some bugs. Counts dead aliens in "advance until", hives, etc.
Dead aliens are shown intentionaly in the "advanced util" dialogue, why should they be excluded ? But I don't get what did you mean with "hives, etc." ?
> Anavrin
> Looking forward to a final version of it once everything's included.
> Is the resource generation rate formula the same as the "# of players" based one in 1.04?
The basic formula is this:
(1 + numRT * numTeamPlayers * 0.23) * (numEnemyPlayers / numTeamPlayers)
Dead players ARE counted.
This formula is being applied each tick. For marines, this is just added to the team's
resource account. But for aliens, the outcome of this formula is multiplied by 5/6. This is adjustment which negates consequences of shorter alien ticks (5 instead of 6 seconds).
Actually, I just found that this adjustment got removed by accident from the source, I am returning it back ASAP.
> p00psm1th
> it also lets me build armory before ip and stuff like that
Indeed, I gave up on checking stuff like this, it's up to you <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
> masterswordman
> its great, if only I was smart enuf to use it *sigh*
try click the "Confused ?" button <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
If there was a map with 500 resource points...
Yes, I do know it requires IE 5, but it's not Mozilla that's broken, it's the page; it renders in IE because IE is extremely forgiving when it comes to HTML.
<a href='http://validator.w3.org/check?uri=http%3A%2F%2Fnakyveci.wz.cz%2FNSEcoSim.html' target='_blank'>Fix these errors and you're set</a>
> Yes, I do know it requires IE 5, but it's not Mozilla that's broken, it's the page
Dopple, it's not broken, I just wrote it for IE, not for W3C, that's all. I gave up on mozilla because of modal dialogues and lack of innerHTML property. Maybe it's just lack of mozilla knowledge on my side (I work with IE-based intranets), but it seems that it is unusable for my purpose. The simulator is no stupid ordinary HTML page.
Everyone who plays NS has windows and IE, too. Btw I use mozilla for general web browsing, not IE.
Pretty neat as-is, though.
I have three suggestions:
1. Would it be possible to add "the Marine Team" in the "Advance until..." dialog, as an extra player? For when you're doing marine builds.
2. Not really a suggestion, but a possible error: I'm fairly sure the marines costing 1 res to spawn is a rumor, a widespread rumor, but just a rumor. It certainly doesn't do this in casual mode, and it is also not mentioned in <a href='http://www.unknownworlds.com/forums/index.php?act=ST&f=22&t=9368' target='_blank'>This</a> post. (The differences between tournament and casual mode)
In the mean time, for people using this, you can just set marine average lifespan to something crazily high, like 100000 seconds, to disable this part.
3. A simple "Advance By __ seconds" so you can control the time more easily than with only 1, 5, 6, 30 seconds as options.
Once again, great program!
I don't see any way to factor in recycling structures, perhaps this can be included in the next version <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
Spectre:
<!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->1.<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
thats reasonable
<!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->2.<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
AFAIK it applies to casual mode, too ... got to test it somehow ...
<!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->3.<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
ok
<!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->JHunz: recycling structures<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
This might require major redesign of marine team data model and GUI but I will consider it.
<li>3 RTs + the one they start with
<li>1 IP
<li>Armory - Later Upgraded
<li>Arms Lab
<li>Lvl 1 Weapon and Armor Upgrades
</ul>
In the time it took a 1 Gorge Alien team to build a mere 2 RTs either theres a math error somewhere or there are some big problems with the NS economy that needs to be worked out.
For future versions of your website I have a few suggestions: you should observe a match between medium skill players and get a general number of how long it takes for them to die (unless you have already) and have that number automatically change with each Armor/Weapon/Carapace upgrade. Also the Advance Until button needs to have the Marines too.
Why do you have to write it in non-standard javascript? I would be very interested, but I'm using Linux and not Windows.