now the idea came to my mind, instead of colorizing the same graphic sheet, importing it and build new frame- and tilesets of it, it would go incredible faster and simplier, when i could modulate RGB for the layer itself, instead of single tiles.
You can, if you don't mind editing the code a little. Open LayerBase.cs and search for "GetTileFrame(x,y)"
This is where the code is that draws the tiles for the layer. Above "for" line, you could add this block of code to check for which layer is being drawn and calculate a modulation value for it. This example is for the sample project because it refers to Level_1_Map.Background_Lyr, which is the background layer in the sample project:
int overrideModulation = -1;
if (this is Level_1_Map.Background_Lyr)
{
overrideModulation = new ColorValue(128,128,255, 127).ToArgb();
}
Inside the loop you will see a line that begins with "spr.Draw". Change the last parameter from "f.Color" to "overrideModulation==-1?f.Color:overrideModulation" to use the new modulation value for background layers.
The final code will look like this:
int overrideModulation = -1;
if (this is Level_1_Map.Background_Lyr)
{
overrideModulation = new ColorValue(128,128,255, 127).ToArgb();
}
for (int x = nStartCol; x <= EndCol; x++)
{
int[] SubFrames = GetTileFrame(x,y);
for (int nFrame = 0; nFrame < SubFrames.Length; nFrame++)
{
Frame f = m_Frameset[SubFrames[nFrame]];
spr.Transform = Matrix.Multiply(f.Transform, Matrix.Translation(
x * nTileWidth + CurrentPosition.X + ViewRect.X,
y * nTileHeight + CurrentPosition.Y + ViewRect.Y, 0));
spr.Draw(f.GraphicSheetTexture.Texture, f.SourceRect, Vector3.Empty, Vector3.Empty, overrideModulation==-1?f.Color:overrideModulation);
}
}
}
Of course you have to use your own layer names, but this can be done relatively easily without any changes to SGDK2.
Of course, another possibility is to make the transparent part of all your tiles be 25% opaque (alpha=64) with maybe some blue tint, instead of entirely transparent. (This would be done in the graphics editor, not with color modulation -- flood fill the transparent area with this bluish color). Then they would affect all the layers behind them without using color modulation.
(have i mentioned the presention of the game in front of the half student body is only a week away? ::panic:: )
You better focus on real substantial content, then, and not details. Do you have real playable content, or just test levels so far?