[BUG] Different game speeds drastically affect outcome

Running the game at 4x speed vs 1x speed can result in drastically different outcomes in a challenge. I think this mostly depends on the types of ships used, fighters seem to benefit the most from running the game at a faster speed, as they survive much longer.

Not only this, but myself and others are getting very different results using the same fleets in a challenge, all of us running at 4x speed. I am not certain if hardware specs are to blame, but this is frustrating.

A good example and discussion of this bug can be found in the grand challenge 2 thread: viewtopic.php?f=24&t=3297

I can also send example fleets if need be

you beat me to it. good call.

It shouldn’t be a matter of hardware specs. The game is capped at 60 FPS, and the simulation updates of stuff like AI happens out of synch with the rendering. I can’t see why the draw speed would have an effect on the outcome, but I am aware that the outcome can differ, even when the same random seed is used at the start of the battle.
When the game was originally designed, it was not assumed that the battles had to be 100% step-by-step reproducible, but in theory they should be. I’ve spent some time digging around beforehand to check what might be causing a discrepancy (it could be as simple as a single random number being used somewhere in the wrong circumstances, out of millions in a battle). I might have another hunt around, but it has to be balanced against other time working on areas of the game such as a better tutorial, bug fixes and so on.

Randomly differing outcome = no problem. Consistently differing outcome for players with different machines = huge problem. The latter is what we’ve got here.

The speed thing resulting in different outcomes is also a huge problem: I really, really hate the idea of game speed setting becoming part of “strategy” - that’s outside the imagined space of the game and breaks immersion completely. Game speed has become part of strategy as of this moment, since fighters (it seems) fare better at high speeds. To my mind, that’s catastrophic and absolutely a “bug.”

Having different results on different machines and different speeds is a big problem IMHO. Once you’ve won all scenarios without consistent results game have no interest. The only thing that will keep people play is challenges and tournaments and all other similar stuff. :slight_smile:

I’ll post my idea from another thread. IMHO you should not use random at all. Here is an idea I as programmer myself might help you solving this big issue.

I don’t know how deep is random in your code but why not emulate probability with counts (I’ll try to explain, sorry for bad English).

Suppose a turret has a 20% probability of a hit this means that 1/5 shots should hit its target. Instead of making random before each shot, make a counter that trace when last hit occurred. It will be something like miss, miss, hit, miss, miss, miss, miss, hit, miss… etc.

Of course is not so simple as it seams, but I hope you get the idea.

All above is IMHO and is opened for critique or even ignoring :slight_smile:

As a programmer, this suggestion makes me cringe. I’d much rather have one random number object to reference with relevant parameters that will return hit or miss, than I would a counter variable for every weapon that fires.

EDIT to add that maybe I am conceptualizing your suggestion wrong… in which case I apologize.

To be honest, I like having a random element to the battles. It makes them more interesting and exciting to watch. What I’m trying to articulate is that the random element is not the problem here. The problem is that what’s happening is not random: results are being extremely skewed depending on non-random factors (game speed and hardware) that shouldn’t affect the outcome of battle.

The reason that this is a problem is that it drastically limits what GSB can be. Once a player has reached a certain point of familiarity with the mechanics, beating single challenges becomes trivial. More competitive game modes - like tournaments or grand challenge quests (love the latter, personally) - could be integrated into the game relatively easily (compared to coding the engine in the first place) and greatly extend the game’s lifespan. However, if results are skewed by game speed, then tournament games have to be limited to 1x speed (a pain in the rear for any large map). If they’re skewed by hardware, they have to be double checked by a baseline server (suddenly ongoing expense for Cliffski goes way up, as does player frustration if what they see isn’t what they get). I’m worried that if either of those remain the case, the effort and/or frustration will prohibit competitive game modes from being integrated to the game (or, potentially, eliminate them even from unofficial circuits like the current forum games). That puts a very hard and unfortunate limit on what GSB can possibly be: it becomes a solo game of creating cinematics, not a puzzle game. Subjectivity does not belong in puzzles.

The hardware thing is worse, but game speed could theoretically be accepted as part of strategy. Personally though, I can’t do so. Such a consideration lands so far outside my imagination of the role that I assume in the game - Admiral of some sort - that it spoils the experience. Seriously, when a general is sitting down to plan battle strategy, he doesn’t ask “at what speed should I run reality?”

We (the players/testers) should attempt to document this phenomenon as accurately as possible. If there’s any chance of fixing it without re-writing the whole damn engine, then it needs to be found.

I don’t mind random chance per hit, as there are many many shots fired in one game, and it ultimately evens out to be a small variation in the end. What does bother me is that the game is a hybrid, a simulation AND a roll of the dice. The fact that the simulation has to allow a missile to hit, THEN a percent chance is calculated is confusing, and as were finding out here, inconsistent across different computers.

I would actually prefer ALL attacks be based on “dice rolls”, modified by current speeds, hull sizes, etc. The animation would simply be instructed to play out as a hit or a miss. This makes things more consistent (important for us competitive types), and options like replays and 10x game speed would be easy to implement.

I just want to reiterate that I think cliffski is doing a fantastic job, and I love this game. I just feel quite strongly about this particular subject :slight_smile:

Ahaha. Hey guys, I think there is a bit of confusion on this topic starting to creep in, so I need to explain some stuff:

Whether or not ANY weapon in the game hits is decided 100% by the simulation the moment it is fired. Every missile has its success pre-determined on launch. You may just notice that some missile tend to curve towards the target and some don’t. The ones that curve are often the ones that are forced to hit, no matter whatr (unless shot down). Obviously any change in simulation (shiedls repaired etc) will affect this, but the hit chance is calculated, not a result of whats drawn.

The reason that playback rates and other hardware issues affect determinism is not because the bullet appears to fly through a ship, its a different issue. Because ships check whether or not its time to fire a new bullet, or for missiles to release deocys during a ‘draw’ call, there is a chance that if draw calls are really rare, that you might fractionally take longer to fire or release those decoys. That means that a ship may have moved slightly further (because movement, although at a constant speed, is actioned upon during a draw call) at the point at which a bullet is fired, which can, very rarely mean the ship is only just out of range yada yada.
Anyway, you only need 1 of these to hapopen and the whole rest of the battle can play differently. And with thousands of things happening at once, it always does. My tests show 6 seconds is the average time when something goes slightly out of synch :frowning:
But anyway… the chances of a weapon hitting are definitely 100% simulation in terms of the calculated decision. i haven’t banged on about it, because some people subconciously don’t like to know that bullets are pre-planned to miss. It kinda spoils the magic :smiley:

That’s extremely good to know, thanks Cliffski!

I’m also newly optimistic because I ran several more tests of the scenario where this came up (I’d run more, but I have class to attend). Here the results of 8 games that I ran, 3 on 1x speed and 5 at 4x speed:

4x: 4-1 Imperials
Imperials 83% - Alliance 10% (consistent with Lokis222’s most commonly reported result)
Imperials 44% - Alliance 10%
Imperials 6% - Alliance 20% (consistent with Erlandr’s reported result)
Imperials 19% - Alliance 10%
Imperials 56% - Alliance 10% (consistent with my most common result during fleet testing and construction)

1x: 3-0 Imperials
Imperials 83% - Alliance 10% (consistent with Lokis222 and Erlandr when played at 1x speed)
Imperials 83% - Alliance 10%
Imperials 69% - Alliance 10%

The determinant of victory is how many Imperial Cruisers die to Alliance Fighters before the Imperial Frigates finish sweeping up the small fry. However, all of the reported results are possible on the same machine - though I thought that I noticed slightly different AI behavior post-patch (usually one Imperial Cruiser would break off to kill the Alliance decoy Frigate that occupied the Imperial Fighters - didn’t happen post-patch).

We need more test data. It’s possible that this is a complete false alarm. On the other hand, the Imperials fared far better at 1x speed than at 4x speed - so I’m not convinced that game speed doesn’t play a factor. We won’t know unless we test the everloving crap out of this scenario (which is a pain, since it takes 10-15 minutes at 1x speed).

The really, really, really good news is that I’m almost certain now that this isn’t hardware based after all.

so i’m totally wrong… :slight_smile: cool

i can’t quite tie this explaination into the modding thread on hyper-velocity shells though…

4x = 10-20% hit rate
1x = 40-50% hit rate
0.2x=70-80% hit rate


Question: while projectiles can be “forced” to hit, they still much reach their target before the damage is inflicted. Is it possible for such projectiles to skip over the target due to frame loss, even if they’ve been calculated to hit? I could swear that I saw antifighter missiles go through their target and then loop around and get a kill later (but it could also be my imagination).

Also, perhaps minimum range is part of the problem - are fighters dipping into minimum range so often that when frames are skipped turrets sometimes lose their chance to acquire a target outside their minimum range? And, finally, are turrets taking too long to acquire new targets? Legedi mentioned that turrets often take longer than their cooldown alone to find a new target, and that it might be possible that glitch is causing them to take even longer under time compression (and thus losing shots).

I say this because I’ve done even more testing, and 1x speed is consistently turning out 69-10 Imperial wins under the scenario in question.

Here’s another set of tests:

1x: Nice and Consistent; 4-0 Imperials

4x: All Over the Board; 3-1 Imperials

Something is just plain not right, and not right in a big way. At 4x the fighters kill off the squad of antifighter frigates and then proceed to kill 1-3 additional cruisers (and that number is all over the map). At 1x, sometimes they don’t even manage to kill off the antifighter frigates much less multiple cruisers.

I hate to do this, but… bump

The above inconsistency hasn’t been reconciled, which means that something isn’t working as intended in the code. That’s a bug, and might well be more solvable than trying to make “deterministic battles.” It’s not so much of an issue if only modded weapons cause problems, but it’s pretty obvious at the moment that it occurs even with baseline weaponry.

I reiterate:

If that’s the case, an additional check per projectile per frame, comparing xy coordinates relative to the target, should detect the radical shift when a projectile jumps over the target, at which point the predetermined hit could be inflicted.

A little extra testing, to put some numbers in regarding the conversation about higher speeds apparently favouring fighters.

40 Rebel frigates with no engines, and 6 antifighter missiles each, versus 300 Rebel fighters with 2 rockets and speed 2.99. I ran the battle 3 times at speed 4x, three times at 1x, three times at 0.2x

At 4x rate, the fighters won with 95%, 97%, 97% remaining
At 1x rate, the fighters won with 81%, 85%, 83% remaining
At 0.2x rate, the fighters won with 78%, 78%, 76% remaining

Then I got a bit curious, about a comment I’d seen regarding frame rate… So I ran some more battles again with the action off screen…
4x: 91%, 87%, 89% remaining.
1x: 83%, 83%, 75% remaining.
0.2x: 76% remaining

Sooooo… Running fast speeds seems to substantially increase high speed fighter’s performance against antifighter missile frigates. Frame rate seems to have an impact too, with lower frame rates increasing fighter performance, but really only noticable at 4x speed on my laptop (T7250@2.0Ghz, 8600M GT)

Now trying some slower fighters… 2.58 speed rebel rocket fighters.
4x, off screen, 29%, 48%, 27%
4x, on screen, 71%, 71%, 73%
1x, on screen, 10%, 12%, 23%
1x, off screen -20%, -43%, -28% (lost all three battles)

So… The 2.58 speed fighters consistently get a major victory if you watch the battle at 4x, on screen… And get a minor defeat if you cam away and play at 1x…

OK, now 2.58 speed rocket fighters attacking cruiser defence lasers (30 immobile cruisers with 7 cruiser defence lasers each. No shields.)
4x, on screen, 48%, 51%, 54%
4x, off screen, 75%, 64%, 60%
1x, on screen 66%, 59%, 63%
1x, off screen 55%, 57%, 68%
0.2x, off screen, 57%, 58%, 58%

Not at all sure what to make of those last figures.

Missiles / Target painters seem to break this rule. If you set fighters with target painters and rockets on each other, most rockets (about 80%) still miss, even when the target was painted for the duration of the shot (from being fired, to the rocket missing by miles.) The target painters certainly help though, it’d be more like 99.9% misses without them.

I thought painters were supposed to guarantee a hit, if they just multiply up the chance by a factor of about 1000, then it still makes sense.

Even cruiser rockets can miss near stationary cruiser targets while painted, it’s probably just the flavor of the weapon. Either that or he’s got firing arcs factored in the calculation.

I’m guessing target painters just increase tracking by a large value. 100% hit values would look a bit weird and would probably be borderline overpowered. Maybe it’s only 100% at optimum range?