Author Topic: Tech question on demos  (Read 2785 times)

Offline VaeVictis

  • i was -1 because you fucking suck
  • Brobdingnagian Member
  • *
  • Posts: 4498
    • View Profile
  • Rated:
Tech question on demos
« on: April 10, 2010, 05:04:52 PM »
So I'm bored and been meaning to post a thread on it just cause i am curious and it has been bugging me

I obviously am not a person who has dissected any quake source code or really coded a lot of games :) so i have to ask

How does a demo actually work? what does it record? how does it play back perfectly?
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline [BTF]Sigma

  • Phenomenally Prodigious Member
  • **
  • Posts: 3059
    • View Profile
  • Rated:
Re: Tech question on demos
« Reply #1 on: April 10, 2010, 06:40:40 PM »
!ZING!

All aside, great topic :thumbsup:

I'm guessing it replays what the client is doing and what the server is sending to the client. I think it has something to do with the timing of packets.

Again, good topic.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline VaeVictis

  • i was -1 because you fucking suck
  • Brobdingnagian Member
  • *
  • Posts: 4498
    • View Profile
  • Rated:
Re: Tech question on demos
« Reply #2 on: April 10, 2010, 06:45:55 PM »
!ZING!

All aside, great topic :thumbsup:

I'm guessing it replays what the client is doing and what the server is sending to the client. I think it has something to do with the timing of packets.

Again, good topic.

well i was thinking something like it saves cmds run through the engine and just replays the game because all the values and stuff should make the round play exactly the same... but then i thought, quake2 also has random variables and stuff :/

whats really interesting to me is how the file size is so tiny for demos compared to movie files, i know its mostly because it doesnt really have to render anything, but there has to be more keeping that file size down
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline [BTF]Sigma

  • Phenomenally Prodigious Member
  • **
  • Posts: 3059
    • View Profile
  • Rated:
Re: Tech question on demos
« Reply #3 on: April 10, 2010, 06:56:25 PM »
It's simply data that the engine uses to rebuild the recorded section of the game. (afaik)

I'll try to explain it this way.

Imagine you've gone and bought an IKEA desk with all the attachments. You open up the box and look at the instructions. They may simple and straightforward, yet the task of actually assembling the desk can take a while.

Now, the instructions are actually the *.dm2 file. The assembling is done by your client. The video of a demo is just like someone recording you following the instructions.

Does this analogy make any sense? I think I may have been quite blunt.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline reaper

  • Opulent Member
  • *
  • Posts: 2872
  • Nice night for a walk, eh? - Nice night for a walk
    • View Profile
  • Rated:
Re: Tech question on demos
« Reply #4 on: April 10, 2010, 07:01:48 PM »
http://tastyspleen.net/quake/forums/index.php?topic=2629.0

Some of this was discussed in this thread.  It seems basically the demo is the information the server sends the client.  Keygrip takes this information and shows it frame by frame and allows editing, a quake2 client replays it for you.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
VaeVictus "reaper is a lying sack of shit and ragequit then had, probably slugs, come alias and beat me, wasnt even the same person playing OBVIOUSLY, accuracies basicly doubled, and strategy

Offline VaeVictis

  • i was -1 because you fucking suck
  • Brobdingnagian Member
  • *
  • Posts: 4498
    • View Profile
  • Rated:
Re: Tech question on demos
« Reply #5 on: April 10, 2010, 07:24:24 PM »
so.... a demo is basicly the frames of data visible that were registered on your client, and then you play the frames back with your client from a dm2 file and it smooths together just as if it were rendering the normal game

that right?

does that mean if i up my cl_maxfps i get a larger file size for my demos? o.o
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline [BTF]Sigma

  • Phenomenally Prodigious Member
  • **
  • Posts: 3059
    • View Profile
  • Rated:
Re: Tech question on demos
« Reply #6 on: April 10, 2010, 07:58:54 PM »
Not sure how those mesh together :???:
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Online QwazyWabbit

  • Carpal Tunnel Member
  • ******
  • Posts: 1375
    • View Profile
  • Rated:
Re: Tech question on demos
« Reply #7 on: April 10, 2010, 11:08:57 PM »
A very good question.

A client demo file contains the initial state of the client, the map file name, the models in use and initial data it needs to start the playback from the moment the data record begins, then it contains a record of the frames received from the server by the client that made the recording. The server frames come at a fixed rate of 10 frames per second so I don't think the cl_maxfps has any bearing on the file size. The length of the file will merely depend on the intensity of the action and the duration of the recording.

A video record of a playback of a demo is a set of screen captures of the image of the played demo file. The skins, models and environment will depend on the client used to play it back, not the client that made the demo.

R1q2 clients using protocol 35 record more information than an original Q2 v 3.21 client would when using protocol 34.
« Last Edit: April 10, 2010, 11:13:29 PM by QwazyWabbit »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

 

El Box de Shoutamente

Last 10 Shouts:

 

Yotematoi

May 17, 2025, 08:33:15 AM
Yo desde el año 2007 me enfermé de Q2, es incurable  
Morir y revivir es costumbre, lástima q el QT estaba bueno
 

ImperiusDamian

May 12, 2025, 01:45:35 AM
Quake II is not 27 years old. I refuse to accept THAT much time has gone by.
 

|iR|Focalor

May 11, 2025, 02:33:39 PM
 

-Unh0ly-

May 03, 2025, 08:02:46 AM
198.179.6.200:30634
 

Yotematoi

May 02, 2025, 10:27:47 AM
Note for Player-4109 "Remember, the Guinness Book of Records does not include cowards who shot at someone by treachery." :D
 

|iR|Focalor

April 02, 2025, 02:47:07 AM
 

Yotematoi

February 14, 2025, 12:41:48 PM
 :-*
 

|iR|Focalor

February 13, 2025, 07:31:24 AM
I was on DM this morning for the first time in a pretty long time. Seemed fine to me.

0rbisson

February 13, 2025, 04:54:21 AM
DM server is fucked. 2 point blank rockets from spawn and lava damage and player survived? WTF?" Also someone has fucked with the spawn points, every single time no matter how big the map you spawn right in front of the person who killed you last

Show 50 latest
Welcome, Guest. Please login or register.
May 22, 2025, 10:06:33 AM

Login with username, password and session length