unit colour

Talk about your new mod or map here

Moderators: bert_the_turtle, jelco

User avatar
martin
level5
level5
Posts: 3210
Joined: Fri Nov 19, 2004 8:37 pm
Location: ::1
Contact:

unit colour

Postby martin » Sun Jun 19, 2005 7:30 pm

I'm redesigning the virii units for my mod. I've changed the sprite but how do I change the colour?
GENERATION 22:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.
User avatar
trickfred
level5
level5
Posts: 1691
Joined: Sat Jul 24, 2004 5:01 am
Location: The Great White North, Eh?
Contact:

Postby trickfred » Sun Jun 19, 2005 8:31 pm

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 :)
Last edited by trickfred on Mon Jun 20, 2005 5:44 pm, edited 2 times in total.
User avatar
xander
level5
level5
Posts: 16866
Joined: Thu Oct 21, 2004 11:41 pm
Location: Riverside, CA, USA
Contact:

Postby xander » Sun Jun 19, 2005 11:01 pm

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
User avatar
martin
level5
level5
Posts: 3210
Joined: Fri Nov 19, 2004 8:37 pm
Location: ::1
Contact:

Postby martin » Mon Jun 20, 2005 11:04 am

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.
GENERATION 22:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.
User avatar
xander
level5
level5
Posts: 16866
Joined: Thu Oct 21, 2004 11:41 pm
Location: Riverside, CA, USA
Contact:

Postby xander » Mon Jun 20, 2005 5:38 pm

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
User avatar
martin
level5
level5
Posts: 3210
Joined: Fri Nov 19, 2004 8:37 pm
Location: ::1
Contact:

Postby martin » Mon Jun 20, 2005 8:31 pm

What I've done is changed the shape of the virii with the virii sprite then chaged their colour with the glow bmp.
GENERATION 22:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.
nihilisthetics
level1
level1
Posts: 50
Joined: Sun Apr 24, 2005 5:28 pm
Contact:

Postby nihilisthetics » Mon Jun 20, 2005 11:02 pm

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
Krion112
level2
level2
Posts: 114
Joined: Sat Nov 15, 2008 4:24 am

Postby Krion112 » Sat Nov 15, 2008 4:59 am

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
Last edited by Krion112 on Sat Nov 15, 2008 4:56 pm, edited 1 time in total.
User avatar
xander
level5
level5
Posts: 16866
Joined: Thu Oct 21, 2004 11:41 pm
Location: Riverside, CA, USA
Contact:

Postby xander » Sat Nov 15, 2008 4:54 pm

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

Return to “Mod Projects”

Who is online

Users browsing this forum: No registered users and 2 guests