Reverisble Vs. Unreversible Events

Discuss programming topics for the various GPL'd game engine sources.
Post Reply
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Reverisble Vs. Unreversible Events

Post by Baker »

This is from the perspective of demo rewind for NetQuake.

Reversible events in Quake:

1. Most entity positioning and frame animation interpolation.
2. View bobs, idle animations
3. The clock displayed, of course

4. Anything that is a direct calculation of the current time:
4a. Sprite animation
4b. R_TextureAnimation (animated textures)
4c. Sky scrolls
4d. Water warping animations
4e. Skin group animations

Irreversible events in Quake ... Client side effects:

1. Temp entities, their dynamic lights and particles.
2. Status bar flashes, damage flashes, face animations.
3. Fog transitions.
4. A limited few aspects of movement/frame lerping in some situations (if it relies on one-time server flags)
5. In a trivial way, centerprint (expected to stay on-screen for 3 seconds).
6. Map change.
7. Sound. Cd track changes.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: Reverisble Vs. Unreversible Events

Post by Spike »

many of your 4X things are a product of the client's uptime rather than the server's gametime, and will vary from one client to another.

for the sake completeness, you don't mention killed monster/secret counts.
you also don't mention console prints (svc_print), which persist on the console. if you're often rewinding over the same short period, you may want to remove such prints too.
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Reverisble Vs. Unreversible Events

Post by Baker »

Spike wrote:many of your 4X things are a product of the client's uptime rather than the server's gametime, and will vary from one client to another.
I'm mentioning this from the perspective of demo rewind, but yeah I know the message timing can vary for the client doing recording. I'm also viewing this from the perspective where a client's usage of "realtime" has been eliminated for anything pertaining to the client time.
Spike wrote:for the sake completeness, you don't mention killed monster/secret counts.
To the best of my knowledge those are reversible (I've not experienced a situation I can recall where this failed me):

Code: Select all

		case svc_killedmonster:
			if (cls.demoplayback && demorewind.integer)
				cl.stats[STAT_MONSTERS]--;
			else
				cl.stats[STAT_MONSTERS]++;
you also don't mention console prints (svc_print), which persist on the console. if you're often rewinding over the same short period, you may want to remove such prints too.
I thought about mentioning them in the list and the con_notify text. I guess I should have to be thorough.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Post Reply