Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Max Acceleration Yaw Offset #101

Merged
merged 3 commits into from
Jul 28, 2024
Merged

Conversation

khanghugo
Copy link
Contributor

Needs hltas update.

There are some things about this. First, I want that when a frame bulk of this type is split, it shouldn't reset the acceleration values. That is why the weird gymnastics is here.

Second, I want it a bit easier to use so there's text popping up like #100 . I think it is pretty okay. I don't think the console command for this would be that necessary.

No third point but I don't want to pass "accurate" data, specifically the current accumulated yawspeed, from BXT to bxt-rs because I think bxt-strafe won't ever mess it up.

I play around with it for a bit and it is very confusing to use. Might get some time getting used to because you have two parameters. I put some thoughts into the interactions and I think it works great for me. Not sure about others.

@khanghugo khanghugo marked this pull request as draft April 2, 2024 01:02
@khanghugo khanghugo marked this pull request as ready for review April 2, 2024 05:33
@khanghugo
Copy link
Contributor Author

khanghugo commented Apr 2, 2024

I think this state should be good.

If there's anything I would like to add that would be knowing the yaw speed of previous frame so the current s4x or s5x can continue on that number. Maybe add it now. Maybe add it later. I guess we'd never know.

Edit: Need YaLTeR/BunnymodXT#521

@khanghugo khanghugo changed the title Add accelerated yawspeed Add Max Acceleration Yaw Offset Apr 3, 2024
Copy link
Owner

@YaLTeR YaLTeR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn, that's a lot of delicate work to make editing for this

src/modules/tas_studio/editor/operation.rs Outdated Show resolved Hide resolved
src/modules/tas_studio/editor/operation.rs Outdated Show resolved Hide resolved
src/modules/tas_studio/editor/utils.rs Outdated Show resolved Hide resolved
src/modules/tas_studio/mod.rs Outdated Show resolved Hide resolved
src/modules/tas_studio/mod.rs Outdated Show resolved Hide resolved
@@ -1870,6 +1887,13 @@ fn add_frame_bulk_hud_lines(text: &mut Vec<u8>, bulk: &FrameBulk) {
StrafeType::ConstYawspeed(yawspeed) => {
write!(text, "turn rate: {yawspeed:.0}").unwrap();
}
StrafeType::MaxAccelYawOffset(start, target, accel) => {
// The values are so tiny that only this would make it sensible.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is better than just showing them with 2 digits? It could be confusing I guess

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is a sample part where I use it.

s51-------|------|------|0.010000001|- -5.4011025 -5.4011025 0|-|43
s51-------|------|------|0.010000001|- -5.635861 -5.635861 0|-|268
s50-j-----|------|------|0.010000001|- -0.70690674 -0.70690674 0|-|134
s50-j-----|------|------|0.010000001|- -2.2149327 -2.597555 0|-|19
s51-j-----|------|------|0.010000001|- -0.59532917 -0.59532917 0|-|169
s50-j-----|------|------|0.010000001|- -10.585796 -1.0256441 0.12860943|-|982
s01-j-----|------|------|0.010000001|-|-|221
s50-j-----|------|------|0.010000001|- -9.952005 -0.9520051 0.1|-|941
s50-j-----|------|------|0.010000001|- -0.13668747 -0.13668747 0|-|199
s51-j-----|------|------|0.010000001|- 0.32988316 -0.29589385 0|-|295
s51-j-----|------|------|0.010000001|- 2.9388967 4.460467 0|-|7
s51-j-----|------|------|0.010000001|- 2.9388967 4.460467 0|-|72

I think 2 digits (times 10) might not be descriptive enough. And also we have space for 3.

src/modules/tas_studio/editor/mod.rs Outdated Show resolved Hide resolved
src/modules/tas_studio/editor/mod.rs Outdated Show resolved Hide resolved
src/modules/tas_studio/editor/mod.rs Outdated Show resolved Hide resolved
)
}
_ => return Err(ManualOpError::UserError(
"Max accel yaw offset does not support current strafe dir."
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obsolete?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Point strafing isn't supported for editor operations because that would adds some more complexity (and effort). I think the message is misinformed. I will change that.

bxt-strafe/src/steps.rs Show resolved Hide resolved
src/modules/tas_studio/editor/utils.rs Outdated Show resolved Hide resolved
src/modules/tas_studio/editor/mod.rs Outdated Show resolved Hide resolved
src/modules/tas_studio/mod.rs Outdated Show resolved Hide resolved
@khanghugo
Copy link
Contributor Author

Also waiting for this BXT change YaLTeR/BunnymodXT#519 (comment)

I added optimizer support a while ago but I forgot to push so it is now here.

@khanghugo
Copy link
Contributor Author

Might need #99 merged first because this PR and #99 both make changes to BXT exported function.

@khanghugo
Copy link
Contributor Author

Need hltas update and that's it

@khanghugo khanghugo mentioned this pull request Jul 28, 2024
@YaLTeR YaLTeR merged commit 2b06276 into YaLTeR:master Jul 28, 2024
13 checks passed
@YaLTeR
Copy link
Owner

YaLTeR commented Jul 28, 2024

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants