Jump to content

Replay Does not work


Frederick_1
 Share

Recommended Posts

Hallo,

usually when I load a replay one of my games in Singleplayer against A.I.-Bot my entities does not move in the Replay, while Bot Entities do work.

Only when the game is really fresh, when it was not saved and not interrupted from the begining the Replay does work. I can not see any influence of the Regenerate Cache button.

Game versionis 0.25, but it was the same in 0.25. My system ist ubuntu 20.

Is this normal behavoiur? Or is there something wrong with my installation?

F.

PS: Interestingly it seem in multiplayer mode it seems human players Entities do work, while A.I-Bot entities are freezed.

 

 

Link to comment
Share on other sites

4 minutes ago, Frederick_1 said:

This explains what I experience. So do people not save their games, when they present an replay here? I often split a game in lot of small sections just using 0AD als stopgap.

 

Indeed they do not split their replays.

Link to comment
Share on other sites

For trying out I made a small match with only one save in the middle. It is true, the replay of the first section works on its own, but not the whole game. so I tried:

f@Nanox:~/.local/share/0ad/replays/0.0.25/2022-merge$ cat ../2022-07-30_0015/metadata.json ../2022-07-30_0017/metadata.json > metadata.json

f@Nanox:~/.local/share/0ad/replays/0.0.25/2022-merge$ cat ../2022-07-30_0015/commands.txt ../2022-07-30_0017/commands.txt > commands.txt

When I try to start the replay 0AD crashes. Seems the merge of metadata.json does not work correcty. See error output.

 

 

 

 

Error_Message.png

Link to comment
Share on other sites

On 27/07/2022 at 7:21 AM, Freagarach said:

Maybe there already is some script to combine replays, else I can write one.

I've been told it's possible to merge them manually ("hm hm lines..."), but no one was willing or able to answer my follow-up questions. I didn't see a script, so please see if you can come up with something. Naive me would expect something more automatic/user friendly... But what do I know.

Link to comment
Share on other sites

23 minutes ago, Stan` said:

You cannot merge json using cat. It's not a plain text file.

I do not see such a limitation in cat command, or a cat alternative for binary files. Wikipedia states:

cat can be used to pipe a file to a program that expects plain text or binary data on its input stream.
cat does not destroy non-text bytes when concatenating and outputting. 
As such, its two main use cases are text files and certain format-compatible types of binary files. 

https://en.wikipedia.org/wiki/Cat_(Unix)#Use_cases

 

Link to comment
Share on other sites

I thought/think you could just ignore the JSON? Just get the start settings from the first replay and up the turn number of any subsequent replay with the total number of turns so far.

If I would have half an hour spare time, I would certainly make it (in Python) for you. If I had a day spare time, I would have made a patch.

[EDIT]: I didn't read properly, the metadata is a lot trickier indeed. But the above works for the commands.txt.

Edited by Freagarach
Take time to read or be quiet.
Link to comment
Share on other sites

While discussion is on replys. Are we working on multiplyer replays fixes?

Problems:

  1. No replay is saved if you join the game in-between.
  2. Even if you join the game and drop in between, and then rejoin, you reply will only exist till your first drop point.

Solution 1:

  • Have a unique Id for each game hosted. 
  • Start saving replys whenever you join any game any time.
  • Merge replays based on unique id.

>Example use case: If user join a game at the starting and left at min 7, he rejoins the game at min 10, and continued forward untill game closed at min 18.

>Expected result: After dropping at min 7 if he checks his replay, he will see till min 7 reply. After rejoining at min 10 and dropping off at min 18, if he checks his reply he will see, reply of first 7 min + 10-18 min reply appened to his first 7 min reply. The reply file will be same for him but updated with new content.

Solution 2:

Any player/observer joining the game will have reply synced up with host. So, no matter when you join your reply will be same as host.

>Example use case: If user join a game at the min 5 and left at min 7, he rejoins the game at min 10, and continued forward untill game closed at min 18.

>Expected result: If you join at min 5 and drop at min 7, you will have reply of first 7 min, copied from host. If you again rejoin at min 10, and drop at 18, you will have your updated reply (based on unique game/host id) till min 18. This way consistancy remains but data consumption might increases. Maybe we can keep it up to host to enable to disable replays.

If not already picked, then I think we should introduce this feature.

Edited by Darkcity
Link to comment
Share on other sites

5 hours ago, Darkcity said:

While discussion is on replys. Are we working on multiplyer replays fixes?

Problems:

  1. No replay is saved if you join the game in-between.
  2. Even if you join the game and drop in between, and then rejoin, you reply will only exist till your first drop point.

Solution 1:

  • Have a unique Id for each game hosted. 
  • Start saving replys whenever you join any game any time.
  • Merge replays based on unique id.

>Example use case: If user join a game at the starting and left at min 7, he rejoins the game at min 10, and continued forward untill game closed at min 18.

>Expected result: After dropping at min 7 if he checks his replay, he will see till min 7 reply. After rejoining at min 10 and dropping off at min 18, if he checks his reply he will see, reply of first 7 min + 10-18 min reply appened to his first 7 min reply. The reply file will be same for him but updated with new content.

Solution 2:

Any player/observer joining the game will have reply synced up with host. So, no matter when you join your reply will be same as host.

>Example use case: If user join a game at the min 5 and left at min 7, he rejoins the game at min 10, and continued forward untill game closed at min 18.

>Expected result: If you join at min 5 and drop at min 7, you will have reply of first 7 min, copied from host. If you again rejoin at min 10, and drop at 18, you will have your updated reply (based on unique game/host id) till min 18. This way consistancy remains but data consumption might increases. Maybe we can keep it up to host to enable to disable replays.

If not already picked, then I think we should introduce this feature.

@Stan` Do we have ticket for this already or it was never discussed before? 

Link to comment
Share on other sites

We just send the serialized game state. It would be less bandwidth to send the commands instead, but it would require too much record keeping from both host and client to keep track of what to send and request. And I don't think we even store commands in memory. It's just logged out IIRC.

2 hours ago, Darkcity said:

Merge replays based on unique id.

Where does the missing commands in between minutes 7 and 10 come from? Or is it a time travel type deal where we just skip the 3 minutes? This requires storing the serialized saved game state which should be loaded in between replays and likely not implementable without starting from scratch.

Solution 2 would work and should not consume that much extract bandwidth, (the commands would have been transmitted anyway had they not disconnected). But it seems to be a bit clunky at first glance. I am not thinking of any alternative though.

Link to comment
Share on other sites

2 hours ago, smiley said:

Or is it a time travel type deal where we just skip the 3 minutes?

This. You will have reply of what you observed under solution 1. This will atleast solve the reply problem for players that are playing and may not for observers.

We can further improve solution 2 by doing following. Let me know the feasibility and viability of the solution.

  1. Priotize sync-up with observer of the game instead of syncing up with host.
    • Check if any observer (not host) has replay, means he is there since beginning.
    • If yes, then we sync-up with that observer.
    • If no, check if host has enabled the sync up to observer
    • If enabled, then sync with host
    • If not enabled, then you will be sync-up to nothing.
  2. Sync with player with high bandwidth.
    • Check the players in the game and their bandwidth.
    • Sync-up with the player that if you sync with will not lag
    • Find that player and sync with him
    • If your sync might introduce lag then don't sync.

Solution 3- Replay sharing at the end of the game.

At the end of the game, any observer or player can request for full reply by clicking on request reply. This will sync-up the host reply with player/observer reply. By doing this we neither interuting the game, nor casuing any other kind of issue (hopefully), since its post game action.

Solution 4- reply sharing in lobby

You can share any reply to any player logged in lobby. This can be introduced as part of command line or commands on chat window or any CTA in lobby itself. Exact solutioning we can discuss if this is a good solution.

I have few other solutions in mind but I think these are more than enough..

Link to comment
Share on other sites

On 02/08/2022 at 7:21 AM, Freagarach said:

I thought/think you could just ignore the JSON? Just get the start settings from the first replay and up the turn number of any subsequent replay with the total number of turns so far.

I tried this once again, before writing an answer. It just crashed.

Link to comment
Share on other sites

I copy-pasted  the metadata.json form the first sectionof the game into the replay folder of the second part with the merged commands.txt.

It just crahed, when loading the replay.

Altough, now after this, I realize 0AD crashes anytimy I want to start it again. But I swear I was playing a game just until I tried this. Maybe the universe decided it is not good for me to play 0AD any more.

 

Assertion failed: "!m_Worker"
Location: UserReport.cpp:516 (~CUserReporter)

Call stack:

(0x5575cd3dfe55) /usr/games/pyrogenesis(+0x5f4e55) [0x5575cd3dfe55]
(0x5575cd37fc19) /usr/games/pyrogenesis(+0x594c19) [0x5575cd37fc19]
(0x5575cd381291) /usr/games/pyrogenesis(+0x596291) [0x5575cd381291]
(0x5575cd381b1b) /usr/games/pyrogenesis(+0x596b1b) [0x5575cd381b1b]
(0x5575cd10c097) /usr/games/pyrogenesis(+0x321097) [0x5575cd10c097]
(0x7f4b839918a7) /lib/x86_64-linux-gnu/libc.so.6(+0x468a7) [0x7f4b839918a7]
(0x7f4b83991a60) /lib/x86_64-linux-gnu/libc.so.6(on_exit+0) [0x7f4b83991a60]
(0x7f4b841a417b) /lib/x86_64-linux-gnu/libX11.so.6(+0x4117b) [0x7f4b841a417b]
(0x7f4b841a428b) /lib/x86_64-linux-gnu/libX11.so.6(_XError+0xfb) [0x7f4b841a428b]
(0x7f4b841a0ff7) /lib/x86_64-linux-gnu/libX11.so.6(+0x3dff7) [0x7f4b841a0ff7]
(0x7f4b841a1095) /lib/x86_64-linux-gnu/libX11.so.6(+0x3e095) [0x7f4b841a1095]
(0x7f4b841a201d) /lib/x86_64-linux-gnu/libX11.so.6(_XReply+0x23d) [0x7f4b841a201d]
(0x7f4b8419d7f1) /lib/x86_64-linux-gnu/libX11.so.6(XSync+0x51) [0x7f4b8419d7f1]
(0x7f4b325470ed) /lib/x86_64-linux-gnu/libGLX_nvidia.so.0(+0x880ed) [0x7f4b325470ed]
(0x7f4b32534915) /lib/x86_64-linux-gnu/libGLX_nvidia.so.0(glXCreateContext+0x45) [0x7f4b32534915]
(0x7f4b83861c97) /lib/x86_64-linux-gnu/libGLX.so.0(glXCreateContext+0x37) [0x7f4b83861c97]

errno = 9 (?)
OS error = ?

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...