Page 1 of 1

replay last 20 seconds

Posted: Mon Mar 29, 2010 10:01 pm
by xpoy
I aware this is a interesting and useful thing
Just replay the last every commander's dead 20 seconds as that commader' camera view.

Re: replay last 20 seconds

Posted: Mon Mar 29, 2010 10:24 pm
by zuzuf
That's quite difficult to do because you have to record the game state continuously which can be quite memory consuming and you'll get plenty of network synchronization errors.

Re: replay last 20 seconds

Posted: Mon Mar 29, 2010 10:47 pm
by xpoy
I know, but a recorder is must tho /:^}....
Maybe we could save the pos of units as this for per seconds.

Code: Select all

typedef struct tagstu_UnitState_Save
{
    int i_Armor;
    int i_CurrentAction;

    union
    {    
            int i_XPosOffset;
            struct 
            {
                  short int is_XPosOffsetDelay;
                  short int is_YPosOffsetDelay;
            };
    };
} stu_UnitState_Save;
typedef struct tagstu_First_UnitState_Save
{
    UnitState stu_UnitState;
    int i_YPosOffset;
};
Like a 0x1000 size array, able to save (0x1000- 0x10)/ = 0x154, total 0x155 units state.
It work as a array that include very similar data, which eazly to compress to small size. But maybe save player's order is better way, and save once units states per 5 or 10 seconds for sync.

Re: replay last 20 seconds

Posted: Tue Mar 30, 2010 5:44 am
by zuzuf
It would not work as the engine contains lots of informations that cannot be dumped that way like unit scripts states (saved games don't save it, the engine just restart all scripts that were started but it implies a small change in unit's animation for a few seconds).

I was thinking to record network sync data which could be replayed by connecting to a fake server which would send sync orders and by preventing user from giving orders to its units.

Re: replay last 20 seconds

Posted: Thu Apr 01, 2010 2:14 am
by xpoy
yours better /:^}!!!
It can be plugin, I mean a plugin for the recorder, which maybe also support TAdemo....

Re: replay last 20 seconds

Posted: Thu Apr 01, 2010 11:28 am
by zuzuf
Unfortunately, TA3D's network protocol is very likely to be different from OTA's one and it's probably not compatible at all as well as other internal stuffs (OTA is based on integers, TA3D uses floats, time steps are different, etc ...) which reduces the possibility of an common interface somewhere.

Re: replay last 20 seconds

Posted: Thu Apr 01, 2010 3:25 pm
by Balthazar
xpoy wrote:yours better /:^}!!!
It can be plugin, I mean a plugin for the recorder, which maybe also support TAdemo....
It`s impossible.

Re: replay last 20 seconds

Posted: Fri Apr 02, 2010 4:54 am
by xpoy
What I think is this:
replay like 2 AI playing same as the demo's record
so the proctal can be pack to a intereface...
maybe.. but maybe spac for the ota-releated

Re: replay last 20 seconds

Posted: Fri Apr 02, 2010 7:01 am
by DOT
Maybe it starts recording by checking how much health he has left and how much dps he takes
and that it checks if he has atleast somewhere enough turrets/units to prevent its commander to die if not
it makes record of it is that maybe possible?

Re: replay last 20 seconds

Posted: Fri Apr 02, 2010 8:20 am
by zuzuf
Analyzing the game this way is far too complex, the overhead would be noticeable and it would not even solve the problem because of the difficulty of recording the game in order to replay it while the engine is still running (there is only one copy of the game data in RAM, so there would be a conflict in multiplayer).

Re: replay last 20 seconds

Posted: Sun Apr 04, 2010 11:01 am
by xpoy
well.
I think AI also need much intereface upgrude, which also can use in this.
What AI is not just the enemy AI, it also like a drama AI, a game AI, etc.