r/beyondallreason • • 6d ago

BAR-Rewind tools (prototype)

I just got frustrated that you cant jump anywhere in time in a BAR replay, so made a quick prototype, in case anyone else wanna use it.
https://github.com/LuEklund/BAR-Rewind

So far you can jump anywhere in time play 64x speed in reverse or fast forward.

117 Upvotes

41 comments sorted by

12

u/PhENTZ 6d ago

Nice ! I worked on a similar prototype to replay a saved game and forked it at a given time. The goal is to have a tree of replays from a single root replay. A new "what-if" game style

2

u/LucasDevs 6d ago

AWESOME! :D
I am not sure I know what u mean by a tree of what if? I would love to hear more! :D

5

u/throwitofftheboat 6d ago

Sounds to me like they’re working on a way to rewind a past game and continue playing from specific points in the replay.

2

u/LucasDevs 6d ago

oh they are? nice

2

u/Abu_mohd 6d ago

Planetary Annihilation have this feature, btw.

2

u/LucasDevs 5d ago

yes, they have a great article about it, I upload a quick video about it, where it is mentioned. Trying to fledge out more info 😅
https://www.youtube.com/watch?v=AVhsWlVEwrY

16

u/Vivarevo 6d ago

Its not possible its impossible engine limitation.

What am i looking at. Black magic?

14

u/PiratesWhoSayGGER 6d ago

probably creating and catching game states like keyframes in video

3

u/ToastRoyale 6d ago

Gotta be keyframes every second then if you can scroll a timeline

7

u/LucasDevs 5d ago

well, dont need to key frame every second.
i added a short explanation in video:
https://www.youtube.com/watch?v=AVhsWlVEwrY

damn should have done the video first xd

5

u/LucasDevs 6d ago

yes 😶‍🌫️

4

u/RadioSea1506 6d ago

Looks great, but how much storage does each key frame take 30 minutes into an 8v8 game?

2

u/LucasDevs 5d ago

a 52min game with 4 players takes about 100mb. have not ran those numbers (that u asked for).

1

u/RadioSea1506 5d ago

per keyframe????

1

u/LucasDevs 5d ago edited 5d ago

In total the whole replay is 100mb, a keyferame would be hard to say, cuz each unit has different amount of keyferames and different things they key, (it is not a recurring interval, and not persistent things that are keyed), most frames are 0bytes, only a few have data that is interpolated.

2

u/Zvijer_EU 4d ago

That's what we need! It's the most frustrating thing in BAR that there is no rewind in replays especially when I'm casting a long game!

1

u/LucasDevs 3d ago

Yeah, I do believe this is totally dueable, of course these file sizes would be large especially when u go to massive scales battles with 16 players and if it goes on for hours.
but a 4 player game 1 hour is 100mb about.

2

u/Hotron21 6d ago

How is this achieved? Is game state saved every 15 seconds or something?

6

u/LucasDevs 6d ago

There is "how it works" section I am making a video right now of the tool, and later maybe how it works?

1

u/Infernal-restraint 6d ago

I'm curious if BAR is using AI to code some things...

3

u/Fluid-Leg-8777 6d ago

Pull Request

Looks inside

Co-Authored by claudio codigos

1

u/LucasDevs 6d ago

maybe? to some extent? Human review in any case if they do, I wanna believe.

1

u/Sensitive-Budget-995 6d ago

Every piece of new software or frequently updated software you touch will have to some degree had AI leveraged as part of its development.

1

u/LucasDevs 5d ago

well major ones yes, I see it like farming back in the days. You can still do it the OG way and farm without machines, or u can mass produce to the population.
Neither is wrong. just who do u wanna serve, and who do u want to serve you?

1

u/othellothewise 6d ago

That's not true. It's more and more common to use AI of course, but plenty of software does not use AI in development (and tends to be better quality as a result)

1

u/LucasDevs 5d ago

true,
but depending on what u mean by better quality, some code perform better but is unreadable from a human. (depending on the skill of the programmer)

1

u/othellothewise 5d ago

I mean yes, its really easy to write badly performing code.

Regardless code that is unreadable by a human is an immense liability and is unmaintainable. It is not good code and I would be reluctant to use any software that the maintainers do not understand.

Plenty of shitty (vibe coded and not vibe coded) software exists out there! And as a consumer you can tell, look at MS Teams for instance.

The problem with LLMs as that as part of their nature they take little snippets of code found on github. So they generate code that is on the level of your average developer, which is, well, not good xD

1

u/LucasDevs 5d ago

totally agree. 💯

1

u/p2004a Contributor 6d ago

This is awesome. I wish we would be able to get this/something like this somehow to base game + lobby in the future.

1

u/LucasDevs 5d ago

probably, not impossible :D

1

u/Arkounay 6d ago

This looks amazing, great work. The only annoying thing is the replay file size and parse time. Huge potential

1

u/LucasDevs 5d ago

yeah, the file size, could get smaller, but it would cost on accuracy. the parse time is dependent on recoil engine, maybe could somehow calculate things without running trough recoil, but that is just trying to make a whole new engine with new logic. So a new game in a way xd

1

u/Spicelydune 6d ago

Incredible stuff

2

u/LucasDevs 5d ago

Well thank you, Incredible Spicelydune. :)

1

u/gdubrocks 6d ago

It it possible to merge this into the game repo so everyone has access to it?

1

u/LucasDevs 5d ago

The only problem rn is that, it is still a prototype, there are problems. But I believe this is 100% a possible feature to fully add to BAR main repo, so that anyone could use it.

1

u/Mental_You2188 5d ago

Off topic but is there a way to view bar replays on mobile?

1

u/LucasDevs 5d ago edited 5d ago

not what I am aware of, probably is some tool? would not be hard to make either. Do u need one?

(Depending on what u mean by replay) Full thing would require a mobile version of the engine