munificent / hauberk

A web-based roguelike written in Dart.
http://munificent.github.io/hauberk/
Other
2k stars 200 forks source link

Added dimmed colors for older log entries. #34

Closed GaryTheLlama closed 6 years ago

GaryTheLlama commented 6 years ago

So this is my first PR ever to a public repo. I'm not sure what the etiquette is for adding a feature that you hadn't requested, but this change made the log way more readable to me. Feel free to reject if you're not a fan of it.

One improvement to this would be a palette of six brightness levels for each color depending on how far it is from the most recent log entry. Additionally, I'm not happy with the new color names. Maybe something more like tarnishedGold instead of goldDimmed? Obviously that's just a minor issue, but good names are important to me.

Thanks!

munificent commented 6 years ago

So this is my first PR ever to a public repo.

Welcome to open source! :)

I'm not sure what the etiquette is for adding a feature that you hadn't requested

It tends to vary based on the project. Most healthy open source projects have some docs explaining how the maintainers feel about new features. I'm pretty lazy about maintaining Hauberk as a real open source project, so I don't have any of that. I mostly treat it as open source in the sense of "you can take the code and do stuff with it" and less "a collaboratively maintained codebase".

There's definitely nothing wrong with the latter, but my free time is very limited, I have other projects that are more collaborative, and at the end of the day, there's only so much time I want to spend managing the issue tracker, reviewing pull requests, etc. :)

That being said, this is a neat change. Instead of authoring explicit colors for the dimmed version, an easier approach is probably to create them dynamically. Something like:

if (y == messagesLength) color = color.blend(Color.black, 0.5)

Want to try that out?

GaryTheLlama commented 6 years ago

Yup, that sounds like a way better idea. I'll give that shot. Thank you!

munificent commented 6 years ago

Looks nice, thanks!