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

Drag Selection #1603

Merged
merged 28 commits into from
Jan 25, 2024
Merged

Drag Selection #1603

merged 28 commits into from
Jan 25, 2024

Conversation

heinezen
Copy link
Member

@heinezen heinezen commented Nov 23, 2023

Depends on #1550

Adds drag selection to the possible inputs.

  • Input System
    • Game controller
      • Store drag selection start in game controller
      • Create drag selection events with mouse down/up
      • Send drag select events to gamestate
    • HUD controller
      • Store drag selection start in game controller
      • Convert drag select events to HUD renderer instructions
  • Renderer
    • HUD renderer
      • drag selection shader
      • HUD objects
      • render pass
  • Gamestate
    • Drag selection event
    • Use Selectable ability

@heinezen heinezen added area: renderer Concerns our graphics renderer nice new thing ☺ A new feature that was not there before area: simulation Involved in the game mechanics and simulation area: input Related to our input system labels Nov 23, 2023
@heinezen heinezen marked this pull request as draft November 23, 2023 19:01
@heinezen heinezen marked this pull request as ready for review November 26, 2023 21:44
Copy link
Member

@TheJJ TheJJ left a comment

Choose a reason for hiding this comment

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

wooh!

doc/code/renderer/level2.md Show resolved Hide resolved
libopenage/gamestate/event/drag_select.cpp Show resolved Hide resolved
libopenage/gamestate/event/drag_select.cpp Show resolved Hide resolved
libopenage/gamestate/event/drag_select.h Show resolved Hide resolved
assets/shaders/hud_drag_select.frag.glsl Show resolved Hide resolved
libopenage/input/input_context.cpp Outdated Show resolved Hide resolved
libopenage/input/input_context.cpp Outdated Show resolved Hide resolved
Copy link
Member

@TheJJ TheJJ left a comment

Choose a reason for hiding this comment

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

if we don't move the selection to hud layer now, it's likely still doable later. advantage of simulating it: we easily capture it in recordings. (although tracing the camera pos in presenter has to be done anyway)

@heinezen heinezen requested a review from TheJJ January 3, 2024 14:25
@TheJJ
Copy link
Member

TheJJ commented Jan 12, 2024

has merge conflicts :)
another design point: when units die during being selected, intuitively managing and activating the selected unit's status seems better placed at the hud layer. otherwise the dieing must influence the selectability as simulated unit state, instead of the selectability being a flag & then-visible unit data drawn in the hud

TheJJ
TheJJ previously approved these changes Jan 12, 2024
Copy link
Member

@TheJJ TheJJ left a comment

Choose a reason for hiding this comment

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

ok, let's do it like this for now.

@heinezen
Copy link
Member Author

merge conflicts are fixed :)

@heinezen
Copy link
Member Author

another design point: when units die during being selected, intuitively managing and activating the selected unit's status seems better placed at the hud layer. otherwise the dieing must influence the selectability as simulated unit state, instead of the selectability being a flag & then-visible unit data drawn in the hud

Also relevant for the input layer since the selection queue for the controller resides there. This back propagation of the unit state is a bit hard to do across thread boundaries. We can probably manage that via another interface to the presenter though.

@heinezen heinezen requested a review from TheJJ January 13, 2024 13:16
@heinezen heinezen mentioned this pull request Jan 14, 2024
@TheJJ TheJJ merged commit 0dbf6c1 into SFTtech:master Jan 25, 2024
13 checks passed
@heinezen heinezen deleted the feature/drag-select branch February 23, 2024 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: input Related to our input system area: renderer Concerns our graphics renderer area: simulation Involved in the game mechanics and simulation nice new thing ☺ A new feature that was not there before
Projects
Status: ✅ Done
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants