terraforming / unit placing bug

Started by florrat, October 11, 2013, 02:14:59 AM

Previous topic - Next topic

4xC

Hallelugiah!!  ;D

That is exactly what I have brought up months ago during beta, but our superiors just let it slide as though it meant diddly squat. You have no idea how many reactors I had to kill to even the corners to make my farms more symmetric.
C,C,C,C

Grauniad

Quote from: Nephthys on October 31, 2013, 11:29:11 PM
I tried terp-ing it again just to make sure, but never could get a Bertha in that PZ. I used a mortar instead.

Attached is the final autosave, so I hope that is what you are looking for. But you can't make fun of my over-building!   

(Well, you can just not in public please.  :)  )




OK, can you please double-check your attached file? I get this in-progress game when I download and open that file. Does the save look familiar? Did you accidentally provide the wrong save or is there a bug we've uncovered here?
A goodnight to all and to all a good night - Goodnight Moon

Nephthys

Sorry about that. I verified the date & time it was saved so it should be correct. I'm confident you'll find I missed something & that there really isn't a problem with the map.  :)

Grauniad

#18
You're right... :)

Along the lines of the snooty server asking a customer "how did you find your steak, sir?" and the customer reply: "Easy, I just moved a french fry and there it was!"

All I did was to move the mortar and build the Bertha there. :)
A goodnight to all and to all a good night - Goodnight Moon

jsmith45

Quote from: florrat on October 11, 2013, 02:14:59 AM
Hi,

Why are the rules for being able to place a unit at a certain location so weird? Suppose you want to place a unit in on position x in the small diagram below (where each character is a small cell, so a unit has size 3x3)


.....
.....
..x..
.....
.....

Let's give some places a letter, so that I can talk about them easier.

.c.c.
cbabc
.axa.
cbabc
.c.c.

Now if I'm correct you can place a unit at the x-cell if and only if the following four conditions hold
(1) all a-cells have the same height as the x-cell
(2) all b-cells have the same or lower height than the x-cell
(3) if a b-cell has lower height than the x-cell then the adjacent c-cells must have different height than the x-cell
(4) if either b-cell on the left has lower height than the x-cell, then the adjacent c-cells cannot have both the same height, which is larger than the height of the b-cell.
Those rules are correct for 3x3 units, except that you forgot to mention that walls, void, or teraform numbers on the x-cell, a-cells, or b-cells prevent placement.
Quote
To illustrate this, you can move or build any (non-titan) unit on the cells of height 2 in the following diagrams:

33333     11111     21212     33333
32223     11211     11211     11213
32223     12221     22222     12223
32223     11211     11211     11213
33333     11111     21212     33333

But you can't move or build units in in the following diagrams:

33333     11111     12121     33333
33233     11211     21212     31211
32223     12221     12221     32221
33233     11211     21212     31211
33333     12111     12121     33333

The first diagram violates rule 2, the second and third diagram violate rule 3 and the last diagram violates rule 4, even though it's the mirror image of the fourth allowed diagram!

Okay, so far I haven't talked about the bug yet, so far it is only highly counter-intuitive and overly complicated.

The rules can be stated much simpler than that. First you must understand that each cell has a both a height and a shape. See the lower portion of the attached image for the list of possible shapes. The shapes are numbered 0 through 9. (Zero is left unmarked on the image).  The shape of each cell is determined by the height of the cell, and the height of the cells to each of the four cardinal directions.

Whenever placing a unit, all of the cells must be the same height, and must have shape 0 (a normal flat tile). The four corners are the exception, they may have a different height, as long as they have shapes 1-4 in the corresponding corners (1 in the upper right, 2 in the lower right, etc).

That accounts for the first 3 rules you mentioned. Rule 4's asymmetry is rather odd. Virgil apparently overlooked the possibility that a single square might qualify to have both shape 1 and shape 3 or both shape 2 and shape 4. In that event what should happen is that the apparent (faux) heights of the two possible shapes be used as a tiebreaker. (I'm not sure if the lower or higher apparent height should win.) What currently happens is that the first shape found to apply is the one that is used. The order in which the shapes are checked are indicated in the corner of the attached image. Shape 1 comes before shape 3, so it takes precedence.

This results in certain symmetrical terrain layouts taking on decidedly non-symmetrical appearance. The middle of the attached image shows this clearly, with two variations on the same pattern.

The patterns at the top are just decorative.

Nephthys

Quote from: Grauniad on November 01, 2013, 05:53:35 PM
You're right... :)

Along the lines of the snooty server asking a customer "how did you find your steak, sir?" and the customer reply: "Easy, I just moved a french fry and there it was!"

All I did was to move the mortar and build the Bertha there. :)

LOL & SMH .     Makes me want to go back & try again, but it is such a small issue that I may not get around to it. Thanks for following up, though. At the risk of sounding obsequious, I really do appreciate all the time you've spent helping and teaching me about the game.