Those are simply rather large numbers. Numbers in the format 0x# are hexadecimal, meaning that 0-9 and A-F are valid digits. The numbers are, in order for 0x0200 to 0x0800:
512,
1,024, and
2,048. These numbers also carry a rather significant important in programming. The way numbers are stored in a computer is in the binary format, which is to say they are 1's and 0'. This came to be, in a nutshell, that 0 represented off and 1 represented on. The way binary works is that each "place", or bit, in a binary number is a power of 2, like so:
Now, you can see that basically every new bit goes up by 2. That's because binary has a base of 2. Similarly, the "normal" numbering system, Decimal, has a base of 10. Each bit to the left increases in value by 10.
Now, with programming, we can check each specific bit of a number to see if it's on (1) or off (0). That's where those nice, convenient numbers like 512, 1024, and 2048 come in. They're all one single bit in the binary number system. More specifically, they are 29, 210, and 211. Since they are all only one bit, we can also easily, and cleanly check if other numbers have those same places set to on. Now there's a few ways we can do this, but that's not really what you're asking for. What you need to know is that we're checking using AND, or a single &. (Note: two ampersands are used as a condition, i.e. this && that. A single ampersand is sued to check the digits in the number).
Now to how it all works in the game!
Well, this is the checkPassage function:
Code:
Game_Map.prototype.checkPassage = function(x, y, bit) { var flags = this.tilesetFlags(); var tiles = this.allTiles(x, y); for (var i = 0; i < tiles.length; i++) { var flag = flags[tiles[i]]; if ((flag & 0x10) !== 0) // [*]No effect on passage continue; if ((flag & bit) === 0) // [o] Passable return true; if ((flag & bit) === bit) // [x] Impassable return false; } return false;};
We want to concentrate on where it says
if((flag & bit) === 0) and
if((flag & bit) === bit. The AND bit check operator (&) will return a number where both the number on the left and right have the same bits set to on (1) in their binary representation. In order for vehicles to move over a tile, their special number (512, 1024, and 2048, remember?) must not be a part of the flag for the tile we're checking. If those bits in the number are set to on, then the (flag & bit) will return that number, not 0. If it returns that number, we can see above that this means that tile in particular is impassible.
Now, I know this is all very technical, but that's how it works. It's based on how numbers are stored in a computer, and the fact that we are able to see which bits are on in each number. It's through the comparison of the two numbers that we can determine which tiles are passable.
Anyway, I hope this helps you out!