Delete log files before starting
Play joeys campaign, which is a 2 player game. (1 human , 1 AI)
Regularly grep the logs to see if 'Team 1 is dead', e.g. 1 per minute
After 9mins 30 secs the logs show that 'Team 1 is Dead'
After 12 minutes Quit game.
The stats graph shows that player 1 (AI) was destroyed at about 8min 30 secs.
But the game did not end!!
Downloaded and installed from source on 19th July 2007
version 0.8.23
OS: Fedora 7
Game does not end!!
Fix
To get the game to end at approx the correct time edit Game.cpp and replace the existing function with this:
This might not work if you have alliances (??) but will end the game when you are the only player alive.
The stats graph will show that the last enemy still had some units but at least the game doesn't go on for ever![Smile :-)](./images/smilies/icon_smile.gif)
Code: Select all
void Game::scriptSyncStep()
{
int countAlive = 0;
int rememberAlive = 0;
// do a script step
script.syncStep(gui);
// alter win/loose conditions
for (int i=0; i<session.numberOfTeam; i++)
{
if (teams[i]->isAlive)
{
countAlive += 1;
rememberAlive = i;
if (script.hasTeamWon(i))
teams[i]->hasWon=true;
if (script.hasTeamLost(i))
teams[i]->isAlive=false;
}
}
if (countAlive ==1)
{
teams[rememberAlive]->hasWon=true;
}
}
The stats graph will show that the last enemy still had some units but at least the game doesn't go on for ever
![Smile :-)](./images/smilies/icon_smile.gif)
- Donkyhotay
- Warrior
- Posts: 141
- Joined: Sat Mar 04, 2006 4:03 am
In the future you should report all bug reports within the bug tracker. You will get better response there then in the forums.
http://savannah.nongnu.org/bugs/?group=glob2
http://savannah.nongnu.org/bugs/?group=glob2
do not be afraid to joust a giant just because some people insist on believing in windmills.
Didn't end, but does now
I am using Ubuntu and the game wouldn't end, but then I updated it with the version on getdeb.net and now I don't have that problem anymore. Do you still have that problem with the new version?
My Machine: Ubuntu 7.10 Gutsy Gibbon, Globulation2 Version 0.9.1
Re: Game does not end!!
in the campaign system there was a bug that made games last forever if you performed too well in that you upgraded buildings to a state the win condition was not expecting:
echo "Build 2 schools!"
while(count of __level 1__ schools <2) wait
win
this was only fixed for the next version to come I guess.
echo "Build 2 schools!"
while(count of __level 1__ schools <2) wait
win
this was only fixed for the next version to come I guess.