getting filename of replay (to restart replay)
Moderator: Moderators
getting filename of replay (to restart replay)
Is it possible to get the filename of the replay that is currently playing?
If yes it might be possible to make crude rewinding for replays.
Restart spring with commandline_args = replayfilename
Spring.Restart ( string commandline_args, string startscript )
and then /skip to wanted time.
The time could be passed via written it to textfile or maybe via startscript(?)
If yes it might be possible to make crude rewinding for replays.
Restart spring with commandline_args = replayfilename
Spring.Restart ( string commandline_args, string startscript )
and then /skip to wanted time.
The time could be passed via written it to textfile or maybe via startscript(?)
Re: getting filename of replay (to restart replay)
Code: Select all
#!/bin/sh
CMD1="./spring_mt --benchmark 10 --benchmarkstart 15"
CMD2="./spring --benchmark 10 --benchmarkstart 15"
SCRIPT="script_benchmark2.txt"
...
$CMD "$SCRIPT" &
CPID=$!
sleep 10s
DEMOFILE=`lsof -p $CPID -Fn | grep demos | cut -c2-`
...
Re: getting filename of replay (to restart replay)
from this strange console text that i dont understand i see there are new parameters to start playback at time X?
https://github.com/spring/spring/commit ... 368e5c82b8
But that does not help with restarting spring with the replay or does it?
https://github.com/spring/spring/commit ... 368e5c82b8
But that does not help with restarting spring with the replay or does it?
Re: getting filename of replay (to restart replay)
No, there is a benchmark mode and benchmarkstart defines the time when to start writing the datafile. So you want to skip the beginning very often, `fast-word` it with speed 15 and then benchmark minutes 15-20 with gamespeed 1.
Re: getting filename of replay (to restart replay)
hm ok, but i think that is not what i want.
There is this widget:

http://zero-k.info/Forum/Thread/3257
and I wanted to add a some buttons like "rewind replay", "go back 1 minute", etc
There is this widget:

http://zero-k.info/Forum/Thread/3257
and I wanted to add a some buttons like "rewind replay", "go back 1 minute", etc
- PepeAmpere
- Posts: 591
- Joined: 03 Jun 2010, 01:28
Re: getting filename of replay (to restart replay)
With Nota::lobby TV player you dont need rewindknorke wrote:hm ok, but i think that is not what i want.
There is this widget:
http://zero-k.info/Forum/Thread/3257
and I wanted to add a some buttons like "rewind replay", "go back 1 minute", etc

Now really, do you really think restarting the simulation only because you want to give player possibility to go back a bit in time is the cool way?
Last edited by PepeAmpere on 16 Nov 2012, 03:14, edited 1 time in total.
Re: getting filename of replay (to restart replay)
A lobby based solution is not the solution for everyone's needs.
*reworded for clarity*
*reworded for clarity*
- PepeAmpere
- Posts: 591
- Joined: 03 Jun 2010, 01:28
Re: getting filename of replay (to restart replay)
No arguing about that. But if I understood how engine and replays works, do "rewind back" with current replayfiles and engine, especially by this way, seems to a bit unsmo(o)th solutionsmoth wrote:Not everyone wants a lobby based solution.

Re: getting filename of replay (to restart replay)
to have to leave the game at all is bad IMO.
it may not be currently possible to rewind a replay. However, that doesn't mean knorke shouldn't try. Maybe an engine patch will be the result of his efforts. You never know. It is bad to stop alternative approaches because you have a specific one. Not all replays you want to rewind to watch dot wars. Sometimes it is super helpful in tracking hard to trigger bugs.
it may not be currently possible to rewind a replay. However, that doesn't mean knorke shouldn't try. Maybe an engine patch will be the result of his efforts. You never know. It is bad to stop alternative approaches because you have a specific one. Not all replays you want to rewind to watch dot wars. Sometimes it is super helpful in tracking hard to trigger bugs.
- PepeAmpere
- Posts: 591
- Joined: 03 Jun 2010, 01:28
Re: getting filename of replay (to restart replay)
I agree with you in all points. My suggestion was small trolling of course. I think making different type of replays (bigger, not so compact, but saving moves of things instead of orders... or saving some important values of simulation - for example - making every 2-5 minutes some point where all needed is saved and simulation can start from that point) can be solution - but it will need change in engine, too. I think only lua-widget way cannot do much to get result knorke described.smoth wrote:to have to leave the game at all is bad IMO.
it may not be currently possible to rewind a replay. However, that doesn't mean knorke shouldn't try. Maybe an engine patch will be the result of his efforts. You never know. It is bad to stop alternative approaches because you have a specific one. Not all replays you want to rewind to watch dot wars. Sometimes it is super helpful in tracking hard to trigger bugs.
Re: getting filename of replay (to restart replay)
Dunno, maybe he will find a way, knorke is damn smart.
You also have to consider the reverse of my statement. I am also saying, nota's replaytv feature is also valid. Just because I won't use it a lot in my game projects, doesn't indicate that I dislike the feature of nota lobby.
both should exist and be developed.
You also have to consider the reverse of my statement. I am also saying, nota's replaytv feature is also valid. Just because I won't use it a lot in my game projects, doesn't indicate that I dislike the feature of nota lobby.
both should exist and be developed.
Re: getting filename of replay (to restart replay)
Yes, the main annoyance is ofc waiting for the fastforward to finish, and that will still be there.
But if you are watching the same replay multiple times eg to record movie, you get used to switchting to other stuff while it forwards.
But clicking around to close spring, start replay, type /skip... etc does get on the nerves. Can at least remove that part.
PepeAmpere, what you suggest is basically saving & loading, which is "impossible." (there were some threads)
But if you are watching the same replay multiple times eg to record movie, you get used to switchting to other stuff while it forwards.
But clicking around to close spring, start replay, type /skip... etc does get on the nerves. Can at least remove that part.
PepeAmpere, what you suggest is basically saving & loading, which is "impossible." (there were some threads)