# \[Not a bug\] Game speed changes to normal by clicking on a troop or settings

**URL:** <https://community.gemsofwar.com/t/not-a-bug-game-speed-changes-to-normal-by-clicking-on-a-troop-or-settings/63340>\
**Category:** Bug Reports\
**Created:** [May 7, 2020, 8:49pm UTC](https://community.gemsofwar.com/t/not-a-bug-game-speed-changes-to-normal-by-clicking-on-a-troop-or-settings/63340 "2020-05-07T20:49:10Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nelson](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/nelson/32/62219_2.png) [@Nelson](https://community.gemsofwar.com/u/Nelson)\
**Post date:** [May 7, 2020, 8:49pm UTC](https://community.gemsofwar.com/t/not-a-bug-game-speed-changes-to-normal-by-clicking-on-a-troop-or-settings/63340/1 "2020-05-07T20:49:10Z")

</div>

win 7 ultimate sp1  
game ver. 4.9.0r20535  
steam client

hi everyone  
there is an issue with game speed above normal like 4x, when casting spell animation or matching gems is still in progress if i click on a troop or settings menu the game speed decreases to normal (or even slower) and after closing menu, game speed goes where it was again.

---

<div class="post-metadata">

**Author:** ![Lorien1973](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/lorien1973/32/75546_2.png) [@Lorien1973](https://community.gemsofwar.com/u/Lorien1973)\
**Post date:** [May 7, 2020, 8:57pm UTC](https://community.gemsofwar.com/t/not-a-bug-game-speed-changes-to-normal-by-clicking-on-a-troop-or-settings/63340/2 "2020-05-07T20:57:15Z")

</div>

This has been discussed - it’s purposeful. Something about it being necessary to prevent cheating or something?

---

<div class="post-metadata">

**Author:** ![Nelson](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/nelson/32/62219_2.png) [@Nelson](https://community.gemsofwar.com/u/Nelson)\
**Post date:** [May 7, 2020, 9:41pm UTC](https://community.gemsofwar.com/t/not-a-bug-game-speed-changes-to-normal-by-clicking-on-a-troop-or-settings/63340/3 "2020-05-07T21:41:29Z")

</div>

oh i didn’t see that.  
how game speed and cheats are related anyway  
there are some annoying things in this game they never fix for no clear reason. really disappointed.

---

<div class="post-metadata">

**Author:** ![Slypenslyde](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/slypenslyde/32/30373_2.png) [@Slypenslyde](https://community.gemsofwar.com/u/Slypenslyde)\
**Post date:** [May 8, 2020, 1:41am UTC](https://community.gemsofwar.com/t/not-a-bug-game-speed-changes-to-normal-by-clicking-on-a-troop-or-settings/63340/4 "2020-05-08T01:41:27Z")

</div>

So here’s a theory how it’s related to “cheats”. I figure every now and then I should post something that’s not a rant.

I’m normally an app dev, and app development is kind of “comfy” compared to game dev in some ways. If I want to start an animation and I need to make sure I don’t do things until it finishes, that’s more or less how I write my code. “Start the animation and tell me when it finishes” is how I talk to the computer. That’s because apps are _event-driven_ and don’t tend to do a lot of rendering work unless the user’s done something like pushed a button. So if there’s something I don’t want to happen while the animation’s running, I can note “hey the animation is going” somewhere, then wait to get rid of that note until it finishes, and the thing can check if the animation is running before it starts. The bigger the app, the more things like that, but in general smart app devs design their system so it’s easy to understand which things care about which other things.

Game dev is _loop-driven_ and has to render every frame whether there is input or not. That puts more pressure on the devs to avoid practices app devs consider smart. A lot more information about what’s going on in the entire game needs to be available to all of the code. This makes me cringe as an app dev but to some extent it’s a fact of game dev.

The loop-driven nature makes animations more complex too. They can’t say “do this and tell me when it’s done” because there’s no concept of “waiting”. Every frame happens, and all of the calculations need to be done. Unity has a feature called “coroutines” that helps deal with some of this complexity. It lets you write your animation in a way that’s kind of like, “Do this for 90 frames, then update this variable, then do this for 80 frames, then update that variable.” But that feature adds a different kind of complexity: it separates each animation’s code from the others, so it’s harder to understand which animations interact.

Now, the way a game typically implements a faster speed is called “frame skipping”. Normally, the game loop works like this:

```auto
for every frame:
    Process the user input.
    Do all the AI things.
    Render the frame.

```

To “frame skip”, you pretend like multiple frames happen every 1 frame. So a 4x game loop would look like:

```auto
for every frame:
    Do this 4 times:
        Process the user input.
        Do all the AI things.
    Now do this 1 time:
        Render the frame.

```

This is where stuff starts to break. Imagine we have an animation that goes something like this:

```auto
    If this frame is number 60:
        Set the "don't let the user tap an ally" flag.
    Or if this frame is number 240:
        Let the user tap an ally again.

```

We know something bad happens if the user taps an ally in between frames 60 and 240. So we try to tell the UI to disable tapping allies. But the code to do that might be part of “Render the frame” since it has to do with UI:

```auto
if "don't let the user tap an ally" is true:
    Disable tap events for allies.
otherwise:
    Enable tap events for allies.

```

Bam. This is a bug at 4x speed. Suppose the very first frame of a 4x set tries to set that flag. There’s a bit of time between when that happens and when the rendering code tries to disable tap events. If you tap during that small window, the game is going to queue up a tap for the next “process user input” step. If that step believes “the UI will disable taps if they aren’t allowed”, it’s going to act as if the tap was legal. So now bad stuff happens.

When I’m talking about one measly animation and one measly problem with if a user taps at the wrong time, it seems so easy to keep it all straight. But in a game like GoW, there’s dozens of different animation routines, dozens of different “should this be allowed” flags, and dozens of variables that affect other aspects of the system. No human can possibly keep track of how they all interact. It’s possible if they fix this problem, it creates a worse problem. It seems obvious to “disable tap events” instead of just setting a flag, but I can think of at least five technical reasons why that might be “impossible” or “worse”.

That’s why, in app development, I work hard to compartmentalize code to make relationships obvious. But I get a luxurious 250ms per “frame”, in some cases the user might not do anything that causes me to render for a whole 10-15 seconds, and if I’m really worried I can show a “Processing…” indicator to tell the user to hold up! Gems of War has 16.7ms per frame or else it stutters. That causes you to cut corners, and cut corners are sharper than normal corners.

---

<div class="post-metadata">

**Author:** ![Kafka](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/kafka/32/33529_2.png) [@Kafka](https://community.gemsofwar.com/u/Kafka)\
**Post date:** [May 8, 2020, 4:02am UTC](https://community.gemsofwar.com/t/not-a-bug-game-speed-changes-to-normal-by-clicking-on-a-troop-or-settings/63340/5 "2020-05-08T04:02:03Z")

</div>

I’m not a programmer at all so I’ll provide the layman’s explanation, for people like me, to accompany Slyp’s well thought out technical explanation 🙂

Basically, with the way the speed settings and animations are implemented for the game in Unity (our game engine), Unity cannot support continuing to run the game at 4x speed while you have a card selected. So it must slow back down in the background while you have a troop selected.

We’ve had players who also happen to be programmers tell us we could fix this and to let them fix it for us if we’re not competent enough (ouch). This one line Slyp said summarises why we don’t always do something just because it can be done:

> [@Slypenslyde](#):
>
> It’s possible if they fix this problem, it creates a worse problem.

Game speed interacts completely with our core gameplay. The foundation the entire game sits on. It’s not worth messing around with for a minor quality of life pay off.

I don’t disagree with you, what you’re suggesting might be a nice feature of the game (this is without even touching on whether this is actually an improvement or a nerf to player experience due to visual communication issues it could potentially create), but it’s just not worth the risk vs reward - not even close to being worth it at this time. It has nothing to do with competence levels.

Replace “scientists” with “programmers” here:

![](https://us1.discourse-cdn.com/flex019/uploads/gemsofwar/original/3X/0/3/03a0bd0518c13366c3d5ee8db5d56a26aa9218d0.gif "Jurassic Park Film GIF - Find & Share on GIPHY")

PS. I wish I’d come up with this response during the original discussion. Ah, my slow brain.

---

<div class="post-metadata">

**Author:** ![Live](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/live/32/40596_2.png) [@Live](https://community.gemsofwar.com/u/Live)\
**Post date:** [May 8, 2020, 4:09am UTC](https://community.gemsofwar.com/t/not-a-bug-game-speed-changes-to-normal-by-clicking-on-a-troop-or-settings/63340/6 "2020-05-08T04:09:13Z")

</div>

> [@Nelson](#):
>
> win 7 ultimate sp1

(You should update to W10 yesterday)

---

<div class="post-metadata">

**Author:** ![Sassy](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/sassy/32/36147_2.png) [@Sassy](https://community.gemsofwar.com/u/Sassy)\
**Post date:** [May 8, 2020, 6:24am UTC](https://community.gemsofwar.com/t/not-a-bug-game-speed-changes-to-normal-by-clicking-on-a-troop-or-settings/63340/7 "2020-05-08T06:24:29Z")

</div>

If this was a “bug” that favored players as opposed to slowing us down, you bet you’re ass that no amount of “potential problems” or “legacy code” would stop the devs from fixing it.

Personally, I would rather be told the truth and deal with a decision made by the devs that I didnt like, than flat out lied to. Excuses are lazy. Honesty is difficult.

---

<div class="post-metadata">

**Author:** ![Kafka](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/kafka/32/33529_2.png) [@Kafka](https://community.gemsofwar.com/u/Kafka)\
**Post date:** [May 8, 2020, 10:01am UTC](https://community.gemsofwar.com/t/not-a-bug-game-speed-changes-to-normal-by-clicking-on-a-troop-or-settings/63340/8 "2020-05-08T10:01:01Z")

</div>

If you don’t like my dev answer refer to the one made by a player directly above it which explains in more detail.

It was implemented this way from the start, we knew how it worked then and we know how it works now, it’s not a bug or a change, it’s not legacy code, it’s just something that has been raised in this thread for looking at now. The animation speed was implemented years ago. We don’t tend to develop by committee running every line of code or pros and cons of ways of implementing feature past the player base before it’s implemented, nothing would ever get done that way.

You seem on edge with your recent posts today Sassy, we’re not out to get you and I don’t get any joy at of lying about anything in life, I have the opposite issue: I tend to be honest to the point my honesty causes issues. I hope you enjoy your weekend 🙂

---

<div class="post-metadata">

**Author:** ![Sassy](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/sassy/32/36147_2.png) [@Sassy](https://community.gemsofwar.com/u/Sassy)\
**Post date:** [May 8, 2020, 10:43am UTC](https://community.gemsofwar.com/t/not-a-bug-game-speed-changes-to-normal-by-clicking-on-a-troop-or-settings/63340/9 "2020-05-08T10:43:37Z")

</div>

> [@Kafka](#):
>
> You seem on edge with your recent posts today Sassy

Wonder why lol.

> [@Kafka](#):
>
> we’re not out to get you

I’m sure this is true. Not me specifically because let’s face it, I’m just not that damn important lol. But playing favorites is playing favorites just the same.

---

<div class="post-metadata">

**Author:** ![Nelson](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/nelson/32/62219_2.png) [@Nelson](https://community.gemsofwar.com/u/Nelson)\
**Post date:** [May 8, 2020, 6:33pm UTC](https://community.gemsofwar.com/t/not-a-bug-game-speed-changes-to-normal-by-clicking-on-a-troop-or-settings/63340/10 "2020-05-08T18:33:37Z")

</div>

OK thanks everyone for detailed answers  
actually im really confused i thought it could be an easy fix for them to deal with but it seems things are more complicated, like many variables, priorities, codes executions stuffs like that. i don’t know much about programming. Hope they find a way to get it fixed soon  
@Live thx for advise ill do it soon

---

<div class="post-metadata">

**Author:** ![Sossitch](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/sossitch/32/60933_2.png) [@Sossitch](https://community.gemsofwar.com/u/Sossitch)\
**Post date:** [May 9, 2020, 12:28am UTC](https://community.gemsofwar.com/t/not-a-bug-game-speed-changes-to-normal-by-clicking-on-a-troop-or-settings/63340/11 "2020-05-09T00:28:30Z")

</div>

It would be nice to be able to queue my next action while the computer is doing its turn, then the screen would simply go away and the 1x speed wouldn’t matter anymore.

---

<div class="post-metadata">

**Author:** ![Nelson](https://sea1.discourse-cdn.com/flex019/user_avatar/community.gemsofwar.com/nelson/32/62219_2.png) [@Nelson](https://community.gemsofwar.com/u/Nelson)\
**Post date:** [May 10, 2020, 4:56pm UTC](https://community.gemsofwar.com/t/not-a-bug-game-speed-changes-to-normal-by-clicking-on-a-troop-or-settings/63340/12 "2020-05-10T16:56:30Z")

</div>

sure its a good idea  
or even a skip button
