# Alien Swarm: Getting a better in-game timer?

**URL:** <https://forums.sourceruns.org/t/alien-swarm-getting-a-better-in-game-timer/2762>\
**Category:** ⚙ Technical Support\
**Created:** [November 3, 2015, 5:12pm UTC](https://forums.sourceruns.org/t/alien-swarm-getting-a-better-in-game-timer/2762 "2015-11-03T17:12:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Onin](https://b-cdn.sourceruns.org/user_avatar/forums.sourceruns.org/onin/32/104_2.png) [@Onin](https://forums.sourceruns.org/u/Onin)\
**Post date:** [November 3, 2015, 5:12pm UTC](https://forums.sourceruns.org/t/alien-swarm-getting-a-better-in-game-timer/2762/1 "2015-11-03T17:12:21Z")

</div>

Alien Swarm has its own in-game time counter, that it uses for its achievements and that we’ve used to time ILs with. It’s pretty robust, handles the game’s stimpacks (which slow timescale to .45) properly, it’s never shown any inaccuracies. Problem is, it only displays seconds, and we’ve tied several ILs already because of this.

I don’t really want to switch to RTA for a variety of reasons. I don’t think tied WRs are a problem.

But, is there an easy way to get a more accurate in-game timer for this game? Could we just mod the timer it has to display decimals? I’d rather not resort to a separate timer like the livesplit plugins or whatever, because it’d be pretty difficult to guarantee its accuracy. But some sort of solid decimal in-game timer for this game would probably make everyone happier.

---

<div class="post-metadata">

**Author:** ![traderain](https://b-cdn.sourceruns.org/user_avatar/forums.sourceruns.org/traderain/32/118_2.png) [@traderain](https://forums.sourceruns.org/u/traderain)\
**Post date:** [November 3, 2015, 6:56pm UTC](https://forums.sourceruns.org/t/alien-swarm-getting-a-better-in-game-timer/2762/2 "2015-11-03T18:56:35Z")

</div>

Well, anything is doable but I don’t really know anyone who is that good with c++ that he would be able to do it other than YaLTeR but he is mostly busy. It might happen at some point if alien swarm reaches that big of a popularity but there is no much activity with it now on sourceruns. Maybe others have some idea but I am not sure if there is anything. You can maybe write a simple app which watches the memory adress which contains whether the game is paused but you would have to know how to program for that.

---

<div class="post-metadata">

**Author:** ![YaLTeR](https://b-cdn.sourceruns.org/user_avatar/forums.sourceruns.org/yalter/32/553_2.png) [@YaLTeR](https://forums.sourceruns.org/u/YaLTeR)\
**Post date:** [November 4, 2015, 6:30am UTC](https://forums.sourceruns.org/t/alien-swarm-getting-a-better-in-game-timer/2762/3 "2015-11-04T06:30:49Z")

</div>

If there’s a timer there you could probably find where it’s located and make it output more than seconds.

---

<div class="post-metadata">

**Author:** ![Matherunner](https://b-cdn.sourceruns.org/user_avatar/forums.sourceruns.org/matherunner/32/215_2.png) [@Matherunner](https://forums.sourceruns.org/u/Matherunner)\
**Post date:** [November 4, 2015, 9:41am UTC](https://forums.sourceruns.org/t/alien-swarm-getting-a-better-in-game-timer/2762/4 "2015-11-04T09:41:36Z")

</div>

A cursory glance revealed that you need to modify the format strings in the MissionStatsPanel::InitFrom function in missionstatspanel.cpp. But that’s not enough, because the server always sends one of the times as an integer over the network. Check asw\_gamerules.cpp to see for yourself. That particular time has a resolution of 1s and no more precise. Lots of refactoring need to be done.

---

<div class="post-metadata">

**Author:** ![Onin](https://b-cdn.sourceruns.org/user_avatar/forums.sourceruns.org/onin/32/104_2.png) [@Onin](https://forums.sourceruns.org/u/Onin)\
**Post date:** [November 5, 2015, 10:37pm UTC](https://forums.sourceruns.org/t/alien-swarm-getting-a-better-in-game-timer/2762/5 "2015-11-05T22:37:39Z")

</div>

I have no experience with tinkering with Source at all. Sounds like the answer is ‘no easy solution’ in that case. Thanks for the input.
