FluffyMaguro / AoE4_Overlay

GNU General Public License v3.0
138 stars 22 forks source link

Feature Request: Somehow make it step with a timer #34

Open jmstefans opened 8 months ago

jmstefans commented 8 months ago

Would be nice to not have to hit a key to move to the next step. Is it possible to automatically move to the next step based on a timer? Thank you cool overlay

CraftySalamander commented 8 months ago

Hi. I am the developer of the BO part. More exactly, I developed another overlay only for build orders (RTS Overlay, at the moment for AoE2, AoE4 and SC2) and ported the BO code in the overlay from @FluffyMaguro.

A few weeks ago, I started experimenting with timer based builds in RTS Overlay, but only targeting SC2 (and potential future RTS) at the moment. This is still in development on this branch. I am not sure it would be so valuable for the 'age of' franchise due to the randomness of the map generation and the complexity of the BOs (several lines are often needed to describe what to do, in contrast to SC2 simplified macro). On top of that, this requires to have time indications for all steps, and very few AoE4 BOs meet this requirement.

jensbuehl commented 7 months ago

I share your concerns regarding AoE4 builds. But it's a chicken/egg problem. But maybe the timer-based BO progression needs to be there as incentive to carefully craft the timestamps. (I might add the same in the focus-mode on aoe4guides in future, AI based voice generation would be the cherry on the topπŸ˜‰)

It all depends on the use case. If you are targeting the overlay tool for learning, then you might add time stamps from the get-go. Others might just not need the info so it's not worth spending more time crafting the BO.

Eventually, I would hope for more game data to automatically extract the BO with all time stamps. Dream big... πŸ˜„


Von: CraftySalamander @.> Gesendet: Dienstag, 30. Januar 2024 09:48 An: FluffyMaguro/AoE4_Overlay @.> Cc: Subscribed @.***> Betreff: Re: [FluffyMaguro/AoE4_Overlay] Feature Request: Somehow make it step with a timer (Issue #34)

Hi. I am the developer of the BO part. More exactly, I developed another overlay only for build orders (RTS Overlayhttps://github.com/CraftySalamander/RTS_Overlay, at the moment for AoE2, AoE4 and SC2) and ported the BO code in the overlay from @FluffyMagurohttps://github.com/FluffyMaguro.

A few weeks ago, I started experimenting with timer based builds in RTS Overlay, but only targeting SC2 (and potential future RTS) at the moment. This is still in development on this branchhttps://github.com/CraftySalamander/RTS_Overlay/tree/sc2_timer. I am not sure it would be so valuable for the 'age of' franchise due to the randomness of the map generation and the complexity of the BOs (several lines are often needed to describe what to do, in contrast to SC2 simplified macro). On top of that, this requires to have time indications for all steps, and very few AoE4 BOs meet this requirement.

β€” Reply to this email directly, view it on GitHubhttps://github.com/FluffyMaguro/AoE4_Overlay/issues/34#issuecomment-1916345165, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA6MUKLQBWJGEX4SYMNSTZDYRCXXXAVCNFSM6AAAAABCQZNUUWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJWGM2DKMJWGU. You are receiving this because you are subscribed to this thread.Message ID: @.***>

CraftySalamander commented 7 months ago

In fact, at the end, I still got tempted and started to also try this feature implementation for AoE2/AoE4.

My idea to solve this is to provide in the overlay a function capable of estimating (i.e. no 100% guarantee) the timings of each step. I already did it for AoE2, you can see the basic idea here.

I prepared the template for the same feature for AoE4 (here) but still needs to implement it.

@jensbuehl I will tell you when it is ready in case you want to adapt it for https://aoe4guides.com πŸ˜‰

CraftySalamander commented 7 months ago

@jensbuehl I prepared the first timing evaluation for AoE4 here.

However, I still need to finish the timing overlay feature to use it and check if it works on a few BOs.

CraftySalamander commented 6 months ago

@jmstefans See the demo for the timer feature in this video :-)

CraftySalamander commented 6 months ago

@jensbuehl the timing evaluation code is ready here (could potentially be improved with more cases, but it is a good start.

Up to you to see if you want to also add the feature to https://aoe4guides.com

jensbuehl commented 6 months ago

Thank you! Will take a look when time permits.

jensbuehl commented 6 months ago

@CraftySalamander Looks impressive, yet complex. I had a simplified algorithm in mind as a starting point which just interpolates between given timestamps. The result might still be "exact enough".

In a first draft I do not think that I will take villager production times or bonuses into account, since we have really inconsistent data and not everyone is even using icons, but e.g. text in different languages. I do not want to parse and maintain that. Also, construction times would have to be considered. Depending on how many villagers are building. We do not even have that information and would have to guess yet again. So, I am not sure if your (too exact :) ) algorithm is really adding that much value due to the mostly bad data we have as input and the wild guesses we have to make.

In other words: the build orders are not "model based" and therefore error prone and hard to process properly. I would hope for aoe4world game data at some point to provide good guesses and timestamps. Until then, I might rather "interpolate" with something as simple as follow over re-implementing the game logic. Having an exact algorithm based on bad data still leads to bad data. :)

E.g. Step 1 at 0:00 Step 2 no timestamp (villager difference to previous step is 2) Step 3 no timestamp (villager difference to previous step is 3) Step 4 at 4:00 (villager difference to previous step is 1)

turns into (spaced evenly) Step 1 at 0:00 (80 sec) Step 2 at 1:20 (80 sec) Step 3 at 2:40 (80 sec) Step 4 at 4:00

or (including villager weight) Step 1 at 0:00 (240 sec 2/6 = 80 sec) Step 2 at 1:20 (240 sec 3/6 = 120 sec) Step 3 at 3:20 (240 sec * 1/6 = 40 sec) Step 4 at 4:00

Much easier to grasp with not that much "magic" happening. Maybe even rounding to 5s would be acceptable.

Of course, this approach is based on the assumption that at least the age up time is given or at least some steps have time stamps. If we do not have any timestamps at all, then we would have to fallback to something like you did: Make estimations based on villager counts.

CraftySalamander commented 6 months ago

@jensbuehl Up to you to see what you want to add on https://aoe4guides.com ;-)

On RTS_Overlay, I initially designed it for AoE2, where it seems to work perfectly (correct to the second on 15 BOs I tested).

For AoE4, it was working well on the 3 BOs I tested (French, Jeanne & OOTD), but I tested it less extensively. But, it requires (at least) to have the correct number of villagers indicated.

AoE4 is a bit less constrained than AoE2 of course. Building information time is not important (normally) in AoE4 since villager production time should not be impacted (in contrast to AoE2).

But the call is yours :-)