Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! 2.6/7 » Questions about Stars! AutoHost » Can we still play when autohost freezes?
Can we still play when autohost freezes? Thu, 26 July 2007 08:54 Go to next message
Mr K is currently offline Mr K

 
Petty Officer 2nd Class

Messages: 59
Registered: February 2007
Location: Christchurch, New Zealand
When autohost freezes (as it has done at the moment), the message that comes up states "You may still upload and use Host Utility, but the game pages will not be visually updated while AutoHost is frozen".

So if I know that everyone has uploaded their turn (but the web-page just isn't showing it and autohost just isn't generating because it doesn't realise it), can I use the host utility to force turn generation within 3 minutes so that we can all keep on playing?

will autohost definately process all the uploaded turns which haven't shown up on the site?

It would be great if we could do this because then I could keep our game rolling (even if somewhat manually).

Report message to a moderator

Re: Can we still play when autohost freezes? Thu, 26 July 2007 09:00 Go to previous messageGo to next message
wizard is currently offline wizard

 
Officer Cadet 3rd Year

Messages: 279
Registered: January 2004
Location: Aachen, Germany
Autohost won't generate when frozen. Usually, all games are set to hold when Autohost is restored from freeze. And the checkbox says:

Check here to force turn generation within 3 minutes.(assuming game NOT on hold, or AutoHost frozen)


So it probably won't work...

Andreas / wizard

Report message to a moderator

Re: Can we still play when autohost freezes? Thu, 26 July 2007 09:19 Go to previous messageGo to next message
Mr K is currently offline Mr K

 
Petty Officer 2nd Class

Messages: 59
Registered: February 2007
Location: Christchurch, New Zealand
haha, oops Embarassed how embarrassing.
I guess i just had an idea and scribbled it down here without looking at that info, but the answer *is* in black and white.

ok, with the possibility of generation aside... I may have not read deeply enough, but why do people seem to get upset about missing turns when the host is frozen?

does it generate a couple all at once when it comes back online if it's been frozen for a period greater than 2 generation deadlines?

Thanks for your help!

Report message to a moderator

Re: Can we still play when autohost freezes? Thu, 26 July 2007 20:04 Go to previous messageGo to next message
Dogthinkers is currently offline Dogthinkers

 
Commander

Messages: 1316
Registered: August 2003
Location: Hiding from Meklar
Mr K wrote on Thu, 26 July 2007 23:19

haha, oops Embarassed how embarrassing.
I guess i just had an idea and scribbled it down here without looking at that info, but the answer *is* in black and white.

ok, with the possibility of generation aside... I may have not read deeply enough, but why do people seem to get upset about missing turns when the host is frozen?

does it generate a couple all at once when it comes back online if it's been frozen for a period greater than 2 generation deadlines?

Thanks for your help!


It's a mystery to me. When AH is frozen (as opposed to being completely offline) you can still upload fine. You just don't get an indicator that your upload went in. So I just upload twice to be sure Wink

If autohost goes *completely* offline, then usually I'd keep the game on hold while I gave the players a chance to get their turns uploaded (no more than 24 hours - their turn should already be made as usual, they just need a chance to upload...)

Coming off from hold on flexible schedules should only result in one gen (if the game is configured for a 'max x hours' style gen schedule.) With fixed schedules, then IIRC it's advisable to remove the schedule before coming off hold, then implement the schedule again after the game is rolling (i.e., more than 3 minutes later.)

If you are hosting a game, and it accidentally gens two turns instead of one, you can always rollback a turn (not great, as players have still seen a slice of the possible 'future', but still...)



[Updated on: Thu, 26 July 2007 20:04]

Report message to a moderator

Re: Can we still play when autohost freezes? Fri, 27 July 2007 06:21 Go to previous messageGo to next message
m.a@stars is currently offline m.a@stars

 
Commander

Messages: 2765
Registered: October 2004
Location: Third star to the left
wizard wrote on Thu, 26 July 2007 15:00

Usually, all games are set to hold when Autohost is restored from freeze.


Usually, but unfortunately not always, and not in a predictable way. Evil or Very Mad So, the "on hold after freeze" 'feature' cannot be relied upon. Whip


[Updated on: Fri, 27 July 2007 06:22]




So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Re: Can we still play when autohost freezes? Fri, 27 July 2007 06:25 Go to previous messageGo to next message
m.a@stars is currently offline m.a@stars

 
Commander

Messages: 2765
Registered: October 2004
Location: Third star to the left
Mr K wrote on Thu, 26 July 2007 15:19

why do people seem to get upset about missing turns when the host is frozen?


Dunno... because it was so easy to prevent, had the host not been asleep, perhaps? Rolling Eyes



So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Re: Can we still play when autohost freezes? Fri, 27 July 2007 06:54 Go to previous messageGo to next message
mazda is currently offline mazda

 
Lieutenant

Messages: 655
Registered: April 2003
Location: Reading, UK
m.a@stars wrote on Fri, 27 July 2007 11:21

wizard wrote on Thu, 26 July 2007 15:00

Usually, all games are set to hold when Autohost is restored from freeze.


Usually, but unfortunately not always, and not in a predictable way. Evil or Very Mad So, the "on hold after freeze" 'feature' cannot be relied upon. Whip


Just to add to this.
The two current duel games both came back *off* hold.
This was despite me receiving two emails that said the games were put on hold.

Can only think that neither game had been scheduled to have a generation during the freeze period - both are set to gen after a max of 600 hours.



I am the God of hell fire, and I bring you

... Brian Pithers

Report message to a moderator

Re: Can we still play when autohost freezes? Fri, 27 July 2007 07:04 Go to previous messageGo to next message
Mr K is currently offline Mr K

 
Petty Officer 2nd Class

Messages: 59
Registered: February 2007
Location: Christchurch, New Zealand
For the record's sake, the game I'm hosting was also not put on hold despite an email saying it was.
Generation time is 48hrs, but did not coincide with the 7 hours of server down-time.

Report message to a moderator

Re: Can we still play when autohost freezes? Fri, 27 July 2007 07:20 Go to previous messageGo to next message
Micha

 

Messages: 2342
Registered: November 2002
Location: Belgium GMT +1
m.a@stars wrote on Fri, 27 July 2007 12:25

Mr K wrote on Thu, 26 July 2007 15:19

why do people seem to get upset about missing turns when the host is frozen?


Dunno... because it was so easy to prevent, had the host not been asleep, perhaps? Rolling Eyes


... or even *easier* to prevent by just uploading as the message says you can?

Razz

mch

Report message to a moderator

Re: Can we still play when autohost freezes? Fri, 27 July 2007 07:23 Go to previous messageGo to next message
Micha

 

Messages: 2342
Registered: November 2002
Location: Belgium GMT +1
Dogthinkers wrote on Fri, 27 July 2007 02:04

It's a mystery to me. When AH is frozen (as opposed to being completely offline) you can still upload fine. You just don't get an indicator that your upload went in. So I just upload twice to be sure Wink

If AH is frozen like the last two times this week (Tuesday (?) or so for only a short time, and the last 7hrs freeze) you still get the message about the file size, not as good as the ligth green-indicatior on the page but good enough ...

mch

Report message to a moderator

Re: Can we still play when autohost freezes? Fri, 27 July 2007 22:06 Go to previous messageGo to next message
Ron is currently offline Ron

 
Commander
Forum Administrator
Stars! AutoHost Administrator

Messages: 1231
Registered: October 2002
Location: Collegedale, TN
I'm sorry folks. Embarassed That was my fault... The PRISM game crashed stars.exe under WINE again. I usually put all games on hold after SAH has been frozen for more than about 4 hours.

In this case, I forgot to run the script that actually puts all games on hold. Then I edited the text file containing the message that game hosts receive, which contains the standard phrase "all games have been put on hold...", and sent out the emails.

I suppose I could automate whether all games get put on hold or not, by having the startup script check how long SAH has been frozen when I run it.

pseudo code
if ((currenttimestamp - timestamp(autohost.log)) > 4 hours) {
    run_script(allgamesonhold.pl);
    edit(host_email.txt){
        search/replace('HOLD','all games on hold');
    }
}
else {
    if (restarting SAH after freeze){
        edit(host_email.txt){
            search/replace('HOLD','all games have NOT been put on hold');
        }
    }
}


Anyway, while currently an inconvenience for game hosts, they can restore a previous turn if needed.

As for scheduling... its a mess. Considering the different factors involved, I think it doesn't work too bad. If anyone can provide pseudo code that handles scheduling (and all the different cases that can come up) better, please post it. Cool

Confused3



Ron Miller
Stars! AutoHost

Report message to a moderator

Re: Can we still play when autohost freezes? Sat, 28 July 2007 13:31 Go to previous messageGo to next message
PaulCr

 
Chief Warrant Officer 3
Stars! V.I.P

Messages: 187
Registered: February 2007
Location: An Island that kinda look...
Ron wrote on Sat, 28 July 2007 03:06


As for scheduling... its a mess. Considering the different factors involved, I think it doesn't work too bad. If anyone can provide pseudo code that handles scheduling (and all the different cases that can come up) better, please post it.



I threw something together for fledging admirals 2 which kept causing SAH to crash, it only does scheduled generations though, it basically has a function that calculates the next scheduled time when given the hour the game normally generates, the days of the week it does so and the date/time to get the next generation after. When everyone turns in it calls it with the current date/time to find when the next generation would have taken place and then calls it again using that time to find the next + 1, doing it that way rather than calling it once with the existing next generation time stops it from accummulating if everyone turns in early multiple times. A scheduled generation just calls it with the current time, as does a forced generation since the host carries that out they can change the schedule temporarily if they needed to.

The routine is pretty short and clean so I've included it at the end since you may find it useful. The code for adding a set number of hours would be a simple addition to the current date/time. I'm not sure if you have any other possibilities I'm not aware of though.

function GetNextGenerationTime(GenDays,GenHour,TimeToUse)
  dim a,NextGeneration
  if GenDays>0 then
    if genhour<=hour(TimeToUse) then
      for a=0 to 7
        if (gendays and (2^(weekday(dateadd("d",a+1,TimeToUse),1)-1)))< >0 then
          NextGeneration=cdate(format(dateadd("d",a+1,TimeTo Use),"dd MMM yyyy " & genhour & ":00:00"))
          exit for
        end if
      next
    else
      for a=0 to 7
        if (gendays and (2^(weekday(dateadd("d",a,TimeToUse),1)-1)))<&g t;0 then
          NextGeneration=cdate(format(dateadd("d",a,TimeToUs e),"dd MMM yyyy " & genhour & ":00:00"))
          exit for
        end if
      next
    end if
  else
    NextGeneration="null"
  end if
  return NextGeneration
end function

GenDays is a bitmask of the days of the week, Sundays being 1, Mondays 2, Tuesdays 4 etc so Mondays, Wednesdays and Fridays would be 2+8+32=42

Report message to a moderator

Re: Can we still play when autohost freezes? Sat, 28 July 2007 16:26 Go to previous message
m.a@stars is currently offline m.a@stars

 
Commander

Messages: 2765
Registered: October 2004
Location: Third star to the left
Ron wrote on Sat, 28 July 2007 04:06

I suppose I could automate whether all games get put on hold or not, by having the startup script check how long SAH has been frozen when I run it

....

Anyway, while currently an inconvenience for game hosts, they can restore a previous turn if needed.



That looks like a great idea, as it would make things somewhat more predictable than currently. Cool

Another important case to take into account would be when a game should have genned while AH was frozen. Confused

Sadly, not all hosts can be bothered to restore/regen in the event of AH freezing/not holding, so having some reliable safeguard is even more important. Whip

All hail Ron! Not Worthy



So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Previous Topic: Player status indicator
Next Topic: Recent SQL forum errors.
Goto Forum:
  


Current Time: Thu Mar 28 10:04:06 EDT 2024