Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: HSL Color Standard  (Read 18840 times)

0 Members and 1 Guest are viewing this topic.

masskiller

  • Sr. Member
  • ****
  • Posts: 284
  • Pointers to Functions rock!
    • MSN Messenger - kyogre_jb@hotmail.com
    • View Profile
    • Email
Re: HSL Color Standard
« Reply #30 on: October 19, 2012, 10:14:17 pm »
Quote
my teachers taught us to do so: "one subject = one message"

I'm not the kind to follow blindly what I'm taught. I've tryed with and without, and in practice I can say that this is always the better option.
Sometimes I don't because it's a little bit harder to do, and takes more time, but when I don't it happens quite often that I have to regret it.

I would recommend everyone to do the same, being for emails, posts, and even phone calls.

While you may like it and your idea does make some sense it's totally unpractical, just quoting this took a lot of unnecessary scrolling. I learned to use many quotes in one post in forum debates, when you are in a hard to swallow debate making a post for every single thing only creates spam and lack of control over what you write (in my opinion).

Of course this isn't anything similar to a debate, but it's still nicer to read when stuff like this is in the same post. The new quote is the one that implicitly marks the change in subject within the post.

Quote
I just said that I was surprised to read the same piece of code with different author names. I'm not the police.

The username I use here was already taken, so I was forced to use my alternative one.



Programmer, Artist, Composer and Storyline/Script Writer of "Origin of Magic". If all goes well this could turn into a commercial project!

Finally back into the programming world!

guarks

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: HSL Color Standard
« Reply #31 on: October 19, 2012, 10:18:28 pm »
Quote
Last time I checked exploiter was not your student or employee..

Yes, but it's requested to stay polite and friendly.

guarks

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: HSL Color Standard
« Reply #32 on: October 19, 2012, 10:18:48 pm »
I am young and ignorant in regards to this, if there is anything I should learn to not have an issue like this again happen with my code I'm willing to learn.

Just have a look how other people provide their code.

For a project, usually it's recommanded to add a header in every source code file.

Some Debian packagers will also ask you to add a text file information for every single images, not only tell in the readme file that all images are released under the foo license.

But most of them are not that extremists.
It seems for example that the Debian SFML packager didn't said anything about sounds and images in SFML.

One day a Debian packager even asked me to add a licensing header in the README file!
This was very surprising to me because I don't see licensing information in most free softwares and libs.

Anyway, usually the header in every source file is enough.

For wikis, just see at the bottom of the pages.
Even then you can usually provide your content with alternative conditions.
If you do so this usually means that someone can choose between the default wiki conditions OR the one you added at the beginning of your code.
But sometimes it may also replace it, so people can only take your content with your conditions, and not the one from you.
Sometimes the wiki forbids another conditions from the authors.

Wikipedia doesn't allow other conditions than the default one.
Rosettacode allow contributors to provide alternative conditions.

guarks

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: HSL Color Standard
« Reply #33 on: October 19, 2012, 10:25:14 pm »
Quote
While you may like it and your idea does make some sense it's totally unpractical, just quoting this took a lot of unnecessary scrolling. I learned to use many quotes in one post in forum debates, when you are in a hard to swallow debate making a post for every single thing only creates spam and lack of control over what you write (in my opinion).

Of course this isn't anything similar to a debate, but it's still nicer to read when stuff like this is in the same post. The new quote is the one that implicitly marks the change in subject within the post.

If this becomes the policy of this forum, I'll follow it.

But I think that this way of posting also has advantage for moderation.
The moderator can then remove the posts with flames, and keep the ones with usual discuss.

I don't know how the forum engine works, but maybe this would also allow to split threads.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10823
    • View Profile
    • development blog
    • Email
Re: HSL Color Standard
« Reply #34 on: October 20, 2012, 01:10:43 pm »
But the "obvious truth" as you said is that you did that after we started to talk about it.
When people link stuff or say something they imply that you as reader are going to check that out and if you had done it, it would've been obvious that things have changed. That I've made a decision without further discussion would have been a logical implication.

For the acerbity, I guess you don't talk to your customers or boss or teacher that way.
Please do not do it here too.
Yes, but it's requested to stay polite and friendly.
As I often like to say: "I'm only responsible for what I say and not for what others might hear."
I didn't use any strange tone and it wasn't my intention to do so. I simply state the fact that you were already too late for that topic and yes, I would talk that way to my teacher/boss/professor, since as I already said (for the third time now) that there was no acerbity and it was only you that interpreted it that way. ;)

my teachers taught us to do so: "one subject = one message"
I'm not the kind to follow blindly what I'm taught.
I've tryed with and without, and in practice I can say that this is always the better option.
Sometimes I don't because it's a little bit harder to do, and takes more time, but when I don't it happens quite often that I have to regret it.
So only after you've tried both your gonna follow that blindly? ;)

If this becomes the policy of this forum, I'll follow it.
I've been on quite many forums and I've never run into someone or even a forum rule who/that would enforce such a way of posting. You can gladly search through this forum and you won't find anyone that has posted 6 posts in a row to one discussion. So although it's not a written rule on any forum, it's a implicit rule that most everyone follows and you should too.
Or can you show me a forum that uses this way of posting?

I would recommend everyone to do the same, being for emails, posts, and even phone calls.
So when you have two questions for someone, you call him ask the question, hang up call him again and ask the second question? ;D
Such statements can not be applied to every situation and I strongly advise against it in most situations.

But I think that this way of posting also has advantage for moderation.
The moderator can then remove the posts with flames, and keep the ones with usual discuss.
Not really it's a pain in the ass if the moderator has to edit 10 posts, instead of just editing one...
And if he wants to remove stuff there's no extra work if it's a single post or not.
Besides this forum does not have any moderator and nearly nothing gets removed. Laurent is the only one that can edit posts.
(Otherwise I'd have split this discussion into a new one long ago and merge your X posts into one... ;) )


A general advice for rounding up this part of the discussion: If you're very new to a forum and users with quite a few posts more or one of the most active member of the forum tells you how you should go about handling the forum, it's probably for the better to follow their advice. Not only will they mostly be right but you also show them some respect... ;)
Every forum has their own unwritten rules and you first always have to find out how things are handled in forum instead of making your own assumptions and your own rules. :)

For the wiki license discussion I suggest you keep talking in this thread.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: HSL Color Standard
« Reply #35 on: October 20, 2012, 02:18:14 pm »
In many forums, already double-posts are proscribed, not to mention 6 in a row. It really adds confusion to a discussion, please don't do it.

If there are two posts in a row, because you see, that during posting somebody else has written a post you want to refer to, it's okay. As well if you have a project thread and announce news from time to time. But not if you could directly write one post, which would be much clearer for a discussion flow and which wouldn't span the topic unnecessarily across multiple pages.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

xylr117z4

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Email
Re: HSL Color Standard
« Reply #36 on: October 20, 2012, 06:35:31 pm »
Git hub doesn't load correctly for my current work station so I'll have to look over the orginial authors implementation above but I do see how HSL control would be useful. 
For example using a grayscale default character sprite you could color it "in-game," or rather during run time for multiple players without the need to load 4 seperate images.

masskiller

  • Sr. Member
  • ****
  • Posts: 284
  • Pointers to Functions rock!
    • MSN Messenger - kyogre_jb@hotmail.com
    • View Profile
    • Email
Re: HSL Color Standard
« Reply #37 on: October 20, 2012, 08:10:45 pm »
Git hub doesn't load correctly for my current work station so I'll have to look over the orginial authors implementation above but I do see how HSL control would be useful. 
For example using a grayscale default character sprite you could color it "in-game," or rather during run time for multiple players without the need to load 4 seperate images.

Exactly, but that's not just it, you can by removing all saturation from every pixel you can make it grayscale, make a dark image into a bright one or make gradients like it was nothing. It grants you a whole lot more of control that RGB doesn't. You just convert, do whatever you want and reconvert.
Programmer, Artist, Composer and Storyline/Script Writer of "Origin of Magic". If all goes well this could turn into a commercial project!

Finally back into the programming world!

xylr117z4

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Email
Re: HSL Color Standard
« Reply #38 on: October 20, 2012, 09:08:38 pm »
Exactly, but that's not just it, you can by removing all saturation from every pixel you can make it grayscale, make a dark image into a bright one or make gradients like it was nothing. It grants you a whole lot more of control that RGB doesn't. You just convert, do whatever you want and reconvert.

I actually did find your HSL class on Git hub it's just the link posted had since been broken...

It's something that would be really useful and it's something that I think would fit sfml's purpose if it were integrated.  Once I get off I'll have to try making a quick test program with the class because it would be useful for a project my buddy has been working on (which happens to be a verticle shooter much like the one you're attempting to create, other than it being less of a bullet hell.)


masskiller

  • Sr. Member
  • ****
  • Posts: 284
  • Pointers to Functions rock!
    • MSN Messenger - kyogre_jb@hotmail.com
    • View Profile
    • Email
Re: HSL Color Standard
« Reply #39 on: October 20, 2012, 11:52:46 pm »
Quote
I actually did find your HSL class on Git hub it's just the link posted had since been broken...

Is the link still broken? I just checked and it's fine, in any case here it is: https://github.com/SFML/SFML/wiki/Source%3A-HSL-Color

Quote
It's something that would be really useful and it's something that I think would fit sfml's purpose if it were integrated.

It most likely won't be integrated since it's something entirely external that doesn't require any change in the library whatsoever (paraphrasing Laurent), but Thor will add HSL/HSV and there's my implementation of it as well so feel free to use it at will.

Programmer, Artist, Composer and Storyline/Script Writer of "Origin of Magic". If all goes well this could turn into a commercial project!

Finally back into the programming world!

xylr117z4

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Email
Re: HSL Color Standard
« Reply #40 on: October 21, 2012, 12:25:25 am »
It most likely won't be integrated since it's something entirely external that doesn't require any change in the library whatsoever (paraphrasing Laurent), but Thor will add HSL/HSV and there's my implementation of it as well so feel free to use it at will.

well it doesn't really change anything but I think it would be nice to be like sf::Color(H,S,L); as well as sf::Color(R,G,B and some times A);

...but I guess that would just be in the declaration actually using HSL for colorizing would probably be better done in it's own class.