Skip to content

Ratty camera protocol#118

Open
Nomagno wants to merge 13 commits into
orhun:mainfrom
Nomagno:ratty_camera_protocol
Open

Ratty camera protocol#118
Nomagno wants to merge 13 commits into
orhun:mainfrom
Nomagno:ratty_camera_protocol

Conversation

@Nomagno

@Nomagno Nomagno commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Hey!
Ctrl + Alt + O -> Regular orthographic view
Ctrl + Alt + P -> New perspective view ('videogame camera' style)
Basically, both cameras are created at startup, but only the requested one is activated in Bevy. Not sure if this might suppose a performance penalty. I am also not an expert in Rust nor Bevy, so sorry if something's improvable 😅. I also refactored a bunch of match statements into comparisons against is_3d() where I thought it might be reasonable, since 3 long enum values per arm seemed silly once I added the new Persp3d mode (I can revert this if needed).

Additionally:

The ratty graphics protocol is expanded as per the update to protocols/graphics.md, with the corresponding implementation. The rendering and input processing pipeline is reordered in order to allow the applications and the user to control the camera at once harmoniously. I am not a Rust expert, and would, in general, appreciate feedback on the architecture and style.

Missing: better documentation of the code, add support for the features described here to the big rat demo, and perhaps add Ctrl+Alt+[0-9] bindings for manually changing to the 10 camera slots.

Obsoletes #89 and implements #114

@orhun orhun left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

thanks for the PR! I have pushed a cleanup commit and have a small question about one of the parts :)

Comment thread src/inline.rs Outdated
Comment thread src/inline.rs Outdated
@orhun

orhun commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Hey hey! I just fixed conflicts and gave this a try - but I'm not sure if it works as expected.
When I switch to perspective mode, the terminal disappears. But maybe that's expected? I'm not sure.

Do you mind giving this a try with the latest changes here?

@Nomagno

Nomagno commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Sure! Can you confirm if it worked before the merge conflict resolution? Just to have another data point

@orhun

orhun commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Hmm maybe I broke it 😅

@Nomagno

Nomagno commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Yep, I can confirm latest commit is broken for me too, but it works before the changes

@orhun

orhun commented Jul 11, 2026

Copy link
Copy Markdown
Owner

okay I just ran this from your previous commits and got an idea how the feature should look like. I think something broke while fixing the conflicts, any chance that you could take a look or reimplement this?

@Nomagno

Nomagno commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Sure, I'll have a look!

@Nomagno

Nomagno commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Yeah uhhhh, I'm having trouble merging in a bug-free manner too 😭 hard to believe the branch could've gone stale this quickly, I'll do a more in depth investigation

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