You must be logged in to post messages.
Please login or register

AI & RM Scripting
Moderated by Sebastien, Leif Ericson

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: RMS Border Bugs EXPOSED
posted 11-21-15 07:36 PM CT (US)   
Thanks to Local Boi’s thread I decided to investigate the issue of border-related crashes. It’s more extensive and complicated than I first presumed. Here are my findings:


>All of this only applies to border-attributes for player lands. Non-player lands never crash due to border attributes (unless you do something obviously wrong like set all of them to be 50 or greater at the same time).


>This seems to apply to all versions of the game (tested in HD 4.5 and UP 1.4). It is not exclusively a scenario editor effect.


>Using only top_border on its own will cause crashes. Using top_border as a value greater than 0, while all the other borders are 0, will also cause crashes. The greater the value, the more frequent the crashes.
Example:
left_border 0
right_border 0
top_border 20
bottom_border 0
May CRASH


>Using all borders at the same non-zero value will not cause crashes.
Example:
left_border 25
right_border 25
top_border 25
bottom_border 25
Will NOT crash


>Using bottom_border on its own causes a different kind of issue, which is best illustrated with screenshots (see figure 1).
As you can see bottom_border fails to properly constrain players (but not their lands) when used on its own.


>Using left_border and right_border on their own causes the fewest issues, although it does force players towards the top of the map as shown in the screenshots in figure 2.


>Now let’s look at these effects in combination with each other.
Example:
left_border 30
right_border 30
top_border 0
bottom_border 0
See figure 3
So left+right together behave exactly the same as they do individually.


>The “bottom_border bug” is compensated for by using a left or right border because the left/right bug pushes players in the opposite direction (up).
Example:
left_border 60
right_border 0
top_border 0
bottom_border 60
See figure 4


>Similarly, the top_border crashes are eliminated by having a sufficiently large left or right border:
Example:
left_border 25
right_border 0
top_border 25
bottom_border 0
Does not crash – See figure 5


>The top_border crashes are eliminated by also having a bottom_border. However, the bottom_border bug remains.
Example:
left_border 0
right_border 0
top_border 35
bottom_border 35
See figure 6


>HOWEVER, if the bottom_border is significantly smaller than the top_border, then it can cause crashes. This appears to happen when player lands are pushed beyond the (bottom) confines of the map by the combined action of the top_border and an insufficient bottom_border.
Example:
left_border 0
right_border 0
top_border 35
bottom_border 10
Sometimes CRASHES


>Using borders that clash with each other causes the lands to not appear, but the player will still spawn. Surprisingly, it doesn’t crash. If you go slightly over 50, they form two nice lines. However, going too far causes the nice lines to break down and become messy and unpredictable.
Example – see figure 7
left_border 55
right_border 55
top_border 0
bottom_border 0
Example – see figure 8
left_border 70
right_border 70
top_border 0
bottom_border 0
Example – see figure 9
left_border 90
right_border 90
top_border 0
bottom_border 0


>Doing this with top/bottom nicely illustrates the bottom_border bug:
left_border 0
right_border 0
top_border 50
bottom_border 50
See Figure 10


>Overlapping 3 borders works, however if you do all 4 it will crash:
left_border 50
right_border 50
top_border 50
bottom_border 50


I could go on, but everything seems to follow the basic patterns I’ve established:
>left and right borders force player starts (but not the lands themselves) upwards.
>The bottom border is “leaky” and still lets players (but not the lands themselves) generate past its border cutoff.
>Due to the behavior of the bottom border, the top border is capable of causing crashes when it pushes players beyond the confines of the map.
>All of these effects are additive and their magnitude depends on the magnitude of the border.
>The left/right effect can negate the up/down effect and thus prevent crashes.


How to avoid crashes:
>Never use top_border in isolation for player lands
>Using any one of right/left/bottom along with top will prevent crashes, as long as it has the same or a greater magnitude as the top_border.
>Don’t set all four borders to 50 or greater at the same time.

Conclusion:
Well, this turned out to be more complex than I thought, but at least I think I understand what is happening and can tell you how to reliably avoid crashes. Perhaps I should polish this up and turn it in to a university article.

If you have any insights into these border issues, please post them

Figures:

......../\
......./ / / \ Check out my Blacksmith submissions as well as my Random Map Scripts.
....../ / /\\ \
...../ /_/_\\ \ Proud guardian of the Definitive Random Map Scripting Guide
..../_____\\\ \
....\\\\\\\\\\\\\/ and the Random Map Scripting Links and FAQ thread.

[This message has been edited by Zetnus (edited 11-21-2015 @ 07:45 PM).]

Replies:
posted 11-29-15 03:08 AM CT (US)     1 / 1  
Interesting. it is a bit late for me so ill just share my old theory which remained untested: I theorized player placement could be hardcoded to place players in a circle or oval, based on behavior or top and bottom border. i did top and bottom border something, and did experience players repeatedly spawning on bottom border. so it was leaking as you say. if i took right and left borders, i could fix the bottom border leak, by forcing players to spawn in a circle with right left border bottom border seemed fixed

But all your experiments with tight and left border seem to be much more existential, extensive than mine

that was my theory anyway. im not good with geometry so ill just leave it at game draws a circle and i thought top border just moved the circle. Right and left borders contradict my theory, which is interesting as i always used top and bottom, not thinking there was a bug with them

some questions

Why does right and left border move player spawns towards the top border?
Why does bottom border leak?

USA
katsup or mustard

[This message has been edited by local boi (edited 11-29-2015 @ 03:23 AM).]

Age of Kings Heaven » Forums » AI & RM Scripting » RMS Border Bugs EXPOSED
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Kings Heaven | HeavenGames