Staredit Network > Forums > > Topic: Active Copy Edits
Active Copy Edits
Aug 21 2009, 6:56 am
By: DT_Battlekruser  

Aug 21 2009, 6:56 am DT_Battlekruser Post #1



If you are done with an article for the current issue, please post it in this thread. Articles will be periodically deleted as they are sent to press, so this thread will serve as a list of pending articles.

I will work with authors to copy edit their articles via editing the post with the article. The author will then have edit privileges to make the copy edits and/or discuss them. (For anyone who doesn't know, copy editing is editing for spelling, grammar, syntax, etc.).

Copy edits will be made on one of two ways:
(1) Outright. In writing for a publication, you accept that your work is subject to change at the discretion of the editor. I will make trivial wording and spelling changes without leaving a note.
(2) By comment. I will leave a footnote with a number and a comment. You may change the original text to reflect your change, but leave the number. Also comment below the footnote. See the first article in this thread for an example of how to work through the copy-editing process.

Articles only in this thread; please do NOT post replies remarking on articles.


Post has been edited 1 time(s), last time on Aug 23 2009, 3:49 am by DT_Battlekruser.



None.

Aug 21 2009, 1:44 pm Kaias Post #2



Copy editing nearing completion. Article will be sent to press soon.

Location Grids
by Kaias


The following article entails an in-depth explanation of the largely obscure location grids1. It is both long and long-winded, but if you stay with me you may end up learning a thing or two. It is my hope that at least someone benefits from this knowledge in furthering his or her understanding of Starcraft and the potential it can have despite its many, many limitations.

Put briefly, a location grid is a type of grid system that can place a location anywhere within where the system is built2. It utilizes certain Starcraft mechanics in offsetting locations of variable length to create a grid of built-in resolution and set dimensions3. In order to understand and create a location grid one should be well versed in the Starcraft4 mechanics of location centering, trigger order and unit priority. It is also crucial to understand the concept of centering a location in another - when Starcraft attempts to center a location on a unit in a location and no such unit exists instead it places that location in the center. Whenever a location is centered in another, it is implied that it is done by centering on a nonexistent unit; I like to use Map Revealers because it is impossible for them to exist inside a location.

How It Works
If a location is centered anywhere that would place its borders outside of the map boundaries Starcraft shifts or 'slides' the location back into map boundaries until the location no longer violates the map borders. A location grid merely uses this concept of sliding to get the middle of many location lengths to many specific lengths from the map border.

In the image below, three locations are being centered on a Goliath - one being 5x1 tiles, one 9x1 tiles, another 13x1 tiles - and a Wraith is killed at each. Because the Goliath is too close to the right border, all three locations are being offset a specific distance from the right border of the map. As long as the Goliath is close enough to the border, the locations will always center that distance from the edge.


Now suppose the objective was to create a Hydralisk at a six tile distance from the left border of the map. Because units are created in the center of locations, a location twice the desired distance would be required to place the center where it is needed - in this case, a location 12 tiles wide. In the example shot a burrowed lurker is used to hold the vertical coordinate to center the 12x1 location on.


The basic concept of a location grid is to use sets of these locations to center at desired distances both vertically and horizontally. Two main parameters need to be identified in creating any grid:
1. How much area do I want to cover with my location grid?
2. To what definition, or resolution, do I want to make my location grid?

The answer to both questions will be limited by map resources: locations, space, and units. In case you aren't aware, a Broodwar map has a limit of 255 locations (including the preset location "Anywhere").

Pure Location Grids
Pure location grids use these location sets to center for both X and Y axis offsets. In a pure location grid, the map is divided into 4 equal quadrants and a location placed in each corner.


Let's say our map dimensions are 10x10 tiles and we want a location grid that can place units within a one tile definition, or resolution. This would mean that within the 10x10 tile map the grid would be defined to one tile and the grid could place a location in the center of any tile. In Scmdraft this is equivalent to the normal grid- Hotkey Alt G; if we wanted a resolution output of a 1/2 tile it would be equivalent to the fine grid- Hotkey Alt F5. Whatever resolution/definition you decide on will determine the length difference between your location grid axis locations. Because it is the center of the location that we want to distance properly, whatever definition we pick (in this case one tile) will have to be added to either end of each progressively long location to cover the axis. So in the case of the 10x10 dimension map and 1 tile definition, each progressive location will be 2 tiles wider than the last. The image below shows this



The first map in the image shows the locations needed to cover the x-axis, spread out to display the difference in distance between their middles - 1 tile, the definition we desired. The second section in the image shows the same for the y-axis, and the last shows the same locations stacked and offset from the bottom right corner- covering the bottom right quadrant. The wraith explosions denote the middle of each location, which as you can see, are all 1 tile distant. These axis locations can only cover half the map, thus the need for quadrants.

Now let's actually apply the pure location grid. Say our objective is to create a Goliath at coordinate (7,5) (the point of origin of my coordinates for the rest of the article will be from the top left with values more right being greater positive x and more down being greater positive y values). Applied to this situation (7,5) means seven tiles to the right of the top left corner, and five tiles down from it. In order to know which quadrant to use we need to see the actual numbers:


In this example, the top right quadrant covers x-values 1-5 and y-values 1-5; the top right quadrant covers x-values 6-10 and y-values 1-56 and so on. This places the desired coordinates (7,5) in the top right quadrant.


This diagram illustrates the actual process in placing the Goliath at the coordinates (7,5).
- Location 'x-04' is centered on location 'Top Right'
- General purpose location 'Main' is centered on location 'x-04'
- Location 'y-05' is centered on location 'Main'
- Location 'Main' is centered on location 'y-05'
- A Terran Goliath is created at location 'Main' for red player

How many locations will your location grid take? I've devised a simple equation to help us with that:
[# of locations needed to cover an axis] = ( [Axis length in tile units] / [Desired definition in tile units] ) / 2

Like I said, it's quite simple. This equation is just for one axis, however, and in a pure location grid both the x- and y-axes must have location sets. My example plugged into this equation is:
[# of locations needed to cover X axis] = (10 tiles / 1 tiles) / 2 = 5
[# of locations needed to cover Y axis] = (10 tiles / 1 tiles) / 2 = 5

The location total for the entire grid is given by the equation:
[locations for Y axis] [locations for X axis] 4 (four corners) 1 (general purpose) = [Total]

For the example:
5 5 4 1 = 15
For 15 locations we can put a location in the center of 100 different tiles.

Hybrid Location Grids8
A hybrid location grid combines the location grid concept and a static grid. Rather than aligning both axes with locations and dividing the map into quadrants, a hybrid grid exchanges one axis of locations7 with two rows of units on either side of the map. The idea is that these units hold the place of the X or Y values (depending on which axis is replaced) and can be centered on when needed. This method saves an entire axis of locations, allowing for a potentially higher resolution grid; however, for every location saved it requires four units, which, for large maps and high resolutions, can add up unacceptably fast.

For example, in a 256x256 dimension map, it would require all the locations in the map to do a 1 tile definition pure location grid. With a hybrid location grid, you could save half of those locations but use up 512 units; with the extra locations you could double the resolution of the grid to a half tile definition (which would take up 1024 units).

In the hybrid location grid the objective is to create 2 columns (or rows, depending on which axis of locations you're replacing) of unique units on either side of the map. For example purposes I am going to be replacing the Y axis of locations with two columns of burrowed units owned by various neutral players.

The map is now divided into two halves, rather than the four quadrants of the pure location grid. The units allow centering the x-locations anywhere within the defined y-axis; the left column allowing you to reach the left side of the map and the right column allowing the right side of the map to be reachable.

Now suppose we wanted to explode a wraith at coordinates (3,9) (using the same reference from before - top left corner being the origin). First we have to decide which half of the map (and thus which column of units) we need to use. Fortunately, this is much easier to decide than in the case of the pure location grid; for our example 10x10 dimension map x-values between 1 and 5 use the left column and x-values between 6 and 10 use the right column.

First we center the y-column location on the appropriate set of units (left column in this case). The purpose of the y-column is to center on the correct set of unique units. Then we center the appropriate x-location on the appropriate y-holding unit. In this case, the appropriate x-location is, of course, x-03 (for 3 tiles to the right) and the appropriate y-unit is a player 9 hunter killer (you can't tell from the image since it happens to be burrowed).

- Location 'Y column' is centered on location 'Top left'
- General purpose location 'Main' is centered on Hunter Killer owned by player 9 at 'Y column'
- Location 'x-03' is centered on location 'Main'
- Location 'Main' is centered on location 'x-03'
- A Terran Wraith is created and killed at location 'Main'

Location Shifting
For the cost of one more location, the unit cost of a hybrid location grid can be effectively halved. This is accomplished using the technique location shifting; from the SEN wiki article:9

"Location shifting is a technique used to shift locations directly to either the left or top side of the map from its current position. It is done by centering a location twice the width of the map (for left shifting) or twice the height of the map (for top shifting) on the location you wish to shift and then centering that location on the shift location.

When a location is centered beyond the bounds of the map Starcraft 'slides' that location back into the map boundaries. Starcraft first checks if the left and top boundaries are exceeded and then the bottom and right boundaries; because a left shifting location is twice the width of the map it first violates the left border (and is slid back into the map) and then violates the right map boundary (and is then slid back into the map from the right side). This sliding places the middle of the left shifting location directly on the left border of the map."




This idea is important because using it we can remove the entire left column in the hybrid location grid (or, if your axis of units is along the top and bottom you can remove the top row). Rather than accessing the left half of the map through the left column, the left shift location is centered on the appropriate y-unit and the appropriate x-location then centered on the left shift location. Here is a depiction of this in action:

- Location 'Y column' is centered on location 'Top right'
- Location 'Main' is centered on Hunter Killer owned by player 9 at 'Y column'
- Location 'Left Shift' is centered on location 'Main'
- Location 'x-03' is centered on location 'Main'
- Location 'Main' is centered on location 'x-03'
- A Terran Wraith is created and killed at location 'Main'

Some call it magic, some call it the Hybrid Location Shifting Grid.


Application
The uses of a location grid are vast as it grants the ability to place a location anywhere within the defined parameters. The disadvantage of locations grids is the obvious large location requirement; however, if you do have a location grid it is unlikely that you'll need too many other locations.

The map Elementa, by Lethal_Illusion, is the perfect example of the power of location grids. It employs a hybrid location grid with a 2 pixel definition (there are 32 pixels in a tile) covering two 20x12 areas (the size of the screen). By sliding locations across the playing field using the location grid, it can scan the coordinates of two defilers, two dark swarms, order the two different computer defilers to mirror the exact replica location of the players across the two screens and create the effects for each of the player's spells dynamically across the screens. Lethal Illusion uses the player and swarm coordinates retrieved from the location grid coordinates and runs a line calculation which generates a coordinate to place each successive frame of any spell in action. A system takes this coordinate and places a location with the location grid to wherever the input coordinate describes.

In Closing
Location grids were first implemented by (U)Bolt_Head and further developed by Fishgold in his work on the map Pointer (v1 and v2). The idea was taken another step forward in the development of Microscan, by Fishgold, which first used the concept of sliding locations across the map to scan the location of a unique unit. Lethal_Illusion further did his part in the modernizing the location grid with the first hybrid location grid. He also made the first pixel definition grid and introduced Location Shifting.

Location grids have come a long way over a very long time. Unfortunately, they don't see the light very often as they are relatively complex. With some luck this article will have alleviated some of this.

1'Location Grids' or 'location grids' - make up your mind.
Kaias: Addressed; made it an improper noun throughout the article
2Where what is built? I think this is unclear.
Kaias: Perhaps 'designed by the creator'' would better replace 'built'; I'm unsure if that would properly address your concern, however. Initially the sentence was more clear but rather long-winded and not 'put briefly'
DTBK: Ooh, I see what you are trying to say. It isn't obvious that 'it' refers to 'system' - I initially thought that it was talking about locations being built. Just replace the last it with 'the system' or something.
Kaias: Alright, done.
3Plural noun is awkward - 'size'?
Kaias: Check the updated sentence and tell me if it is at all better
DTBK: Better.
4(1) 'well-versed in the Starcraft mechanics' (2) I'm going with 'Starcraft' %u2013 either way it needs to be standard.
Kaias: I've made it uniform and added 'the'
5A resolution of what? This sentence sort of trails off into nothingness with the parantheses.
Kaias: I don't know how to make that any clearer. Suggestions?
DTBK: I don't really know what you are trying to say.. try rephrasing it down here. By "a tile resolution" do you mean "a one tile resolution"?
Kaias: Read the area again and see if my changes clear it up.
DTBK: Much better. I'll try and finish editing today.
6I think by this point 'and so on...' will suffice.
Kaias: Agreed. >>changed
7Could you give a pass at rephrasing this sentence? It's a little unwieldy as written.
Kaias: Try it now.
DTBK: Much better and very straightforward.
8A general question: for this system, why are top-left and top-right corner locations needed in addition to your y-column location? Couldn't you just use a "left column" and "right column" location set and save one location?
Kaias: The answer to that is the same as the reason why I bother using the 'Main' location at all. Technically you could forgo it completely. The reason why I show that, however, is that for system purposes, using the general location helps reduce a lot of trigger weight. Say you wanted to make a system that automatically output a location based on input death count coordinates; centering on the correct Y unit with general purpose location 'Main' and then centering the correct X location on 'Main' is enormously fewer triggers than manually having a trigger for each X and Y combination. Rather than having to trigger centering on Y units for 2 different locations, you may as well just do it with one that you move around for such a system. However, I never went into details into creating such a system because I thought that would be a bit much for one article once I got there.
DTBK: Sure, it's your article. I was just more curious than anything else.
9Consider restructuring this. This is should be publishable as a hard-copy edition too, so links might not be possible.
Kaias: Restructured
DTBK: Better. I'll speak with our Layout Manager on what we can do about formatting. Especially the animated GIFs since they are so helpful. I wish you luck in getting the published - or rather, luck that a magazine will eventually get published.

Post has been edited 11 time(s), last time on Aug 23 2009, 7:28 am by DT_Battlekruser.



None.

Aug 26 2009, 1:41 pm Biophysicist Post #3



1
by TassadarZeratul

StarCraft UMS mapping takes a game and uses it to create an entirely new game. This is a widely known and accepted practice. There is, however, a much less widely known and accepted practice that has similar aims but can accomplish things nigh impossible with mapping. This practice is known as "modding", and involves the creation of "mods", little programs which modify Starcraft to create new games.

A mod is simply a set of data files that can be used to temporarily overwrite portions of Starcraft. This can create all sorts of effects, from changing a Marine's weapon to changing the way mining works to converting the Zerg into a demonic computer-controlled race hell-bent on destroying the universe. Other mods change Starcraft in other ways, such as converting it into an RPG of sorts or simply changing all the units so that the gameplay is substantially different.

With modding, there is very little that can not be accomplished, mostly having to do with things that are hardcoded into Starcraft. For example, it is impossible to give Spider Mines to any unit other than a Vulture or hero Vulture. For the most part, there are workarounds to these hardcoded things. For example, if you wanted a Wraith to have Spider Mines, you could give the Wraith Stim Packs instead, then detect when it uses Stim Packs and spawn a Spider Mine under it.

So what can one do with modding? Almost anything one wishes. You can rearrange the tech trees, give units spells or remove spells from units, change what units buildings can produce, or make even more drastic changes, up to and including changing the game from an RTS to some other game type. With modding, the sky is the limit.

1Title needed
TZ: :hurr: Can't believe I forgot that, I'll try to think of one.


Written in about 10 minutes. :P I don't exactly know how to go about writing this type of article, so it might be crap, in which case I apologize for wasting your time.

EDIT: Think I should mention modcrafters.com in the article somewhere?
DTBK: I don't really see the purpose of this article, but that's not my job to address. No, I don't see a need to mention one specific website.
TZ: I was going to mention Modcrafters so people know where the community is. The purpose of this article is to basically make people aware that modding exists and what you can do with it, like CAFG asked for.
DTBK: Well, I'm not much up with the times, but it seems presumptuous to state that 'the' community is at a specific website. As far as I know, we still try to be a home for modding. I would have thought people know what modding is, bet meh :P
TZ: Modcrafters is the most active modding site that I am aware of. Actually, I suppose people could just google "starcraft modding" and MC/SEN will come up, so maybe it's not necessary. It doesn't really seem like people know what modding is based on the low number of modders.

Post has been edited 6 time(s), last time on Aug 27 2009, 8:15 pm by TassadarZeratul.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[05:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[05:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
[2024-5-06. : 3:04 am]
Ultraviolet -- Vrael
Vrael shouted: I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
With the modern EUD editors, I don't think they're calculating nearly as many offsets as you might imagine. Still some fancy ass work that I'm sure took a ton of effort
[2024-5-06. : 12:51 am]
Oh_Man -- definitely EUD
[2024-5-05. : 9:35 pm]
Vrael -- I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
[2024-5-05. : 9:35 pm]
Vrael -- that is insane
[2024-5-05. : 9:35 pm]
Vrael -- damn is that all EUD effects?
[2024-5-04. : 10:53 pm]
Oh_Man -- https://youtu.be/MHOZptE-_-c are yall seeing this map? it's insane
[2024-5-04. : 1:05 am]
Vrael -- I won't stand for people going around saying things like im not a total madman
Please log in to shout.


Members Online: jjf28, RIVE, jun3hong