The Elite Forum

The Big Three Plus One => GoldenEye 007 => Topic started by: IDPTheory on October 25, 2020, 01:42:58 am

Title: Line mode
Post by: IDPTheory on October 25, 2020, 01:42:58 am
Hello all,

As I'm sure you're all aware there is a button code in GE which activates the hidden cheat 'Line Mode' where the game displays only the edges of objects as if drawn by hand.

My question is this - Does the game run faster with Line Mode activated due to it having less to render on screen?
Does anyone have any way of testing this?
If it can be shown that it does in fact run better is there potential for a 'Line Mode Leaderboard'?

I'm aware it's awkward to play with the cheat activated but could be a fun side game for those weary of the vanilla look.

Has anyone done any testing on this before?

Best wishes to all
Title: Re: Line mode
Post by: RWG on October 25, 2020, 02:42:37 am
I actually thought about making a very similar thread/post recently.

"push button cheat codes" are disallowed in single play, though tbh, I'm not sure they *should* be (I know, I know, it's troll as hell, but they are "intended" in the game; and the time still saves as "best time" so...)

I think a good level to try this out on would be Streets SA/00A.  You could strafe to Val, pause to switch from 2.4 to 1.2; and also in that pause, activate Line Mode.  Then play out the rest of the level with Line Mode and see if there are any noticeable differences in lag, speed or timing.

It's definitely an under-examined area of the game, and I would really love to see it looked into more; if anything, just for the sake of my curiosity.
Title: Re: Line mode
Post by: IDPTheory on October 25, 2020, 05:06:32 am
Cheers Ryan, interesting to hear it's one of the lesser explored aspects of the game.

Since video proof is required for significant times anyway I think Line Mode could be an exception to the button code ban?

I like the Streets test idea but I think there's too many variables to ensure an accurate comparison.

I know TAS can't accurately emulate lag but is there anything to be learned by one of the resident tech wizards running the same TAS with Line Mode on and off? If so this eliminates variation in controller inputs between runs.
Also if there was some way of measuring fps on the original hardware we could use a straight c-up the length of the runway to minimise variation and do comparisons.

Hopefully a wizard will shed some light on this!

Fps aside, it would be an interesting side catagory since we've had slappers and turbo leagues etc, why not Line League?


Title: Re: Line mode
Post by: tolos on January 05, 2021, 09:26:54 pm
I tried my hand at some data collection. I think it's likely that the game does not run faster when line mode is activated.

-----

The theory: Run streets agent a bunch of times with and without line mode. Given enough data, a statistically relevant result will emerge, assuming the runs are consistent.

Data collection: I ran streets 100 times on agent (details below). I used a gameshark to expose the line mode cheat and completed another 100 runs. (I streamed some of this and met a few elite members). For various reasons, I wasn't really happy with this data set, but the preliminary data showed that line mode was a bit slower. I changed some of my setup and collected a second data set, 50 runs normal and 50 runs with line mode. I was much happier with the quality of this data set (variance is much lower), but once again this seemed to indicate that line mode is much slower. For reference, the 50 run result difference of averages is 0.88 seconds.

Technical Discussion: I think the assumption in this thread is that less stuff is being drawn on screen, and therefore there is less processing going on, and therefore there will be less lag. I had also assumed enabling line mode would make the game slightly faster, but since the data collection seems to disagree, I think it's important to find a technical explanation (or an explanation for why the data is bad). If you check the Goldeneye n64decomp project, you can find where the linemode check happens in the main game loop: https://github.com/n64decomp/007/blob/045df043162ff5dac7c324e9cf74f3d877067187/src/boss.c#L504 (https://github.com/n64decomp/007/blob/045df043162ff5dac7c324e9cf74f3d877067187/src/boss.c#L504). (You can test this by replacing the branch instruction at 0x70006620 (/* 007220 70006620 10400037 */  beqz  $v0, .L70006700) with a nop). Interestingly, the Project64 default graphics plugin does not handle this gracefully, but it does kind of visualize what's happening, in that basically everything on screen gets drawn again, but this time just showing the edges (the GlideN64 plugin works correctly for linemode). To summarize: when line mode is enabled, there's extra work the main game loop does which causes additional graphics rendering.

Data Collection Limitations: the elite members that stopped by my stream were concerned about my game skill level and offered some helpful advice (this is partly why I threw out the first data set). I say that as a preface, that when line mode is active it's harder to orient yourself in the level. If you're strafing against the wall, you can't watch a texture scroll by to gauge your position because the screen is just white. So, it's possible that someone more skilled at the game would see line mode times closer to normal time. On the other hand, line mode feels laggier, but I don't know how much of that effect is because the black/white divisions on screen are "sharper" than just normal textures.

Data Collection Limitations (boosts): I did try to track boost counts with this data set, but .... What counts as a boost? (some rhetorical questions now) Getting shot parallel to your current trajectory? What about getting shot perpendicular, so your route is longer? What if you're boosted forward, but your route is longer? I tried to lump anything that improved your time as a forward boost, and anything that made your run take longer as a back boost. For especially bad back boosts (e.g., getting shot into a corner) I would reset the run. Overall, the normal run averaged 2.18 forward and 2.22 back. Line mode averaged 1.88 forward and 2.38 back. Does 0.46 boost difference account for 0.88 seconds? I don't think so, but ...

Technical Discussion Limitations: I'm not a N64 graphics expert, my above explanation may not be correct.

Conclusion: Line mode is probably slightly slower than normal graphics mode.

-----

Appendix A - setup
Spoiler
controller 2.3     
NTSC     
US     
no lookdown (always the neutral position)
WR (street) route, full BAx2 route, no self boost/grenades/rockets
music     max
fx     max
auto-aim     on
sight on-screen     on
look ahead     on
ammo on-screen     on
screen     full
ratio     normal
CC move     43
CC strafe     73

Appendix B - regular run data
Spoiler
#,game time,boost forward,boost back
1,1:20,1,4
2,1:19,3,3
3,1:19,5,1
4,1:19,3,1
5,1:18,2,2
6,1:19,3,0
7,1:19,3,2
8,1:21,1,2
9,1:19,2,3
10,1:18,2,1
11,1:19,2,2
12,1:20,1,3
13,1:18,0,1
14,1:19,2,3
15,1:20,1,3
16,1:19,2,0
17,1:19,1,3
18,1:21,2,6
19,1:20,4,4
20,1:19,2,1
21,1:21,3,7
22,1:20,2,2
23,1:19,3,2
24,1:19,2,2
25,1:20,1,5
26,1:20,1,2
27,1:20,4,6
28,1:19,1,2
29,1:19,1,3
30,1:20,2,5
31,1:19,1,2
32,1:19,2,2
33,1:19,2,1
34,1:18,2,0
35,1:18,2,1
36,1:17,4,1
37,1:19,3,1
38,1:19,2,0
39,1:19,3,1
40,1:18,4,3
41,1:19,1,1
42,1:19,3,2
43,1:18,1,1
44,1:18,3,0
45,1:18,1,0
46,1:19,3,4
47,1:19,2,0
48,1:19,3,5
49,1:18,4,4
50,1:19,1,1

Appendix C - line mode run data
Spoiler
#,game time,boost forward,boost back
1,1:20,0,2
2,1:20,2,3
3,1:19,1,2
4,1:20,4,4
5,1:20,3,4
6,1:20,1,2
7,1:19,4,1
8,1:20,0,2
9,1:20,4,2
10,1:19,2,0
11,1:20,2,2
12,1:21,3,4
13,1:19,0,0
14,1:20,4,2
15,1:21,1,2
16,1:19,3,2
17,1:22,1,3
18,1:20,1,0
19,1:20,3,2
20,1:21,5,3
21,1:20,1,1
22,1:20,1,0
23,1:20,3,0
24,1:19,3,3
25,1:18,1,2
26,1:20,0,2
27,1:21,0,1
28,1:21,2,4
29,1:20,0,3
30,1:19,3,4
31,1:19,4,4
32,1:20,2,2
33,1:20,2,4
34,1:20,2,5
35,1:19,1,1
36,1:20,0,1
37,1:20,3,3
38,1:20,0,2
39,1:19,3,6
40,1:22,2,2
41,1:21,2,5
42,1:21,1,4
43,1:19,1,2
44,1:19,1,1
45,1:20,3,4
46,1:20,3,3
47,1:20,2,4
48,1:19,1,0
49,1:21,2,4
50,1:20,1,0
Title: Re: Line mode
Post by: Cal on January 06, 2021, 11:33:10 am
The line mode cheat works in multi too, makes for a pretty cooked game