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

Unit shadow #5188

Merged
merged 2 commits into from
Feb 26, 2024
Merged

Unit shadow #5188

merged 2 commits into from
Feb 26, 2024

Conversation

SJuliez
Copy link
Member

@SJuliez SJuliez commented Feb 21, 2024

This adds a programmatic drop shadow to icons when not airborne. This is meant to replace the static shadow we have around many icons. The drop shadow reflects a unit's height and is oriented like the terrain shadows.

image

@HammerGS
Copy link
Member

Should I be planning to switch the sprites back to the original unshaded versions?

@SJuliez
Copy link
Member Author

SJuliez commented Feb 21, 2024

ground units yes.

@HammerGS
Copy link
Member

Another thought on this, I know in the past I've seen comments that players don't like shadow effects. With the move back to original sprites, should this be made an option? Defaulted to on.

@SJuliez
Copy link
Member Author

SJuliez commented Feb 22, 2024

Yes I can add that. I could make the unit shadows depend on the terrain shadow setting to avoid yet another checkbox

@HammerGS
Copy link
Member

Yes I can add that. I could make the unit shadows depend on the terrain shadow setting to avoid yet another checkbox

I think that would be a great idea, but I would set the option to on by default.

Copy link
Member

@NickAragua NickAragua left a comment

Choose a reason for hiding this comment

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

Looks fine. Do we want to have this as an option for people using potato computers? Some of the computations in EntityImage look a little gnarly and may be not great for performance?

edit: lol looks like Hammer had a similar idea.

@SJuliez
Copy link
Member Author

SJuliez commented Feb 26, 2024

Yes, it's now tied to the terrain shadows. Actually, the icons are cached and during a game (after the lobby) I found it difficult to get them to do the EntityImage thing at all. But in the lobby, they constantly redraw so I guess, better that way.

@SJuliez SJuliez merged commit f3dde7d into MegaMek:master Feb 26, 2024
4 checks passed
@Thom293
Copy link
Contributor

Thom293 commented Mar 8, 2024

Hey - I just used this for the first time. Looks really damn good. Thank you.

@SJuliez SJuliez deleted the icon-shadow branch March 9, 2024 09:24
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.

4 participants