PDA

View Full Version : Do you want a third-party replayviewer? (att: Barleyman)


MaHuJa
03-25-06, 09:47 PM
I've been thinking about it ever since I (a couple hours ago:-j) read barlymans post in the suggestions thread, and thought about the things I put in the reply below.

I will, however, need to have someone else writing the graphical interface... I'm thinking that one can make the gui totally pluggable. (I'll be using C++, but if your programming language of choice can use C interfaces, and I believe most suitable for the task can, we can make it work.)

Essentially, if I were to make a replay viewer, it would likely have the following features when "finished":

-The DDI from the navmap, with information about depth, speed, etc. would be available.*
-Creating "keyframes" and indexes, for fast forward/backward motion. I'm intending to cache it in a file right besides the replay file as an option.
-Exporting the state of the replay into a mission file, so that, using the same interface, you can see (approximately, due to TA/dipper length/depth etc) what the player could see at that point
-The possibility of toggling the three categories of contacts (truth, link, own solutions) between fully visible, transparent, and invisible. (slider?)*
-If a gui-maker decides to go advanced enough, you could perhaps get the 3d view too...*
-We'll have to see what more ideas pop up.

* Depends on whoever makes the gui in use, I guess...


I'm supposing that SCS will give me the specs of the replay files, etc. - I hear they have been similarly friendly before, with database editors.

As you might guess from the poll, I'm gauging interest. Would be a bummer to spend the time on it if noone was going to use it anyway.


--- --- --- --- --- --- ---

Barleyman, I read through your post in the suggestion box, but found that this big reply doesn't quite belong there, so I made a new thread instead.
I do not think you see quite the depth of the problems... I'll try to outline them for you.

First of all, I agree that replays as they are now are unacceptably slow when moving backward or forwards in time. However, your thinking haven't brought us much closer to a solution at all, because you overlook too many things.

Secondly, some of the idea was to (already) save data so that a replayer could show the whole thing in the navmap or similar interface, complete with 3d. Only, such a replayer hasn't been made yet. (I believe one could even compute the sensor data etc along the way, just so that is said. You could essentially see everything the user playing it saw.)


When creating a system like the replay saver, you have to balance a few factors:
-File size
-Speed
-Accuracy
-Continuity effects (the ability to move forwards and backwards in the replay - which is broken now)
(Continuity is a bad choice of word, but I couldn't think of anything better.)
In general, anything you do to improve one, will negatively impact at least one of the others.
In addition, you have some additional restrictions on what your system must be able to handle:
-Variable number of platforms (torpedoes launched, aircraft shot down, ships sunk then removed)
-Difference direction front vs travel should be accurately represented.
-You need to interleave data about contacts made, and their state at the time. Remember these go from bearing lines updated every few seconds to solutions.

For example, they could store the positions in floats rather than doubles (32 and 64 bit floating point numbers) to reduce size, but at the cost of accuracy.
With the game engine using double-precision floating points natively for positions, probably with good reasons, it's only natural to use these 8-byte values throughout.

They could send it through a compressor to reduce the file size, with only a very slight hit on speed, but this would very likely be very bad for continuity, since it would have to be decompressed start-to-end.

AFAIK (if I remember the SCS statements correctly) they do leave out some data, primarily positions, rather "adding it up" as they process it from start to end. Reduction to filesize, bad for continuity and speed.

They could add data to the replay file only when something changed (and otherwise the reader would just calculate from last information). Speed hit (for the reader), continuity hit, negligible accuracy hit. (And this presumes waves, wind gusts etc. conform to chaos theory predictability)


4byte X latitude, 4byte Y latitude, 2 byte altitude(for replay purposes not really needed), 2 byte direction and 2byte speed recorded once a second

This lacks way too much metadata to be of any real use.

Look at this example:
struct objectState {
short id; //2 - need to know what object we're dealing with. Corresponds to the number in truth mode.

// position - assuming z to be altitude here
double px; //8
double py; //8
float pz; //4 - they would get away with float if size was a concern, but at some speed cost.

// Where the object is pointing, direction
float dx; // 4 - pitch
float dy; // 4 - course
float dz; // 4 - roll
// And that is if they aren't using quaternions, which is often a better idea than euler directions, but is four floats.

// How the object is moving
float vx,vy,vz; // 12
// This is because the direction of flight/movement is *not* always equal to where the object is pointing. This is especially because of wind and water currents, but not only. Check with your average flight simulator that shows where the nose is pointing and the actual flight direction
}


That's 66 bytes (presuming I didn't think of and add yet another entry since I summed it). Presuming one of those a second, one object will create nearly 250kB per hour. That means four objects, for one hour, will be 1MB. 100 objects? 25Mb. I think this is about the rate DW does produce (not sure), but DW does it more often, since once a second will have aircraft maneuvering jumping about like some laggy flight sim. (Ever played flight sims, and tried to chase down a guy lagging very badly? With his aircraft "blinking" around madly?)

And in addition to that, there would have to be a way to "package" that, and keep tabs on the "when" for each piece of data (without it, you have to assume a constant number of entries for objects... see "additional restrictions above"), and add the contacts etc, which will lead to additional overhead. Look to the mpeg, avi, ogg, and matroska (mkv, mka) multiplexer formats to see what I mean. (Though I guess one could package those features into the entries themselves, it would likely become far less efficient in all ways.)


The most "backward compatible" would be to copy the video codec trick of "key frames". Every five minutes or so, write down the whole state of everything that is in there right then. Then the reader will only have to move on from there.

Bellman
03-26-06, 03:11 AM
:D I voted yes for 'any' improved RV but would be happy with one which gave me some more information
and where I could 'export' as you outline.

LuftWolf
03-26-06, 05:35 AM
DW absolutely needs to have a third-party replay viewer.

In terms of extra features, I would definately include some features on the front end, like automatically importing new replay files and allowing the user to name them.

Perhaps you could simply code the program to have an "import" feature that could default to main DW directory, find and extract and allow the user to rename the new replay.dat file, all with a single menu or button selection in the replay view interface.

That would be so far beyond cool. In fact, it would make playing DW in MP so much greater, because I could easily save, name, and store my replays, essential tools to becoming better and learning opponents (if I ever get the time to play DW online in large amounts again... perhaps I should join an MP-VF, any takers??? ;) )

Molon Labe
03-26-06, 09:09 AM
Hehe, there is at least one that encourages modded play.. ;)

MaHuJa
03-26-06, 11:21 AM
This project will be on hold until three things have happened (in any order):

1 - I need to get the other project, the autoneutrals or whatever I'll call it, reasonably up and running. This seems like the simpler project, anyway, and I'm (as of yet) giving it a high priority.

2 - I need at least one gui programmer "on the team" before I can do much useful. I can make the "core" before then, but it will be hard to test properly without a working gui.

3 - I send a request for information to and get a (positive) reply from SCS.

I think that in the end, the "replay core" will be a dll that the gui program can link to.


Perhaps you could simply code the program to have an "import" feature that could default to main DW directory, find and extract and allow the user to rename the new replay.dat file, all with a single menu or button selection in the replay view interface.

Perhaps even automatic on startup of the application, renaming it according to some template (that could in the end be user-settable?) like "datetime playerlist scenario" (provided scenario name is included in the replay file?)

LuftWolf
03-26-06, 03:26 PM
One thing to be aware of in 1.03 (I'm not sure I noticed this in previous version): MP replays are named by the Sim as [NickName]_replay.dat.

Barleyman
03-27-06, 07:08 AM
Let me clarify my position a little - I'd be quite happy with the present replayer UI .. IF the seek bar actually worked properly, which it does not. 3D replay would be neat but for me, I'm mostly interested to see what happened in the 15 mins before "OMG We're going to die, we're going to die KABOOM"

There isn't usually THAT much happening in the scenario, so I'd just like to see who picked me up and where did those torpedoes actually hit (if anything) .. I can do that right now but that requires saint's patience and/or a good book.

There was stand-alone replay viewer for Sub Command but time seek was as grievously broken as it is now.

So, 3D eye candy aside, most pertinent information for me would be who has detected who. Possibly by viewing OPFOR solution the same way you see your own with "show truth" off. Or just by highlighting or something all contacts which have detected you.

On the plus side, you can ditch almost all of the information of what you presented to show simple 2D nav map replay. Which regardless provides all the relevant information about who did what and with whom.

The most "backward compatible" would be to copy the video codec trick of "key frames". Every five minutes or so, write down the whole state of everything that is in there right then. Then the reader will only have to move on from there.

And that is an excellent suggestion. Makes a person wonder why has it not been implemented within the decade SCS subsims have been with us!?

Every 5 mins is probably bit sparse, but even at 1min you get quite nice granularity. Plus get rid of the warping subs-phenomenom in replays.

MaHuJa
03-27-06, 11:30 AM
3D replay would be neat but for me,
That's SCS' unrealized idea, not mine. I don't expect it to happen at all, except for showing depths of subs and torpedoes when you click on them. Just what is shown is up to whoever makes the GUI.

I'm mostly interested to see what happened in the 15 mins before "OMG We're going to die, we're going to die KABOOM"
:rotfl:

I see your point.

...I'd just like to see who picked me up and where did those torpedoes actually hit (if anything) .. I can do that right now but that requires saint's patience and/or a good book.

...most pertinent information for me would be who has detected who. Possibly by viewing OPFOR solution the same way you see your own with "show truth" off. Or just by highlighting or something all contacts which have detected you.

This information is not stored in the replay file, I believe. If one has access to the game engine itself one could possibly calculate it, but it would be a very heavy process.

Instead, at least for singleplayer games, look into using a debugviewer and the /debugoutput option, for those features. (There is something in these forums on them.)

On the plus side, you can ditch almost all of the information of what you presented to show simple 2D nav map replay. Which regardless provides all the relevant information about who did what and with whom.


The most "backward compatible" would be to copy the video codec trick of "key frames". Every five minutes or so, write down the whole state of everything that is in there right then. Then the reader will only have to move on from there.

And that is an excellent suggestion. Makes a person wonder why has it not been implemented within the decade SCS subsims have been with us!?

Every 5 mins is probably bit sparse, but even at 1min you get quite nice granularity.

Perhaps this is the first time they've heard it mentioned regarding replays...

Either way, in my external viewer, it would be generating the keyframes and saving them in a "companion file". My intention was to make the time between each frame user-settable.

Plus get rid of the warping subs-phenomenom in replays.

Haven't noticed much of those, except for those where that actually seemed to be the gamestate - in other words, it not being a replay phenomenon, but a thing of multiplayer desync.

If you ask me, the network code is what needs most work. I'd go so far as to recommend ditching directplay altogether. SCS is the only ones who have actually stuck with it of all "commercial-grade" game developers I know who used it in the first place. And we can see how well that worked out for scs... :shifty:

GunnersMate
03-27-06, 02:38 PM
Does FRAPS work at all?

Barleyman
03-28-06, 05:03 AM
The most "backward compatible" would be to copy the video codec trick of "key frames".

Perhaps this is the first time they've heard it mentioned regarding replays...

Either way, in my external viewer, it would be generating the keyframes and saving them in a "companion file". My intention was to make the time between each frame user-settable.


Perhaps. Kind of long long time for no-one to think about it, thought. I suppose it is because Jamie + co play with DOD supercomputers and for them the replay works like a charm.

So in effect you're planning to make external utility which would crunch the replay file for however long it takes and then produce a keyframe file which would contain necessary info for replay? If it worked with reasonable speed it's a neat idea, true. However, since there is the warping problem..

Plus get rid of the warping subs-phenomenom in replays.


Haven't noticed much of those, except for those where that actually seemed to be the gamestate - in other words, it not being a replay phenomenon, but a thing of multiplayer desync.

Good theory, but I have only ever played singleplayer. There's definite warping going on in the replay for both your boat and the bad guys boad/helo/whatever. Only the dead boat appears on the correct place.

Takes the edge off the fun of watching the dance between CMs and torpedoes..

Optimal solution would be to kick SCS coder butt to implement a keyframe feature as an option in the game settings. Should be relatively straightforward to implement in code level, no? And, yes, I definitely do think this would increase the commercial salability of the game instead of obscure (to most people) tweak about mavpoon capabilities and such..

Molon Labe
03-28-06, 09:04 AM
/OT Rant mode on

I think "most people" that play hardcore military sims like DW know what the frak a Maverick is and can tell modeling it such that the range is over twice what it has in real life absofrackinlutely ridiculous. Getting it fixed is much less obscure than wanting the fictitious "65cm torpedo" replaced with the real 65-76 wakehomer, which people also justifiably bitched about.

Anyone who didn't notice just "isn't familiar with the problem," http://www.mit.edu/activities/safe/humor/avoid-foul-language. :P :stare: :damn: and anyone who didn't care doesn't give a rat's ass about realism, in which case they have earned a GSGT Hartman-esque evaluation of their personal worth.

/OT rant mode off
Ah, that feels better!

OneShot
03-28-06, 09:45 AM
Totally OT :

I like this part... in which case they have earned a GSGT Hartman-esque evaluation of their personal worth.

Tho shouldn't it be GySgt Hartman? :know: :rotfl:

:lurk:

Molon Labe
03-28-06, 03:00 PM
OT: You might be right, I'm not sure what the proper USMC acronym scheme is.

Barleyman
03-29-06, 06:27 AM
Mavpoon capability can be (and has been!) modded easily. Functional replay cannot.

LuftWolf
03-29-06, 11:46 AM
Of all the amusing things in this thread, the one I find the most amusing is right at the top, in the poll itself.

No, I'll wait for SCS to make one

And people actually voted for this option too!!! :rotfl: :rotfl: :rotfl:

goldorak
03-29-06, 12:32 PM
No, I'll wait for SCS to make one

And people actually voted for this option too!!! :rotfl: :rotfl: :rotfl:

Didn't you know that patience is the virtue of the strong ? :rotfl:

MaHuJa
03-29-06, 06:05 PM
Didn't you know that patience is the virtue of the strong ? :rotfl:

I think it's not a matter of when, as would require patience, but if, which requires faith.

I'm not that much of a believer in the first place, and besides, it might take pressure off SCS to do something only they can do, say, add -real- harpoons to the P-3.

On the warping issue, it might be something the replayer can avoid interpreting, so to speak, and therefore "fix", but that depends; I'm thinking a "big position jump" (or a user option) could trigger "don't look at the positions, calculate them from courses and speeds" type functionality. This may, however, end up being at the cost of accuracy, etc.


I'm still needing someone for the frontend though. Ah well, meanwhile the _NeutralGenerator project is getting my attention.

Nexus7
03-29-06, 11:11 PM
A more efficent ReplayViewer would be a great improvement :yep:

Barleyman
03-30-06, 02:42 AM
I'm not that much of a believer in the first place, and besides, it might take pressure off SCS to do something only they can do, say, add -real- harpoons to the P-3.

Ahem. SCS could add "keyframe" recording capability likely with a lot less fuss than additional weapon UI to Orion.. After all, datalogging code *is* already there. And if you record "keyframes" to separate file, why, you don't break the existing replayviewer either.

Why do you want to use P-3 as a strike aircraft anyhow? Has it ever been used in such a role?

Molon Labe
03-30-06, 10:10 PM
DW is a simulation. The P-3 carries the harpoon iin real life; so should it in DW.

LuftWolf
03-31-06, 03:35 AM
Why are people pushing so hard for something that is never going to happen.

You can add detectable masts to that catagory as well. ;)

It's much better to spend time worrying about things that are moddable or genuine bugs. :)

SCS has shown zero inclination to reverse decisions that were based on "gameplay" or "USNI Reference data", whereas Jamie takes very seriously and the SCS team works hard to resolve genuine bugs when they are reproducable.

Barleyman
03-31-06, 03:53 AM
Why are people pushing so hard for something that is never going to happen.
You can add detectable masts to that catagory as well. ;)
It's much better to spend time worrying about things that are moddable or genuine bugs. :)

There's one major difference between properly functioning replayviewer and detectable masts.

One issue is hit by every single person who plays the game, including gaming press who actually reviews the game. Another is one of these fairly obscure things that should be addressed but will not have big impact even if they are.

Btw, what "gameplay" factor influences the decision to omit genuine improvements to the replays in last ten years?

LuftWolf
03-31-06, 03:59 AM
I was referring to the harping about harpoons and such. :yep:

Yes, the replay feature needs to be addressed.

MaHuJa
03-31-06, 08:43 PM
One issue is hit by every single person who plays the game, including gaming press who actually reviews the game. Another is one of these fairly obscure things that should be addressed but will not have big impact even if they are.

Ummm... mind explaining which is which?

Replay problems hits only those who use them, which I suspect isn't quite everybody (I've been lax with them myself, but that may be partially because of the problems..)

As for detectable masts... that would affect most players, but how many would actually notice without being told?

(First thing they'd need to do, is make sure the "mast raising" is transmitted in other cases than same platform player. Perhaps making sure AI used masts properly. Then, they'd have to add a field in the masts database for how radar visible they are.)

I usually recommend keeping masts down when you're not actively using them, regardless of detectability, because that gives you the ability to emergency maneuver, without fear of breaking masts because you forgot them or they weren't lowered quick enough...

LW, I seem to remember you tried adding an extra emitting (counterdetectable) sensor to the masts? What did go wrong with that? Considering the CIWS radiation is only detectable (to a player, at least) at very short ranges, something similar must be possible for other emitters...

LuftWolf
04-01-06, 01:02 AM
LW, I seem to remember you tried adding an extra emitting (counterdetectable) sensor to the masts? What did go wrong with that? Considering the CIWS radiation is only detectable (to a player, at least) at very short ranges, something similar must be possible for other emitters...

That was actually Amizaur, and I completely forgot about that...

I think the problem was that any sensory modality that was chosen provided instant detection of the mast as soon as it was raised... that or it didn't work at all. I maybe mixing up the results of this work with the results on work done to make missile transients automatically detected, as it was some time ago that this was done.

I think it's something to look into again, thanks for reminding me. :)

Barleyman
04-01-06, 03:41 PM
Replay problems hits only those who use them, which I suspect isn't quite everybody (I've been lax with them myself, but that may be partially because of the problems..)


Yup. Because they're such a gigantic PITA, they get used a lot less than they should be. They'd be perfect for after-successful-mission gloating session or in the aftermath of 60 seconds of stark terror before death..

For the masts.. It's kinda like the sub accelerating too much. Some people felt it's the end of the world, but it really didn't affect the tactics you'd generally employ very much.

Should the masts be picked up by radar? Absolutely! Should they be difficult to pick up and only at shortish detection ranges? Absolutely!

So.. You shouldn't be able to monitor contacts on ESM/Visual with impunity, but with realistic detection ranges etc it shouldn't really change much.

Of course if you SEE helo on scope, you're probably screwed emitter distance inverse square -wise.