Page 1 of 1

unit colour

Posted: Sun Jun 19, 2005 7:30 pm
by martin
I'm redesigning the virii units for my mod. I've changed the sprite but how do I change the colour?

Posted: Sun Jun 19, 2005 8:31 pm
by trickfred
The game is hard coded to give a reddish tint to anything that's not black in the virii.bmp file.

The glow surrounding the virii comes from glow.bmp.

There's your hints. :)

Edit again: I was right :)

Posted: Sun Jun 19, 2005 11:01 pm
by xander
trickfred wrote:The game is hard coded to give a reddish tint to anything that's not black in the virii.bmp file.


Not entirely correct -- if you use color in the sprite, the virii will also be colored.

trickfred wrote:The glow surrounding the virii comes from glow.bmp.


Indeed, and you can change the color of the glow, again by adding color to the .bmp. It seems to me that many of Darwinia's textures and sprites work this way -- they were originally intended to be one color, so anything that is white in the sprite is that color, while anything else is transparent. However, you can add color to most of them, and have it work in the game (i.e. virii, glow, lasers, they sky, eggs, &c.).

trickfred: :P

xander

Posted: Mon Jun 20, 2005 11:04 am
by martin
So I change the glow bmp file?
I've vhanged the virii bmp file to be another colour and image but the colour is the same (only the shape has changed). I'll try when I get home from school.

Posted: Mon Jun 20, 2005 5:38 pm
by xander
Image

Okay, after some experimentation, this is what I have discovered: the sprite is tinted red. In the screenshot above, the little blob near the cursor is the sprite used to create the virii. As you can see, the sprite is made up of blobs of red, green, blue, &c. However, the virii are much more red looking. The glow texture is a large black square, thus there is no glow.

xander

Posted: Mon Jun 20, 2005 8:31 pm
by martin
What I've done is changed the shape of the virii with the virii sprite then chaged their colour with the glow bmp.

Posted: Mon Jun 20, 2005 11:02 pm
by nihilisthetics
A colour filter is applied to sprites in their allegiance colour and this is hard coded in game. However, darkers colours in the bitmap look truer to the actual colour, and lighter colour look truer to the allegiance colour. So by using dark colours, you can make your sprites look different. You can use this effect to get the same sprite to look different depending on their allegiance.

N

Posted: Sat Nov 15, 2008 4:59 am
by Krion112
It's not entirely true, virii can be visible on another team, it's just when you have a sporegenerator egg make more they're invisible.... try and implement that to your mod :D

k, understood, I'll try and be more cautious of these things :D

Posted: Sat Nov 15, 2008 4:54 pm
by xander
Krion112 wrote:It's not entirely true, virii can be visible on another team, it's just when you have a sporegenerator egg make more they're invisible.... try and implement that to your mod :D


wait...... Nobody said anything to deny that.... woops :oops:

First off, for the version of Darwinia that I have (i.e. the Mac version), this is incorrect. Second off, look at the date of the last post in this topic. It is over three years old. Don't bump old topics without adding something significant to them.

xander