Author Topic: vertical offset of ground tiles question  (Read 549 times)

Offline Alex_D

  • Colonel
  • ****
  • Posts: 271
    • View Profile
vertical offset of ground tiles question
« on: February 16, 2019, 09:38:30 pm »
I'm trying my hand into create new craft maps, and also learning MapView and MCEdit. For the test, I'm using the COPTER map (from X-COM Files) and OXCE. And I have a problem. See attached screenshot.

My idea is to have a ground starting tile that is offset by a bit. The offset cannot be more than 8 pixels or else the unit won't step back in. I used MCEdit to offset the tile up (8 pixels), it certainly does (green offset in the pic). I also manually drawn the tile by said offset and it also does it (purple offset in the pic). Yet when the game renders the tile, there is a black diamond or void where the ground texture should be. The tile needs to be made a floor tile in MapView, else (wall or object tile) the unit may not spawn on the tile.

I could try to make a wall tile that also occupy the same spot left by the void, but this color may contrast with the original ground tile if the craft lands on a different source map (example forest patch landing on desert).

Is it possible to have such starting ground tiles hovering slightly over the ground without the black rendering of the void ? Any workarounds other people may have used?

Offline bulletdesigner

  • Commander
  • *****
  • Posts: 516
    • View Profile
Re: vertical offset of ground tiles question
« Reply #1 on: February 16, 2019, 09:43:14 pm »
My answer is no due the spawning point has to be a ground tile without object. Maybe someone has a way around by this point but I doubt

Offline Alex_D

  • Colonel
  • ****
  • Posts: 271
    • View Profile
Re: vertical offset of ground tiles question
« Reply #2 on: February 16, 2019, 11:54:01 pm »
So it's an engine rendering issue, perhaps.

The solution sounds simple, on paper. Just telling the game to render the texture of all ground tiles that are used by starting points, then render the starting points themselves. But I have no idea how complicated this may be. It's likely this may not make into the Developers' list of things to implement.

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1692
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: vertical offset of ground tiles question
« Reply #3 on: February 17, 2019, 02:25:30 am »
The problem is that "floor tile" and "entry point" are not separate. In order to render the craft's map on top for the landing zone, the tiles are replaced with the craft's map. Therefore, the desert ground tile that would be there no longer exists. Changing how this works would mean a major refactor in how the battlescape data is saved.

Offline Alex_D

  • Colonel
  • ****
  • Posts: 271
    • View Profile
Re: vertical offset of ground tiles question
« Reply #4 on: February 17, 2019, 04:52:52 am »
So changing the way the engine treats the battlescape data is not trivial, therefore that approach is a no-go.

I even tried a weird approach where the entry tile is on the second floor, but the whole thing is offset by 16 pixels down, so it appears to be on the ground. It rendered, the unit spawned but idid wanted to walk back in. So that approach is also a no-go.

I guess the only way is to fill the gap with something. I'm planning to add some kind of debris in the most neutral colour possible (greyscale) to mask the gap between the ground and the entry tile.