Alpha Centauri Forums
  Support and Troubleshooting
  Energy calculation terrible bug (another example of sloppy programming)

Post New Topic  Post A Reply
profile | register | prefs | faq | search

Author Topic:   Energy calculation terrible bug (another example of sloppy programming)
VictorK posted 05-27-99 04:09 PM ET   Click Here to See the Profile for VictorK  
Has anyone reported this serious bug?

When a base completes production of a facility (or unit), and if the build queue is empty, the production is automatically changed to "stockpile energy". The bug is that you immediately receive an extra energy equal to half the amount of mineral production in the base, even though the minerals produced that turn have been used to complete the facility (up to 10 minerals are carried over as usual). You can then of course switch production to something else. In other words, every time you completes production you receive the "stockpile energy" bonus for one turn for free. Note that if your build queue is not empty, you don't receive this "bonus" energy. So players who never use the build queue always tend to be richer.

It is clear where this bug comes from. The program updates minerals in a base (adds to production box) and checks for production completion before it updates energy (adds to energy reserve). If production is completed, it changes to "stockpile energy" which will be counted again when energy is updated. Really sloppy programming indeed.

Mergle posted 05-28-99 02:59 AM ET     Click Here to See the Profile for Mergle    
I believe this is correct. As a inveterate micromanager (that's why I always win :-)), I never use the build queue (this is also a functionality problem - I used the queue compulsively in MOO2, so I'm all in favour of it in theory) have found my energy reserves always far higher than they should be. Further, the problem does not seem to be restricted to one turn. I accidentally left a base on stockpile energy (must've hit the wrong button). When I noticed, I switched it to Space Elevator and found I had 118 minerals accumulated!
K posted 05-28-99 03:12 PM ET     Click Here to See the Profile for K  Click Here to Email K     
Mmm, very interesting...
Perhaps it is only converting HAlF of your minerals to energy and saving the rest for production. Maybe some other fraction. Have you consided this?
I'll test it out tonight and we'll see.
Rackam posted 05-28-99 03:48 PM ET     Click Here to See the Profile for Rackam    
I've been watching this myself and I may have an answer.

What is happening is that when unit/facitity/etc is finished the program is converting the excess minerals to energy.
eg, your production is 80 and there is 32 left on a build, the remaining 48 is then converted.

~Rackam

VictorK posted 05-28-99 04:15 PM ET     Click Here to See the Profile for VictorK    
I have tested it extensively and I can assure that it is indeed a bug. The program isn't converting the "excess" minerals to energy; you get extra energy even if there is no excess minerals after completion. And the amount of "bonus" energy you get is exactly equal to the amount you would get if you set production to "stockpile energy".

You can easily verify this bug. Take one of your saved games, pick a base that will complete production next turn (or use cheat mode to edit minerals), make sure there is something in the build queue, then click next turn and note the energy reserve next turn. Now repeat the above, this time with build queue empty.

Thread ClosedTo close this thread, click here (moderator or admin only).

Post New Topic  Post A Reply
Hop to:

Contact Us | Alpha Centauri Home

Powered by: Ultimate Bulletin Board, Version 5.18
© Madrona Park, Inc., 1998.