NitroVicky Posted June 3, 2023 Report Share Posted June 3, 2023 These features would make watching replays and speed-up AI matches much more convenient: A slider to instantly jump to any point in the replay, much like watching a video in a video player. Faster speed-ups, x32, x40, x50. This is especially useful for watching 2 AIs fight against each other. Are these feasible features to make? 3 Quote Link to comment Share on other sites More sharing options...
seeh Posted June 4, 2023 Report Share Posted June 4, 2023 (edited) 9 hours ago, NitroVicky said: x32, x40, x50 this is pretty easy to implement, but needs change the cpp source for me, and possible to 128x . the max speed is (theoretical) also possible to play. https://wildfiregames.com/forum/topic/97267-play-replay-fast-as-possible/ example https://www.youtube.com/watch?v=-GDMqClaZiE&t=416s Edited June 4, 2023 by seeh 1 Quote Link to comment Share on other sites More sharing options...
Mentula Posted June 4, 2023 Report Share Posted June 4, 2023 13 hours ago, NitroVicky said: Faster speed-ups, x32, x40, x50. This is especially useful for watching 2 AIs fight against each other. As a simple workaround, you can open the console and run: g_GameSettings.gameSpeed.setSpeed(speed) where "speed" is replaced by a number (for example, speed=10, to play at 10x). 13 hours ago, NitroVicky said: A slider to instantly jump to any point in the replay, much like watching a video in a video player. This is much harder to achieve. The major problem here is not much going forward, but backward. The issue of navigating replays has been brought up multiple times on the forum, but I'm afraid it requires some changes to the engine that may take some time to be developed. I hope this will become a feature soon, it's very useful. 1 Quote Link to comment Share on other sites More sharing options...
NitroVicky Posted June 4, 2023 Author Report Share Posted June 4, 2023 45 minutes ago, Mentula said: This is much harder to achieve. The major problem here is not much going forward, but backward. The issue of navigating replays has been brought up multiple times on the forum, but I'm afraid it requires some changes to the engine that may take some time to be developed. I have a naive workaround idea for this, not sure if it would work: My interpretation of how a replay works: The replay file seems to be a list of turns and the commands received from each player in each turn. As you watch the replay progress, the game computes what would happen due to these inputs, by referring to the mechanisms (Javascripts) and data (XML templates) stored in binaries/data/mods/public/simulation. By progressing through the file, the engine reconstructs the match. Scrolling back would be difficult because we need to reverse the reconstruction. The engine is designed to move forward in time, not backward. The workarounds: When we want to scroll backwards, invert all scripts and multiply all data value by -1 to reach its opposite. This would cause the evolution of the match to go backwards. Generate a temporary file storing the exact state of all entities at each turn while the replay is going forward. When we scroll backwards, we just specify which turn we want to go back to and the engine can generate the scene at that turn using the already computed data. Obviously this file would be huge, so it should be deleted automatically as soon as the user exits the game. 1 Quote Link to comment Share on other sites More sharing options...
seeh Posted June 4, 2023 Report Share Posted June 4, 2023 @Mentula g_GameSettings.gameSpeed.setSpeed(128); in console gives me this error: ERROR: JavaScript error: (eval) line 1 g_GameSettings is not defined @(eval):1:1 Quote Link to comment Share on other sites More sharing options...
Mentula Posted June 4, 2023 Report Share Posted June 4, 2023 In-game you can use Engine.SetSimRate(speed) where speed is the speed multiplier. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.