Linux_Eki Posted October 12, 2011 Report Share Posted October 12, 2011 Is there some command that would show me how long I have been playing? When you win/lose you will see how much time elapsed but I want to check while playing. Quote Link to comment Share on other sites More sharing options...
fcxSanya Posted October 12, 2011 Report Share Posted October 12, 2011 Is there some command that would show me how long I have been playing? When you win/lose you will see how much time elapsed but I want to check while playing.I'm not sure that you mean the same under 'command', but following command typed in game's console should display time from match start in milliseconds:Engine.GuiInterfaceCall("GetExtendedSimulationState").timeElapsedThe same value is used on summary screen, but it formatted with this function:/** * @param time Time period in milliseconds (integer) * @return String representing time period */function timeToString(time){ var hours = Math.floor(time / 1000 / 60 / 60); var minutes = Math.floor(time / 1000 / 60) % 60; var seconds = Math.floor(time / 1000) % 60; return hours + ':' + (minutes < 10 ? '0' + minutes : minutes) + ':' + (seconds < 10 ? '0' + seconds : seconds);}You can perform some formating in console too, for example this should return time in minutes:var timeElapsed = Engine.GuiInterfaceCall("GetExtendedSimulationState").timeElapsed; Math.floor(timeElapsed / 60000); Quote Link to comment Share on other sites More sharing options...
feneur Posted October 12, 2011 Report Share Posted October 12, 2011 Alexander, would it be easy for you to add the possibility to display the time in hours, minutes, and seconds in the game view? Say in the top right corner, and say when you press the F11 key? (And hidden when you press F11 again.) Would be hugely appreciated Perhaps we should add it as a "simple" task though so someone can have something relatively easy to start with Quote Link to comment Share on other sites More sharing options...
Linux_Eki Posted October 12, 2011 Author Report Share Posted October 12, 2011 (edited) I'm not sure that you mean the same under 'command', but following command typed in game's console should display time from match start in milliseconds:Engine.GuiInterfaceCall("GetExtendedSimulationState").timeElapsedThe same value is used on summary screen, but it formatted with this function:/** * @param time Time period in milliseconds (integer) * @return String representing time period */function timeToString(time){ var hours = Math.floor(time / 1000 / 60 / 60); var minutes = Math.floor(time / 1000 / 60) % 60; var seconds = Math.floor(time / 1000) % 60; return hours + ':' + (minutes < 10 ? '0' + minutes : minutes) + ':' + (seconds < 10 ? '0' + seconds : seconds);}You can perform some formating in console too, for example this should return time in minutes:var timeElapsed = Engine.GuiInterfaceCall("GetExtendedSimulationState").timeElapsed; Math.floor(timeElapsed / 60000);Yeah I meant console commands. Dividing by 1000 (ty quantum) shows in seconds so its enough for me. Edited October 13, 2011 by Linux_Eki Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted October 12, 2011 Report Share Posted October 12, 2011 Alexander, would it be easy for you to add the possibility to display the time in hours, minutes, and seconds in the game view? Say in the top right corner, and say when you press the F11 key? (And hidden when you press F11 again.) Would be hugely appreciated Perhaps we should add it as a "simple" task though so someone can have something relatively easy to start with It would indeed be a welcome feature (F11 is already used for the console). Quote Link to comment Share on other sites More sharing options...
feneur Posted October 13, 2011 Report Share Posted October 13, 2011 It would indeed be a welcome feature (F11 is already used for the console).Hmm, no, F9 is used for the console =) But you're right, it is used for something else: the profiler So yeah, I forgot it is already being used. I only suggested it because in the games I remember the shortcut for this feature it is indeed F11. Not sure what's best to put on another shortcut though, the profiler or the time, the profiler has been used for quite some time on that key, but as I said I do remember F11 being the key for displaying time in other games Either way, the main thing is that it would be nice to have The key is easy to change. Quote Link to comment Share on other sites More sharing options...
quantumstate Posted October 13, 2011 Report Share Posted October 13, 2011 Yeah I meant console commands. Dividing by 600 shows in seconds so its enough for me.Dividing by 1000 should give seconds . Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted October 13, 2011 Report Share Posted October 13, 2011 Framerates and Elapsed Time should each get a function key, imho. Quote Link to comment Share on other sites More sharing options...
feneur Posted October 13, 2011 Report Share Posted October 13, 2011 Framerates and Elapsed Time should each get a function key, imho.Is a function key more intuitive than Shift+F for framerate? Not saying that should be the only consideration, but if nothing else there might be other things we might want to put on the function keys (Like save, load, etc) Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted October 13, 2011 Report Share Posted October 13, 2011 Is a function key more intuitive than Shift+F for framerate? Not saying that should be the only consideration, but if nothing else there might be other things we might want to put on the function keys (Like save, load, etc)Well, there are 12 function keys for a PC keyboard (10 for Mac? Not sure).HelpScreenshotQuicksaveFrame RateGame TimerPlayer ScoresAnything else? Quote Link to comment Share on other sites More sharing options...
quantumstate Posted October 13, 2011 Report Share Posted October 13, 2011 F10 for menu Quote Link to comment Share on other sites More sharing options...
Linux_Eki Posted October 13, 2011 Author Report Share Posted October 13, 2011 Dividing by 1000 should give seconds .Thanks for correcting. Quote Link to comment Share on other sites More sharing options...
feneur Posted October 13, 2011 Report Share Posted October 13, 2011 Well, there are 12 function keys for a PC keyboard (10 for Mac? Not sure).HelpScreenshotQuicksaveFrame RateGame TimerPlayer ScoresAnything else?F10 for menuAnd F9 is currently used for the console, not saying that should necessary be the one, but I think it's good to have it on one of the function keys to allow for easy access for us not using US keyboards But yeah, perhaps there are enough Quote Link to comment Share on other sites More sharing options...
fcxSanya Posted October 13, 2011 Report Share Posted October 13, 2011 Alexander, would it be easy for you to add the possibility to display the time in hours, minutes, and seconds in the game view? Say in the top right corner, and say when you press the F11 key? (And hidden when you press F11 again.) Would be hugely appreciated Perhaps we should add it as a "simple" task though so someone can have something relatively easy to start with I decided that it is easier/better to implement this myself, rather than create ticket, describe details and wait when someone will implement it (because this task required only few lines of code/markup written in right place, and it is probably don't make sense to not describe what and where to write when we know, and if we describe it like 'to implement this task, write line <...> in file <...>' it is not make sense to create such tasks).See r10402. I set it to F12, which looks unused. Quote Link to comment Share on other sites More sharing options...
janwas Posted October 14, 2011 Report Share Posted October 14, 2011 Great, thanks for sitting down and implementing this! Very useful feature indeed (for optimizing build orders >:-) ). Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted October 14, 2011 Report Share Posted October 14, 2011 Great, thanks for sitting down and implementing this! Very useful feature indeed (for optimizing build orders >:-) ).Moooohahahaha. Let's see what I can do.... Quote Link to comment Share on other sites More sharing options...
Pureon Posted October 14, 2011 Report Share Posted October 14, 2011 Thanks fcxSanya Quote Link to comment Share on other sites More sharing options...
Linux_Eki Posted October 14, 2011 Author Report Share Posted October 14, 2011 Thank you very much!! Now I can do AI comparison video between qbot and jubot. Splitbot isn't working for me atm. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.