• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Vertex Coloring System Project

Status
Not open for further replies.
Level 9
Joined
Jul 1, 2005
Messages
393
If anyone wants to help out, you can contribute your favorite color(s) to the code!

Redefining the Project parameters:

Vertex coloring, color objects with a hexidecimal code.
Defined vertex range properties any dark red in hex code is considered "dark red" any lemon yellow in hex code is considered "lemon yellow"
Create recipes from the defined properties "dark red, lemon yellow" and have these recipes produce specified bonuses.

Probably all of down right impossible for most to understand, and probably won't get any help at all.

I have all of the colors I can think of. My next step is to build all of this into a library, but how?

JASS:
//Zero properties
	rmin = 0	//initial minimum value of red
	rmax = 0    //initial maximum value of red
	gmin = 0	//initial minimum value of green
	gmax = 0    //initial maximum value of green
	bmin = 0	//initial minimum value of blue
	bmax = 0    //initial maximum value of blue

//define property of Blood 
	bloodrmin = 130	//initial minimum value of red
	bloodrmax = 215    //initial maximum value of red
	bloodgmin = 0	//initial minimum value of green
	bloodgmax = 45    //initial maximum value of green
	bloodbmin = 0	//initial minimum value of blue
	bloodbmax = 45   //initial maximum value of blue


//define property flamingo
	flamingormin = 245	//initial minimum value of red
	flamingormax = 255    //initial maximum value of red
	flamingogmin = 200	//initial minimum value of green
	flamingogmax = 235    //initial maximum value of green
	flamingobmin = 230	//initial minimum value of blue
	flamingobmax = 240   //initial maximum value of blue


//define property of Pink 
	pinkrmin = 227	//initial minimum value of red
	pinkrmax = 255    //initial maximum value of red
	pinkgmin = 88	//initial minimum value of green
	pinkgmax = 129   //initial maximum value of green
	pinkbmin = 99	//initial minimum value of blue
	pinkbmax = 147    //initial maximum value of blue


//define property of Fushia
	fushrmin = 241	//initial minimum value of red
	fushrmax = 255    //initial maximum value of red
	fushgmin = 0	//initial minimum value of green
	fushgmax = 90    //initial maximum value of green
	fushbmin = 209	//initial minimum value of blue
	fushbmax = 244    //initial maximum value of blue


//define property of Red
	redrmin = 247	//initial minimum value of red
	redrmax = 255    //initial maximum value of red
	redgmin = 0	//initial minimum value of green
	redgmax = 52   //initial maximum value of green
	redbmin = 0	//initial minimum value of blue
	redbmax = 29   //initial maximum value of blue

//define property of Orange
	orangermin = 235	//initial minimum value of red
	orangermax = 255    //initial maximum value of red
	orangegmin = 111	//initial minimum value of green
	orangegmax = 133    //initial maximum value of green
	orangebmin = 0	//initial minimum value of blue
	orangebmax = 26    //initial maximum value of blue

//define property of Apricot
	apricotrmin = 242	//initial minimum value of red
	apricotrmax = 254    //initial maximum value of red
	apricotgmin = 167	//initial minimum value of green
	apricotgmax = 194    //initial maximum value of green
	apricotbmin = 82	//initial minimum value of blue
	apricotbmax = 107    //initial maximum value of blue

//define property of Amber
	amberrmin = 255	//initial minimum value of red
	amberrmax = 255    //initial maximum value of red
	ambergmin = 98	//initial minimum value of green
	ambergmax = 110    //initial maximum value of green
	amberbmin = 0	//initial minimum value of blue
	amberbmax = 41    //initial maximum value of blue

//define property of Brown
	brownrmin = 104	//initial minimum value of red
	brownrmax = 170    //initial maximum value of red
	browngmin = 51	//initial minimum value of green
	browngmax = 87    //initial maximum value of green
	brownbmin = 0	//initial minimum value of blue
	brownbmax = 50   //initial maximum value of blue

//define property of Gold
	goldrmin = 196	//initial minimum value of red
	goldrmax = 220    //initial maximum value of red
	goldgmin = 142	//initial minimum value of green
	goldgmax = 170   //initial maximum value of green
	goldbmin = 18	//initial minimum value of blue
	goldbmax = 85    //initial maximum value of blue


//define property of Lemon
	lemonrmin = 239	//initial minimum value of red
	lemonrmax = 255    //initial maximum value of red
	lemongmin = 255	//initial minimum value of green
	lemongmax = 255   //initial maximum value of green
	lemonbmin = 137	//initial minimum value of blue
	lemonbmax = 178    //initial maximum value of blue


//define property of Brulle
	brullermin = 255	//initial minimum value of red
	brullermax = 255    //initial maximum value of red
	brullegmin = 234	//initial minimum value of green
	brullegmax = 254   //initial maximum value of green
	brullebmin = 179	//initial minimum value of blue
	brullebmax = 198    //initial maximum value of blue

//define property of Goldenrod
	goldenrodrmin = 236	//initial minimum value of red
	goldenrodrmax = 255    //initial maximum value of red
	goldenrodgmin = 174	//initial minimum value of green
	goldenrodgmax = 202    //initial maximum value of green
	goldenrodbmin = 0	//initial minimum value of blue
	goldenrodbmax = 40    //initial maximum value of blue

//define property of Huntergreen
	huntergreenrmin = 0	//initial minimum value of red
	huntergreenrmax = 0    //initial maximum value of red
	huntergreengmin = 50	//initial minimum value of green
	huntergreengmax = 99    //initial maximum value of green
	huntergreenbmin = 0	//initial minimum value of blue
	huntergreenbmax = 0    //initial maximum value of blue

//define property of Green
	greenrmin = 0	//initial minimum value of red
	greenrmax = 0    //initial maximum value of red
	greengmin = 100	//initial minimum value of green
	greengmax = 163    //initial maximum value of green
	greenbmin = 0	//initial minimum value of blue
	greenbmax = 0    //initial maximum value of blue

//define property of Limogreen
	limogreenrmin = 0	//initial minimum value of red
	limogreenrmax = 0    //initial maximum value of red
	limogreengmin = 248	//initial minimum value of green
	limogreengmax = 255    //initial maximum value of green
	limogreenbmin = 0	//initial minimum value of blue
	limogreenbmax = 0    //initial maximum value of blue

//define property of Lime
	limermin = 133	//initial minimum value of red
	limermax = 182    //initial maximum value of red
	limegmin = 255	//initial minimum value of green
	limegmax = 255    //initial maximum value of green
	limebmin = 0	//initial minimum value of blue
	limebmax = 78    //initial maximum value of blue

//define property of Mint
	mintrmin = 133	//initial minimum value of red
	mintrmax = 182    //initial maximum value of red
	mintgmin = 255	//initial minimum value of green
	mintgmax = 255    //initial maximum value of green
	mintbmin = 79	//initial minimum value of blue
	mintbmax = 165    //initial maximum value of blue

//define property of Skyblue
	skybluermin = 139	//initial minimum value of red
	skybluermax = 200    //initial maximum value of red
	skybluegmin = 218	//initial minimum value of green
	skybluegmax = 255    //initial maximum value of green
	skybluebmin = 243	//initial minimum value of blue
	skybluebmax = 255    //initial maximum value of blue

//define property of Noonblue
	noonbluermin = 0	//initial minimum value of red
	noonbluermax = 65    //initial maximum value of red
	noonbluegmin = 0	//initial minimum value of green
	noonbluegmax = 57    //initial maximum value of green
	noonbluebmin = 219	//initial minimum value of blue
	noonbluebmax = 255    //initial maximum value of blue

//define property of Duskblue
	duskbluermin = 65	//initial minimum value of red
	duskbluermax = 100    //initial maximum value of red
	duskbluegmin = 0	//initial minimum value of green
	duskbluegmax = 0    //initial maximum value of green
	duskbluebmin = 0	//initial minimum value of blue
	duskbluebmax = 234    //initial maximum value of blue


//define property of Indigo
	indigormin = 87	//initial minimum value of red
	indigormax = 110    //initial maximum value of red
	indigogmin = 0	//initial minimum value of green
	indigogmax = 0    //initial maximum value of green
	indigobmin = 201	//initial minimum value of blue
	indigobmax = 236    //initial maximum value of blue


//define property of Violet
	violetrmin = 147	//initial minimum value of red
	violetrmax = 200    //initial maximum value of red
	violetgmin = 0	//initial minimum value of green
	violetgmax = 0    //initial maximum value of green
	violetbmin = 179	//initial minimum value of blue
	violetbmax = 225    //initial maximum value of blue


//define property of Black
	blackrmin = 0	//initial minimum value of red
	blackrmax = 0    //initial maximum value of red
	blackgmin = 0	//initial minimum value of green
	blackgmax = 0    //initial maximum value of green
	blackbmin = 0	//initial minimum value of blue
	blackbmax = 0    //initial maximum value of blue

//define property of White
                  whitermin = 255	//initial minimum value of red
	whitermax = 255    //initial maximum value of red
	whitegmin = 255	//initial minimum value of green
	whitegmax = 255    //initial maximum value of green
	whitebmin = 255	//initial minimum value of blue
	whitebmax = 255   //initial maximum value of blue
 
Last edited:
Level 9
Joined
Mar 25, 2005
Messages
252
What do you want to use this with?
SetUnitVertexColor or strings or both?

How do you want the properties of these "recipes" to be computed from the colors they consist of? Why do you have a min and a max for every RGB value? Are they for randoming a value or do they have something to do with creating the recipes? When you create a recipe is there a way to define a weight for each color?

PS: If you want people to understand what your project is about you might want to use full sentences. Also imo that 10 page list would be better of inside hidden tags.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
I think using the JNGP's feature "text macros" is most appropriate for this.
Aide from that, putting it in a library is a sinch.
 
Level 9
Joined
Jul 1, 2005
Messages
393
Hidden tags? What do those look like? Are they hidden? hahahaha

But seriously. Thanks, I was having trouble thinking this morning.

What do you want to use this with?
SetUnitVertexColor or strings or both?

To answer Disciple.

SetUnitVertexColor sounds good, you see I want someone to be able to select a unit and type -set ###-###-###

That command will then set the vertex color of a unit.

I also want someone able to select a colored unit and type -set clone. Then click another unit and type -clone to copy the exact vertex color to a second unit.

This would be remembered until either someone typed -clear or -set clone.

The range exists to make the game easier on players, rather than require that they get the exact hexidecimal number, it gives them a broad 'hit' chance to get a defined color.

Each time the operation "SetUnitVertexColor" is used within a region then,
The recipe system looks at each object with player-specified vertex coloring sitting in a region.

Then it checks the library. If it finds a perfect match from the library then the region receives a special area bonus. Imperfect matches give no bonus, and if a region has a perfect match and new objects are vertex color changed and these are not also a perfect match with the previous perfect match then kill special area bonus.

Recipes are like the Color Kittens. Do you remmember the story of the Color Kittens? It was published in the 1970s by Golden books. The kittens found the color red, and they mixed red with white to make pink, and they discovered that the colors red and pink looked good together so one kitten painted all of his drawings red and the other kitten painted all of his drawings pink and they painted together that way for quite a while.

But then they got tired of that recipe, and one of the kittens opened up the color yellow and the other kitten opened the can of green. So then they started painting everything yellow and green, but the colors didn't match with the red or the pink at all, in fact it looked dreadful.

The recipe part I think, will be in the library, but I don't know how to set it up.

"text Macros" I'll look them up.

Is this what I was looking for?

JASS:
function SetUnitVertexColorBJ takes unit whichUnit, real red, real green, real blue, real transparency returns nothing
    call SetUnitVertexColor(whichUnit, PercentTo255(red), PercentTo255(green), PercentTo255(blue), PercentTo255(100.0-transparency))
endfunction
 
Last edited:
Level 9
Joined
Mar 25, 2005
Messages
252
Oh so when a player types a message you need to find out if the typed color, or whatever "recipe" it mixes into, matches any of the color definitions you have? That in itself is quite doable I think. You could have three parallel arrays holding the min and max RGB values of each color. When a player types a color you just search those arrays for a match. You could also have the data that tells you what bonuses the colors give in a fourth parallel array, so when you find a match you also know what bonus to give.

About the regions, do they form regular grids or are they just freely preplaced ones or maybe even dynamic? If they do form regular grids it would be easy to store the current color that is active for each of them, and also to find out in which region a given unit is standing in when a color message is typed.

Also what does the color of a region affect? I'd guess it determines the color of all units inside it, as well as adds buffs to them (the bonuses).

and yeah the SetUnitVertexColor native sets the color (including alpha) of a unit. All of its arguments take values from 0 to 255 so if that is the range of the inputs that players must type you don't even have to convert anything. Though I think it would be a good idea to allow players to type in hex too, as in FF00AA. I'm quite sure there are scripts at wc3jass.com that convert from hex strings into integers so it should be quite easy.

This text is in between hidden tags
 
Level 9
Joined
Jul 1, 2005
Messages
393
Oh so when a player types a message you need to find out if the typed color, or whatever "recipe" it mixes into, matches any of the color definitions you have?

YES!

That in itself is quite doable I think. You could have three parallel arrays holding the min and max RGB values of each color.

You could also have the data that tells you what bonuses the colors give in a fourth parallel array, so when you find a match you also know what bonus to give.

I want to write that but I don't know what it's suppose to look like.


About the regions, do they form regular grids or are they just freely preplaced ones or maybe even dynamic?

I don't know the difference between grids, preplaced or dynamic regions. Although I guess an example of grid would be Peppar's Chess, an example of preplaced would be any of the lava maze maps and dynamic would be Masa1's Survival 1.211.

I have a map with randomly placed Islands of different shapes and sizes where I have started placing regions on the different islands.

If they do form regular grids it would be easy to store the current color that is active for each of them, and also to find out in which region a given unit is standing in when a color message is typed.

Might be able to squish islands into a grid-like structure, map is in early stages. Would every square need to have an island? Could a grid that went A-J and 1-10 have islands at different coordinate sections, and could I not need to have them line up and be perfect squares but more random? With empty grid cubes?

Also what does the color of a region affect? I'd guess it determines the color of all units inside it, as well as adds buffs to them (the bonuses).

It would effect the Lure spell that spiwn is putting together for me, it would also have effects on how much an item sold for within the region, how much lumber bonus might be received with the sale, other effects would be lowered tax rate, increased tip rate, lowered incident rate, increased customer patience, increased Good Event rate, decreased Bad Event rate. All of these systems are not written or implemented.

It is not about a specific color doing one thing. It's about sets of colors, the stronger your color set. The more small bonuses you get access too. A single color set consisting of only one color is the weakest. A double color set (2 colors) is slightly stronger while a full color set (6 colors) is the strongest you can get. But also with colors you cannot have just one of each color to receive the bonus. I have been thinking about a tech tree but I do not see a way this could be done.

I'm quite sure there are scripts at wc3jass.com that convert from hex strings into integers so it should be quite easy.

Okay, at what stage of getting the whole system written would I need that?
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Stay on the topic - do it piece by piece.
First make this function/system, then the one for the combinations and all the rest.

About the regions when you make an Island make a region for it.

About the Lure, you just have to put a check for the buff as a condition (somewhere).
 
Level 9
Joined
Mar 25, 2005
Messages
252
I want to write that but I don't know what it's suppose to look like.


JASS:
library ColorStack initializer init
    
    globals
        private integer N = 0
        private integer array MinRed
        private integer array MaxRed
        private integer array MinGreen
        private integer array MaxGreen
        private integer array MinBlue
        private integer array MaxBlue
    endglobals
    
    public function Add takes integer minRed, integer maxRed, integer minGreen, integer maxGreen integer minBlue, integer maxBlue returns integer
        set N = N + 1
        set MinRed[N] = minRed
        set MinGreen[N] = minGreen
        set MinBlue[N] = minBlue
        set MaxRed[N] = maxRed
        set MaxGreen[N] = maxGreen
        set MaxBlue[N] = maxBlue
        return N
    endfunction
    
    public function Get takes integer red, integer green, integer blue returns integer
        local integer i = N
        loop
            if MinRed[i] <= red and red <= MaxRed then
                if MinGreen[i] <= green and green <= MaxGreen then
                    if MinBlue[i] <= blue and blue <= MaxBlue then
                        return i
                    endif
                endif
            endif
            set i = i - 1
        endloop
    endfunction
    
    private function init takes nothing returns nothing
        set MaxRed[0] = 255
        set MaxGreen[0] = 255
        set MaxBlue[0] = 255
    endfunction
    
endlibrary
When you define a color call the ColorStack_Add function with the values you want, and then use the integer it returns as an index to store the bonus data you want to arrays. When you later call ColorStack_Get with an RGB value it will return the index of the matching color, and you can then use it to retrieve all the data you stored. (0 is returned if the color didnt match) (I didn't test this or even run a syntax check but this is the basic idea I had in mind)

I don't know the difference between grids, preplaced or dynamic regions.
A chess board would be a quite perfect example of a grid, or the grid you can see in the world editor's terrain editor.

Would every square need to have an island?
Nope.

Could a grid that went A-J and 1-10 have islands at different coordinate sections, and could I not need to have them line up and be perfect squares but more random? With empty grid cubes?

There should be at most one region or island over one grid. You can have islands that go over many grids, but not grids that have many islands on them. The idea is that you could be able to find the island or region, or any data connected to it from a set of coordinates. The size of these grids should be big enough so that 8191 of them would cover the whole map. Though at map initialization you will need to store to each grid the information that later tells you what island they belong to, and that is something you will most likely need to do manually so having 8191 grids isn't very practical.
The storing can be done by simulating a 2D array, where the index of each grid is calculated from its coordinates, and that index is then used to store which island the grid belongs to.

Another option would be to track the movement of all units by detecting when they leave and enter regions, and store that information to the units. That might actually be the easiest thing to do in this case, except if getting the islands into grid cells won't be a problem.
EDIT: Appended: The more I think about it the more I feel that using a tracking system is a better idea than using grids.


It would effect the Lure spell that spiwn is putting together for me, it would also have effects on how much an item sold for within the region, how much lumber bonus might be received with the sale, other effects would be lowered tax rate, increased tip rate, lowered incident rate, increased customer patience, increased Good Event rate, decreased Bad Event rate. All of these systems are not written or implemented.

If you have that many different things happening you might want to store triggers or function objects to colors or color sets that would trigger whenever a color is applied to a region or a unit, and another object that is trigger when a color is removed from them. In those triggers you could do whatever actions you wish to do when a specific color takes effect, or perhaps just store the info about that color being in effect for later use. To achieve this kind of behavior you can't use the grid system but the movement tracking system instead.

It is not about a specific color doing one thing. It's about sets of colors, the stronger your color set.

Makes me wonder, does a set of blue and yellow equal to green or something stronger? Would there be any reason for a player not to go directly for green and get blue and yellow instead? (PS. these colors are just simple examples, I do see that you don't have them in your list)

Okay, at what stage of getting the whole system written would I need that?
You can write a completely working version of the system before even thinking about it.
 
Level 9
Joined
Jul 1, 2005
Messages
393
Makes me wonder, does a set of blue and yellow equal to green or something stronger? Would there be any reason for a player not to go directly for green and get blue and yellow instead? (PS. these colors are just simple examples, I do see that you don't have them in your list)

No, because I'm bringing my college expertise in on this. Blue and Yellow are bright and opposing colors that actually do not match at all. (I might add more colors later, NoonBlue is "Blue") Colors that are at 'war' seem to make the best icons in the art section, but a matching set they do not make.

But, to give you a few tidbits for helping. :)

A color combination of Yellow, Brulle, and Brown would be a medium strength set.

A color combination of sky blue and white would be a smallish strength set.

I cannot think of a 6 color off the top of my head, but a six color would be a radiant strength set.

A color combination of skyblue and white would fail in small numbers but not in large numbers.
15 units for each color would mean a successful buff. Total cost: 30 colored units, crammed onto one little island. Not to mention the cost of all that lumber.

But why do this when you might know about Yellow, Brulle, and Brown which only requires 8 colored units each? Total cost: 24 colored units.

Or a four color which only costs 4 colored units each. Total cost: 16 colored units.

Or a five color which only costs 2 units each. Totaling: 10 colored units.

Or a six color which only costs 6 colored units.

But also to make things 'easier' than having to guess sets of colors, there will be silent hints around the map in the form of colored doodads. But I wanted to make certain I had the code ready before I go dropping permanent doodads all over my map.

I was also going to make special non-matching pop-culture 'themed' sets that go to particular islands, and give an extra bonus for following the theme of the island. An example of a themed set might be "Matrix" consisting of bright green and black with the requirement of setting down decorative green runes.
 
Level 9
Joined
Jul 1, 2005
Messages
393
I have a question about this:

Another option would be to track the movement of all units by detecting when they leave and enter regions, and store that information to the units. That might actually be the easiest thing to do in this case, except if getting the islands into grid cells won't be a problem.
EDIT: Appended: The more I think about it the more I feel that using a tracking system is a better idea than using grids.

-----------------------------------------------------------------------------------

Presuming I go with the tracking system.

I also plan to let each player have other units on the map some of which may be entering and leaving shops.

Avatar, Harvesters, Gatherers, Builders. These are not meant to be affected by the system, would the system still try to track them?

------------

Why is a tracking system better than a grid? Is it tracking less things? Causing less lag?

Why would a grid be better than a tracking system?
 
Level 9
Joined
Jul 1, 2005
Messages
393
Just to make certain

Just to make certain I am not missing a vital step somewhere. This is a lot for me.

setup
Step 1: JNGP's text macros for importing color and creating arrays
array 1: Red
array 2: Green
array 3: Blue
array 4: Match for bonus

Step 2: Library
Step 3: Trigger for calling "ColorStack_Get" for retrieving information from library.

memory and recalling
Step 1: simulated 2D array with a grid index.
alternative Step 1: Track the movement of all units by detecting when they leave and enter regions, and store that information to the units

Storing requires alternative Step 1.
Step 1: Store triggers or function objects to colors or color sets that would trigger whenever a color is applied to a region or a unit, and another object that is trigger when a color is removed from them.
 
Level 9
Joined
Mar 25, 2005
Messages
252
Presuming I go with the tracking system.

I also plan to let each player have other units on the map some of which may be entering and leaving shops.

Avatar, Harvesters, Gatherers, Builders. These are not meant to be affected by the system, would the system still try to track them?

You can make it not to. Whenever the system detects that a unit leaves or enters a region it can check if the unit is not ment to be affected, and simply ignore it.

Why is a tracking system better than a grid? Is it tracking less things? Causing less lag?

Why would a grid be better than a tracking system?

A tracking system is most likely easier to implement, depending on the layout of your map though. It also allows you to have any code you want executed when units leave and enter regions that have bonuses, so you can apply those bonuses then. A grid system would simply be able to tell at any point of time within which island a given unit is in (tracking system can do this aswell, atleast if you want it to). As for performance, I don't think you should worry about either one of them.

As for those steps, they seem quite correct although I don't think that textmacros are really necessary atleast I don't know how they would help you to import the colors much.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
As for those steps, they seem quite correct although I don't think that textmacros are really necessary atleast I don't know how they would help you to import the colors much.
Yeah, with a function for setting up the values(like the one you have given) they will not help much.
But they will be faster though - like a ms maybe ;)
 
Level 9
Joined
Jul 1, 2005
Messages
393
hmm not sure what you mean by 'layout of my map'

It has 0 doodads, 70 randomly placed islands grouped around a central island which is a central hub and prime spawning location. There are also bridges points where shallow water crosses land and I was going to set up walkway teleports at opposite ends of the bridge points.

6 of those islands are special 'sand bar' islands that require a ship to get to.

Here are some pictures.
 

Attachments

  • pic1.jpg
    pic1.jpg
    109.2 KB · Views: 83
  • pic2.jpg
    pic2.jpg
    48.2 KB · Views: 70
  • pic3.jpg
    pic3.jpg
    38.1 KB · Views: 76
  • pic4.jpg
    pic4.jpg
    47.9 KB · Views: 69
  • pic5.jpg
    pic5.jpg
    45.6 KB · Views: 71
  • pic6.jpg
    pic6.jpg
    47.7 KB · Views: 68
Level 9
Joined
Mar 25, 2005
Messages
252
Your islands are so random and close to eachother that both ways will take a lot of work since you will need many rects or grids to accurately cover the islands, but I believe the tracking system would be easier. With it you have to have 1 region for each island that covers that whole island. Since regions can be built from rects (which the Regions of GUI actually are) one way of doing that is to place several rects on each island with the Region editor so that combined they cover each one completely, and then create a region for each island to which you add the rects that belong to each one.

Now that I'm looking at those pictures I came up with a third option which is quite the same as the tracking system except that it would use circles instead of rects. You would have one island consist of one or more circles and define each of those circles in JASS, their center coordinates, radii and which island they belong to, and periodicly check which units are in which circle and thus which island the units are in.

Btw are there any islands or places that won't have bonuses? If not then it would simplify the code a bit.
 
Level 9
Joined
Jul 1, 2005
Messages
393
All islands on map start are not controlled by any players, Players must pick out which island(s) they want. (kind of a land rush thing, although I was thinking of just having little question marks they can click on to decide on an island property.)

The central hub island can never be controlled. Also surrounding the islands is a land mass for the home bases of each player. These areas provide a safe area to store extra supplies, create manufacturing processes and create their own orchards or farmlands.

Lastly, the area surrounding the players is a great and wild mystic forest, within it random raw material items and magical beasts lie to be found. These items can be sold to the grand bazaar (central hub) to temporarily increase the rate of that products available for sale from the grand bazaar, and reduce their overall cost, until another player buys them up.

Very much a 'trade wars' game intended for hours long play, I'm not sure where to bring in the conflict & interest. Thinking about it now, I might later add special offensive/defensive units to attract customers or even block the Lure spell from affecting locals.

I was going to try something very special with the loading screen to create greater interest, a general feeling of conflict and pull people into the story of the map. But that would definitely be in a later stage, after the map moves out of beta. (map in alpha)
 
Status
Not open for further replies.
Top