Please stick to the "terran fights invading zerg" concept instead of "play god and shoot random dudes"...
Part from that i suggest a coop mode, where 1 player has to protect the convoy from above, another one is manning the cannon on the convoy itself and maybe a third one which operates an anti air cannon to defend (though i dont know if there are skybox textures at all to make it look good)
Create a buff (behavior) on your unit, that periodically casts a Search Area Effect
Set the Search Area Arc to the sight angle (180° maybe). Be sure to set Impact Location and Launch Location to Caster Unit/Point, otherwise it would always assume your unit has a 0° facing. The Effect you apply to the found unit is up to you...
@FuzzYD: Go
The idea is nice.
you could also setup an aura, that applies an effect that kills a unit after a certain time if the player does not move out.
I'm just curious, how is the anti camping zone designed? Just like a general "no-go" zone, where you get squashed after a certain time? Or do you want to prevent players from staying in the same spot all the time?
A problem with your anti-camp design could be: Player A enters zone->timer started. Timer running out in 3..2..1..Player B enters zone...0. Player B caught for being in the wrong place at the wrong time.
For general anti camp stuff you could work with the "Unit Becomes Idle" Triggers.
For example set a marker of the units current zone/point in an idle candidates list and use a global timer to check periodically, whether your idle candidates left the zone/moved at least X from the initial point.
Or just start a trigger when unit becomes idle, and set a position variable locally. Wait for X seconds and check again.
The SC2 Engine uses Deferred Rendering, that means instead of rendering an object one time for each light in your map, an object is rendered only once. To get the correct light result for more than 1 light, light information for each pixel are stored in the RGB channels of its texture, thats the base-map - the texture file (how much of a red/green/blue light would this pixel reflect).
With the base-map, we can make out terrain look colorful, but it still would look a bit flat. Bricks have cracks and other details...they are not even. To get more details into a simple texture, the Starcraft 2 Engine uses some kind of Bump Mapping. That means, on top of our base-map we project another texture, that contains information of the height of each pixel. Thats handy, but if we would rotate our map (or adjust time of day values to change the light) the lightning on a bump mapped surface would always bounce in the same direction. To get a nice lightning effect for each aspect, we need information for each axis we move (x,y,z). Thats what Normal Maps are for. Each RGB channel is a height map of our texture, where R=x-axis, G=y-axis, B=z-axis. If we would move in our scenery along the x-axis, the R channel of the normal map tells the engine how to adjust light reflection. Edges will have brighter values and reflect more light whereas cracks would be dark and start reflecting only at an extreme angle or not at all. SC2 Normal maps also have an alpha channel, that works as some kind of default bump map.
Getting started
Prepare your texture file (tiling it, contrast etc.)
Create a standard normal map of your texture (use Crazybump, Gimp-Normalmap or even the Photoshop plugin, whatever you are comfortable with)
Prepare your Gimp if you want to follow this tutorial (install gimp-dds) or have a snickers if you just want to know basics
I'll use these:
Creating the Base Map
Take a tiled texture of your choice (I am not going deeper into tiling textures; some say you don't even need a seemingless one). Almost all Terrain Tiles are 512x512, changing the size of a terrain texture will result in a scaled texture ingame, so stick at this size or go higher.
Open it with Gimp.
Remove the alpha channel, if it exists. (Right Click on the Layer->Remove Alpha Channel)
The RGB channels should be fine; you may adjust brightness values, but if you can clearly see it, they are ok
Now we apply a new Alpha Channel to our texture.
Setting it to 255 (white) will result in nothing but white glimmering space. :) The texture will be drawn but is completely overloaded with light, since it will not let light through and reflect everything. A value of 0 (black) will do a plain texture as your RGB channel reflects nothing and doesn't change at all.
Basics: Red Channel describes where red light will be reflected, so that our texture appears to be red. Same for the other channels.
The Alpha channel determines, how much of light is reflected in general, see it as a sun glass for your texture. The darker a channel (or a pixel/area in this channel) the less light will be reflected there.
If you have a generally very dark texture (reeaaaallly dark) your alpha channel could almost be gray...If you want a texture, that reflects light extremely (slime, organic bleeding stuff), your alpha channel can be gray. However, for most textures you want an alpha channel that is between 1 and 25, that means almost fully transparent.
Alpha Channel Gimp:
Select "Colors"->"Levels", change the channel dropdown box to Alpha. What you see there is a histogram, describing how much pixels are of each color in the grayscale. We want every pixel there in a range from 1 to 40 (try it out what suits you best).
Leave the first slider as it is (Did you touch it? select the whole spectrum from 0 to 255 with 1,00 as the gamma value). You want to adjust the "Output Levels" slider: Drag the right pointer to about 40 or just enter it in the textbox on the right, then hit OK.
This is what the final histogram could look like:
Now the image is gone...in the world of wysiwyg. It's still there, but almost transparent.
Save your file as a *.dds; use BC3 / DXT5 compression and check "Generate mipmaps" (Use these settings for all SC2 DDS files).
Creating the Normal Map
Load your standard normal map into Gimp.
Remove the alpha channel, if it exists. (Right Click on the Layer->Remove Alpha Channel)
This is where the fun starts: We have to set up all channels to fit into the Blizzard Normal map scheme. Remember what we said about how the RGB channels are assigned to the axis? R=x, G=y, B=z. Selecting only the red layer you should see all dimples from top to down; all from left to right with only the green layer selected. And blue? Why does it display both? If we move along the Z axis, all the edges are relevant. But guess what: We dont need them. R and G combined does almost the same.
The Alpha Layer of the blizzard normal map acts as the bump map from above, so we have to combine R and G and copy it to the alpha channel:
Unselect any selection you have ("Select"->"None")
Right Click the Red Channel -> "Channel to Selection"
Right Click the Green Channel -> "Add Channel to Selection"
Right Click on the empty space below -> "Add Channel" -> Opacity 100%, Check "Initialize from Selection"
Unselect any selection you have ("Select"->"None"), depending on your image, these selections really slow down Gimp...
Now we have an additional channel, representing x and y movement reflections. Later more on that
Right now I'm unsure, some people say we need a red-scale normal map, for me a grayscale worked fine.
To convert the image into a grayscale we do the following:
Select the Layer
Right Click on it ->"Colors"->"Components"->"Channel Mixer", check "Monochrome", don't click OK
Now you have to choose from which channel you want to take the colors; Select the Green Value (100%).
You can also check Red and Green and do 50% for both. This setting does not change the color of our map itself, it just changes how the lightning on our texture changes when we move through the map. Since the SC2 point of origin is the bottom left of your map, we move in the x or y so both of them or a combined value is ok.
Now the Normal map is almost complete.
Setting up the old R channel (the one thats still hanging around) as Alpha:
Right Click on the layer -> Add Layer Mask, select "Channel" and choose this channel
Remove the R channel: Channels -> Right Click on it -> "Delete Channel"
Select the Layer -> Right Click on it -> "Apply Layer Mask"
That should be it; Save the file as *.dds just like the base-map
You can find sample screenshots and the generated *.dds files in the attachments.
Tips
Do not test your textures in the Terrain Editor, it has bugs and odd results due to re-uploading etc., test it directly in Starcraft.
Use different light settings to see, how your texture reacts
Don't just fill the ground only with your texture, use other and paint around to see the blending
You can set up a lightning that changes fast: In the Data editor create a new lightning or use an existing one and set "Time Per Game Loop to something like 00:10:00. Don't forget to give this lightning settings for more than 1 Time of Day. :)
Don't worry if you can't see the picture of your texture, the preview in the galaxy editor doesn't deal properly with the alpha channels, too.
Don't eat yellow snow
Q&A
My texture shines almost pure white at different angles: Lower the base-map alpha
My texture is still too dark/bright: Adjust the brightness/contrast of the alpha channel of the normal map
My texture does not show up in the Terrain editor although i put it in the data editor: Close the Terrain Editor. Open the Terrain Editor ;)
My texture does not blend at all/Terrain Editor Crashes when I try to paint it: Check the *.dds Format settings when you saved your file. Check if they all have an alpha channel. Don't forget to re-import them.
Feel free to comment, add additional infos or report my errors.
Right now I'm too tired, but I still want to figure out, how the minimap color works and there is still some formatting / additional screenshots to do.
You have 10 days to complete this contest.
End of the submissions: Friday, October 19th - Midnight PDT (Los Angeles) [Thursday, October 20th - 9 AM GMT (Paris)]
A public vote will be held after the end of the submissions to decide who wins. Reward
I might be wrong, but Friday is not October 19th, that would either be Tuesday 19th or Friday 15th
Edit II:
Final...Fixed balancing, still not (and not meant to be) 100% symmetrical. Added destructible rocks to the middle ramps.
Uploaded on EU Servers, have fun. :)
The problem is: EventUnit() is the unit that enters the circle around your Mengsk Statue, not the statue itself.
I changed your map:
3 Arrays: Flags/CapturePoints, Regions, Structures to be converted as UnitGroup array; All have the same length. If you have an index, you know exactly which unit to change.
Note: The Index directly correlates in these arrays; Region 1, the capture point in Region 1, and the UnitGroup of Structures have index 0 in their array, and so on
To get this index i wrote a function that loops through all CapturePoints and returns the closest one.
UnitGetNearestFlagIndexOptions:FunctionReturnType:IntegerParametersflag=NoUnit<Unit>GrammarText:UnitGetNearestFlagIndex(flag)HintText:(None)CustomScriptCodeLocalVariablesretVal=0<Integer>loop_end=(numRegions-1)<Integer>i=0<Integer>ActionsGeneral-Foreachintegerifrom1toloop_endwithincrement1,do(Actions)ActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Distancebetween(Positionofflag)and(Positionofflags[i])) <= (Distance between (Position of flag) and (Position of flags[retVal]))
Then
Variable - Set retVal = i
Else
General - Return retVal
ps: The parameter "flag" is misleading, its not the flag, its the event unit...that one which enters the region
A first step for a stand-alone conversion software would be a detailed specification of the input format (MDL/MDX) and the output format (M3).
All links i found were deleted or moved.
Note: This function iterates through all regions of the entire map; will be faster if you store all regions in an array; however, this would require the map makers who use your code to change exactly this array...
I even have a mechanism for sniping and capturing vehicles, but thats far from perfect... :>
Another issue:
I used a bunch of UnitGroup Actions, but these are really slow, you might encounter performance issues depending on how many triggers use them.
0
Please stick to the "terran fights invading zerg" concept instead of "play god and shoot random dudes"... Part from that i suggest a coop mode, where 1 player has to protect the convoy from above, another one is manning the cannon on the convoy itself and maybe a third one which operates an anti air cannon to defend (though i dont know if there are skybox textures at all to make it look good)
0
@YnScription: Go
Its far easier:
0
@BasicGear: Go
0
"A brand new SCV!"
0
@onedaysnotice: Go http://www.tomshardware.com/reviews/build-a-pc-overclock-components,2735.html
you may skip the overclocking part, you could even downgrade to a GTX460
0
@FuzzYD: Go The idea is nice. you could also setup an aura, that applies an effect that kills a unit after a certain time if the player does not move out.
0
@Titanium321: Go
I'm just curious, how is the anti camping zone designed? Just like a general "no-go" zone, where you get squashed after a certain time? Or do you want to prevent players from staying in the same spot all the time? A problem with your anti-camp design could be: Player A enters zone->timer started. Timer running out in 3..2..1..Player B enters zone...0. Player B caught for being in the wrong place at the wrong time.
For general anti camp stuff you could work with the "Unit Becomes Idle" Triggers. For example set a marker of the units current zone/point in an idle candidates list and use a global timer to check periodically, whether your idle candidates left the zone/moved at least X from the initial point. Or just start a trigger when unit becomes idle, and set a position variable locally. Wait for X seconds and check again.
0
In this tutorial, I am going to show you how to create a Starcraft 2 texture for a custom tileset.
Prerequisites
Theoretical stuff
The SC2 Engine uses Deferred Rendering, that means instead of rendering an object one time for each light in your map, an object is rendered only once. To get the correct light result for more than 1 light, light information for each pixel are stored in the RGB channels of its texture, thats the base-map - the texture file (how much of a red/green/blue light would this pixel reflect).
With the base-map, we can make out terrain look colorful, but it still would look a bit flat. Bricks have cracks and other details...they are not even. To get more details into a simple texture, the Starcraft 2 Engine uses some kind of Bump Mapping. That means, on top of our base-map we project another texture, that contains information of the height of each pixel. Thats handy, but if we would rotate our map (or adjust time of day values to change the light) the lightning on a bump mapped surface would always bounce in the same direction. To get a nice lightning effect for each aspect, we need information for each axis we move (x,y,z). Thats what Normal Maps are for. Each RGB channel is a height map of our texture, where R=x-axis, G=y-axis, B=z-axis. If we would move in our scenery along the x-axis, the R channel of the normal map tells the engine how to adjust light reflection. Edges will have brighter values and reflect more light whereas cracks would be dark and start reflecting only at an extreme angle or not at all. SC2 Normal maps also have an alpha channel, that works as some kind of default bump map.
Getting started
Creating the Base Map
Creating the Normal Map
Importing / Data
Tips
Q&A
Thank You
Comments
Feel free to comment, add additional infos or report my errors. Right now I'm too tired, but I still want to figure out, how the minimap color works and there is still some formatting / additional screenshots to do.
0
Need something blueish!
Fading Realm (2)
Still some balancing issues to fix, mainly plateau sizes...
Edit:
I might be wrong, but Friday is not October 19th, that would either be Tuesday 19th or Friday 15th
Edit II: Final...Fixed balancing, still not (and not meant to be) 100% symmetrical. Added destructible rocks to the middle ramps. Uploaded on EU Servers, have fun. :)
0
@KewlCrayon: Go
have u tried the "Unit Is Created Trigger"?
0
The problem is: EventUnit() is the unit that enters the circle around your Mengsk Statue, not the statue itself.
I changed your map: 3 Arrays: Flags/CapturePoints, Regions, Structures to be converted as UnitGroup array; All have the same length. If you have an index, you know exactly which unit to change. Note: The Index directly correlates in these arrays; Region 1, the capture point in Region 1, and the UnitGroup of Structures have index 0 in their array, and so on
To get this index i wrote a function that loops through all CapturePoints and returns the closest one.
ps: The parameter "flag" is misleading, its not the flag, its the event unit...that one which enters the region
0
@NiNtoxicated01: Go
A first step for a stand-alone conversion software would be a detailed specification of the input format (MDL/MDX) and the output format (M3). All links i found were deleted or moved.
Maybe i find the time to dig into it
Edit: Just in case it will be moved again, I attached Magos' MDX Format Specification; http://home.magosx.com/index.php?topic=6.0
0
@petrov1: Go actually I already played around with exact the same game type in mind.
Sorry for the wall of text, i miss some kind of spoiler tag Maybe you can use some of these scripts:
I even have a mechanism for sniping and capturing vehicles, but thats far from perfect... :>
Another issue: I used a bunch of UnitGroup Actions, but these are really slow, you might encounter performance issues depending on how many triggers use them.
0
dont make a square map... What you get:
just my suggestion :)
0
Currently the best AI would be Behemoth with its micro extended to the other races and Mimics macro, copying build orders and always "learning".
Oh and I'd like to point out, that a fair fight against Behemoth isn't even possible at this stage, since it has view over the entire map.