Page 1 of 1

[Done for V0.42] RTC Recorder

Posted: Tue Aug 08, 2006 7:55 pm
by Paul Stevens
If only George would break down and allow
recordings to be created and played back.
The things he has done already are much more difficult.
And, besides allowing people to show off their dungeoning
skills, recordings can be such wonderful debug
aids.

Posted: Wed Aug 09, 2006 6:47 pm
by George Gilbert
Oh, go on then - if you insist :wink:

Done for V0.42

Posted: Wed Aug 09, 2006 7:45 pm
by beowuuf
Heh, insane I tells you, insane! So, in CSBwin it basically recorded every keystroke and action and basically auto-played the game - how does it work in RTC?

Posted: Wed Aug 09, 2006 7:53 pm
by George Gilbert
Pretty much the same I guess...

...it takes a copy of the internal state at the start of the recording, then records every mouse movement, click and key press along with the time that they were made. At time of playback, it just restores the state and then at the appropriate times, pumps in the mouse / key data. The existing engine takes care of everything else.

Posted: Wed Aug 09, 2006 8:17 pm
by Lee
Ha! :lol:

Top man, George.

Posted: Wed Aug 09, 2006 8:17 pm
by THOM
does that mean Monsters act autonomous again - so that they could be on a different tile because of a different decision of movement?

Posted: Wed Aug 09, 2006 8:20 pm
by Gambit37
Flippin 'eck -- RTC movies! Sweeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeet. :) :) :)

Posted: Wed Aug 09, 2006 8:42 pm
by George Gilbert
thom wrote:does that mean Monsters act autonomous again - so that they could be on a different tile because of a different decision of movement?
I can see where you're coming from on this one. The decisions made by monsters are done apparantly at random (although weighted by the environment), which means that each time you play the game its different. Therefore, if you're only recording keystrokes etc, how can the game be the same when played back...

At this point, we could have an interesting philosophical debate here about what "random" means. However, the upshot would be that *no* computer game has truly autonomous features in it - everything is deterministic - by playing exactly the same set of movements in at exactly the same time, you'll get exactly the same result. Which is what happens with the playback in RTC (and presumably CSBWin); you'll get exactly the same decisions made by all the monsters.

In fact, if you played the game ordinarily twice, it's possible to get exactly the same behaviour by the monsters. Of course you'd have to put every single key stroke / mouse movement in at exactly the same time (down to the nearest millisecond) as the previous time; but in principle it would work.

Of course, "random" is very different from "unpredictable by a player"; and it's that what really counts.


************

BTW - generating *truly* random decisions is big business. You can buy CDs which only contain random numbers which you can use and they cost a fortune (thousands of dollars each). As mentioned above though, virtually every case you can think of requiring randomness, with the exception of extremely high level cryptography, merely "unpredictable" (or even "unpredictable in real time" for games) will do.

Posted: Wed Aug 09, 2006 10:59 pm
by Paul Stevens
Now if George would only break down and
compile a version of RTC for the PocketPC,
the Nokia 770, Linux, and the Macintosh.
Then I could retire.

Posted: Wed Aug 09, 2006 11:07 pm
by George Gilbert
Don't push your luck :wink:

Posted: Thu Aug 10, 2006 1:29 pm
by Lee
:lol:

Posted: Thu Aug 10, 2006 6:52 pm
by Sophia
George Gilbert wrote:<lots of random stuff about randomness>
So, basically, you store the random seed that you used in the recording so any random numbers generated come out the same each time?

Posted: Thu Aug 10, 2006 7:02 pm
by Daecon
Basic determinism.

If you flip a coin at x degrees at y distance above the ground with z force, it will always land the same way up every time, similarly, if you do action x at y time then the monster will do action z every time...

At least, that's the way I understand it. :)

Posted: Thu Aug 10, 2006 7:12 pm
by George Gilbert
Sophia wrote:
George Gilbert wrote:<lots of random stuff about randomness>
So, basically, you store the random seed that you used in the recording so any random numbers generated come out the same each time?
Yep - I was trying to explain without needing to know about seeds!

Posted: Thu Aug 10, 2006 7:17 pm
by George Gilbert
ZoKathRa wrote:Basic determinism.

If you flip a coin at x degrees at y distance above the ground with z force, it will always land the same way up every time, similarly, if you do action x at y time then the monster will do action z every time...

At least, that's the way I understand it. :)
Yep, although in the "real" example, you'd need alot more than just x, y and z. In particular you'd also need to reset the position, velocity, weight etc of every single molecule (and atomic / sub-atomic particle) within a radius of about 600,000 km of your coin. Even getting a single one out of place may result in the coin landing the other way up.

But in principle, yes :wink:

On a less flippant note (pun intended), a similar principle applies to the dungeon. Whether the party decides to throw an item or not, may change which direction a monster will turn many levels below (i.e a seemingly insignificant change in one area can influence larger scale events elsewhere). Somewhat amusingly, in mathematics such a thing is known as Chaos theory...oh the irony :D