Author Topic: Projectile Colours  (Read 5313 times)

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Projectile Colours
« on: 5 July 2008, 17:22:18 »
I, as many might know, am creating my own faction. Does anyone know how to make projectiles (spells to be more exact) black in color? I made the church factions white, but the hellfire factions a toughie. I tried putting 0 for all colours (red, blue, green, alpha) but ended up with an invisible spell. (damage still inflicted). Would giving it some alpha (transparency) help?
Please reply!  :(
« Last Edit: 1 January 1970, 00:00:00 by omega »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
(No subject)
« Reply #1 on: 5 July 2008, 23:06:36 »
I think it's not possible yet :(
It would be a nice featur to have( for example for a burning arrow with black smoke ....
« Last Edit: 1 January 1970, 00:00:00 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
(No subject)
« Reply #2 on: 6 July 2008, 00:36:00 »
Dang it. Green + red is supposed to make black (If you dont believe me, mix together red and green paint) but here, it makes yellow (??? How'd that happen ???) But anyway, does the glest team plan on patching that anytime?

For now, I am using purple and green in the hellfire factions spells. (purple is shadow and green is evil) What do you think? Will that work well?  :twisted:  :wicked:
« Last Edit: 1 January 1970, 00:00:00 by omega »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Nihilirian

  • Guest
(No subject)
« Reply #3 on: 6 July 2008, 07:35:08 »
Clearly you have no idea how stuff works.

Color mixing on your screen is not mixing paint on a white sheet of paper.

"Paint" mixing is called subtractive color mixing.
"Screen or light" mixing is called additive. It is mixing lights not paint.

On additive
Red + Green = Yellow
Red + Green + Blue = White
The only way you can get black is if your additive screen is pure black and you emit no light. I don't think it is possible on Glest for now. You need a workaround.

FYI you get black on subtractive mixing  
Cyan + Yellow + Magenta = Black
« Last Edit: 1 January 1970, 00:00:00 by Nihilirian »

MrBlack

  • Guest
(No subject)
« Reply #4 on: 6 July 2008, 21:29:46 »
I've never got why it's always red, green and blue. Why not red, yellow and blue?
« Last Edit: 1 January 1970, 00:00:00 by MrBlack »

ttsmj

  • Guest
(No subject)
« Reply #5 on: 6 July 2008, 21:42:01 »
Quote from: "MrBlack"
I've never got why it's always red, green and blue. Why not red, yellow and blue?


I think it have to do something with human's eye.. not sure thought
« Last Edit: 1 January 1970, 00:00:00 by ttsmj »

hailstone

  • GAE Team
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
(No subject)
« Reply #6 on: 6 July 2008, 22:34:22 »
It is because RGB is additive colours and CMY is subtractive colours.

http://en.wikipedia.org/wiki/Primary_color
« Last Edit: 1 January 1970, 00:00:00 by hailstone »
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

Nihilirian

  • Guest
(No subject)
« Reply #7 on: 7 July 2008, 03:53:36 »
Quote from: "MrBlack"
I've never got why it's always red, green and blue. Why not red, yellow and blue?


You are killing me :)
« Last Edit: 1 January 1970, 00:00:00 by Nihilirian »

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
(No subject)
« Reply #8 on: 7 July 2008, 18:07:35 »
Are they ever gonna fix up the colours and maybe add on those subtractive ones?
« Last Edit: 1 January 1970, 00:00:00 by omega »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

ZaggyDad

  • Guest
(No subject)
« Reply #9 on: 8 July 2008, 01:13:37 »
It's because yellow is green and red. We don't really need repeating colors.

~Zaggy
« Last Edit: 1 January 1970, 00:00:00 by ZaggyDad »

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
(No subject)
« Reply #10 on: 8 July 2008, 05:00:56 »
Now I'M confused!
« Last Edit: 1 January 1970, 00:00:00 by omega »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

ArKabZol

  • Guest
(No subject)
« Reply #11 on: 27 July 2008, 19:36:31 »
Quote from: "omega"
Are they ever gonna fix up the colours and maybe add on those subtractive ones?


You couldn't just "add the subtractive ones", it doesn't work that way. What COULD be possible, is that you make it always visible even without light coming from it. You would probably need alot of editing in the source just for that though.

Long story short: No, but you could do it another way but it would probably take alot of work.

P.S. I don't know how C++ or the Glest engine works, I just have some common knowledge about computers and light. So don't take this as a complete fact.
« Last Edit: 1 January 1970, 00:00:00 by ArKabZol »

ZaggyDad

  • Guest
(No subject)
« Reply #12 on: 28 July 2008, 21:55:30 »
Er, sorry, Omega. I was replying to MrBlack.

And subtractive colors are an alternative to additive colors.

~Zaggy
« Last Edit: 1 January 1970, 00:00:00 by ZaggyDad »

modman

  • Guest
(No subject)
« Reply #13 on: 16 August 2008, 02:37:46 »
Maybe try 1.0 of each of the colors.
« Last Edit: 1 January 1970, 00:00:00 by modman »

ArKabZol

  • Guest
(No subject)
« Reply #14 on: 16 August 2008, 18:52:17 »
Quote from: "modman"
Maybe try 1.0 of each of the colors.


Hmm.. no. That would just make a very light/transparent white.
« Last Edit: 1 January 1970, 00:00:00 by ArKabZol »

mictes

  • Guest
(No subject)
« Reply #15 on: 16 August 2008, 19:28:41 »
DELETED.
I lost in thougths ^^
« Last Edit: 16 August 2008, 19:56:05 by mictes »

ArKabZol

  • Guest
(No subject)
« Reply #16 on: 16 August 2008, 19:45:56 »
Quote from: "mictes"
I tried with negative values, the darkest result was a dark blue, like the dark blue in MS Paint.
(And it was very transparent)
There must be any trick !


What do you mean by negative values? Did you add a subtraction mark (-) before the numbers?
« Last Edit: 1 January 1970, 00:00:00 by ArKabZol »

mictes

  • Guest
(No subject)
« Reply #17 on: 16 August 2008, 19:57:50 »
Sorry ^^ (see my last post)

It was a number like 0.0000000001
The colour is really disabled, but still existing.
« Last Edit: 1 January 1970, 00:00:00 by mictes »

ZaggyDad

  • Guest
(No subject)
« Reply #18 on: 16 August 2008, 20:59:14 »
I think the only way to make it subtract colors is to modify the source code.

~Zaggy
« Last Edit: 1 January 1970, 00:00:00 by ZaggyDad »

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
(No subject)
« Reply #19 on: 17 August 2008, 00:03:53 »
How right you are Zaggy, Ideas for glest 3.2.1 and GAE?

BTW, I'm making a few more scenarios with Lua scripting, anyone got a good idea for them? Possible ideas: (Which can be done)

~Kill the king
~Defeat enemy villages in order.
~Defeat set waves of foes that come from no where (no enemy base)
~Defend your villages from enemy attackers (where you control 2-5 villages)
~Save your ally from being killed
~Defeat villages with one unit that MUST survive (storming style)
~Simple mission with dialouge (some errors may occur such as repeated text)

~and I'm open to others that are possible in the Beta's Lua scripting.

Feel free to share ideas via the Glest board and email!
« Last Edit: 1 January 1970, 00:00:00 by omega »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

nintendo

  • Guest
(No subject)
« Reply #20 on: 17 August 2008, 00:25:17 »
BTW, I'm making a few more scenarios with Lua scripting, anyone got a
Quote
good idea for them? Possible ideas: (Which can be done)

~Kill the king
~Defeat enemy villages in order.
~Defeat set waves of foes that come from no where (no enemy base)
~Defend your villages from enemy attackers (where you control 2-5 villages)
~Save your ally from being killed
~Defeat villages with one unit that MUST survive (storming style)
~Simple mission with dialouge (some errors may occur such as repeated text)

~and I'm open to others that are possible in the Beta's Lua scripting.

Feel free to share ideas via the Glest board and email!


Oh man, I was just giving ideas like that in your post for those two scenarios. What about a king of the hill fight where you battle off foes to take control of the hill?
« Last Edit: 1 January 1970, 00:00:00 by nintendo »