Author Topic: Upwards checkerboarding  (Read 277 times)

0 Members and 1 Guest are viewing this topic.

Offline Forestidia86

  • Posts: 551
    • View Profile
Upwards checkerboarding
« on: November 06, 2019, 10:00:41 pm »
Does it make sense that the Lix get past what is shown in the attachment (cube, from left to right)?
« Last Edit: November 10, 2019, 12:29:22 pm by Simon »

Offline ccexplore

  • Administrator
  • Posts: 5064
    • View Profile
Re: Upwards checkerboarding
« Reply #1 on: November 07, 2019, 05:14:41 am »
Totally.  In ASCII art the relevant portion looks like this:

Code: [Select]
cc
cc
cc
cc
 *s
ss

When lix is standing at *, it only sees the one-pixel-tall step ("s") in front (facing right).  The fact that in his current position there's also the edge of a cube overhead ("c") has no bearing whatsoever on the step height the lix will be moving to.

Now, had the column of cube pixels been extended one pixel further right, then the lix at * would see a much taller step in front due to the added pixels from the cube, and then the lix would not be able to get past.

Offline Forestidia86

  • Posts: 551
    • View Profile
Re: Upwards checkerboarding
« Reply #2 on: November 07, 2019, 07:47:14 am »
Hmm, thanks for your answer. The odd thing is that this construction works only if on the right pixel in the 2-1 pixel system, see below. (0002 has the construction moved one pixel further left than 0000)

Offline geoo

  • Administrator
  • Posts: 1336
    • View Profile
Re: Upwards checkerboarding
« Reply #3 on: November 07, 2019, 09:22:37 am »
Whether this works or not depends on the alignment of the terrain modulo 2, see attached level. The lower part of the level is exactly as the upper one, except for everything shifted by a single lo-res pixel.

The reason is that the lix physics work don't work in hi-res pixels, but rather cells comprised of 2x1 pixels. A 2x1 cell is solid if at least one of its pixels are solid.
So what you get is the following:

Code: [Select]
Pixels     Cells
  |  |XX|       X
XX|  |XX|     X X
XX|XX|  |     XX
XX|XX|XX|     XXX

Pixels     Cells
  |  | X|X      XX
 X|X | X|X    XXXX
 X|XX|X |     XXX
 X|XX|XX|X    XXXX

The second case is the same as the first, but shifted by 1 pixels. I added vertical bars to make clear which pairs of pixels form a cell.
The first case has a gap that the Lix can step through, while the second one doesn't.

Offline Forestidia86

  • Posts: 551
    • View Profile
Re: Upwards checkerboarding
« Reply #4 on: November 08, 2019, 06:04:57 pm »
Whether this works or not depends on the alignment of the terrain modulo 2, see attached level. The lower part of the level is exactly as the upper one, except for everything shifted by a single lo-res pixel.

The reason is that the lix physics work don't work in hi-res pixels, but rather cells comprised of 2x1 pixels. A 2x1 cell is solid if at least one of its pixels are solid.
So what you get is the following:

Code: [Select]
Pixels     Cells
  |  |XX|       X
XX|  |XX|     X X
XX|XX|  |     XX
XX|XX|XX|     XXX

Pixels     Cells
  |  | X|X      XX
 X|X | X|X    XXXX
 X|XX|X |     XXX
 X|XX|XX|X    XXXX

The second case is the same as the first, but shifted by 1 pixels. I added vertical bars to make clear which pairs of pixels form a cell.
The first case has a gap that the Lix can step through, while the second one doesn't.

Inconsistency is therefore connected to this problem with one pixel gaps and deeply engrained in Lix physics.

But the preference (in case of consistent behaviour) seems to be that the Lix can pass.

Offline ccexplore

  • Administrator
  • Posts: 5064
    • View Profile
Re: Upwards checkerboarding
« Reply #5 on: November 08, 2019, 07:29:06 pm »
You could call it a "preference", but I would then ask, what would be the alternative(s) you envision?  Lixes and lemmings could always walk through even 1-pixel-tall tunnels, and more importantly they do have the ability to walk up zigzagging builder staircases instead of turning around near where two builder bridges meet.  If physics is altered so that terrain pixels/cells directly overhead can affect walkability, how do you envision reconciling that with the two currently-walkable arrangements I just mentioned?  Does thickness of ceiling gets taken into account for example?  Are they maybe only blocked from walking forward if the step goes upwards in presence of thick ceiling directly overhead, but not if the next step forward is flat or goes downwards?

In other words, walkability for lixes and lemmings is already a little different from real-life, so you're bound to find some cases where the observed behavior might feel a little off to one's brain, given the mismatch with real-life kind of physics.

Offline Forestidia86

  • Posts: 551
    • View Profile
Re: Upwards checkerboarding
« Reply #6 on: November 08, 2019, 07:35:17 pm »
Well in the current state of Lix there are cases where the Lix can't pass, that's a point that probably has coined my intuition. I only asked the question because I tested it and noticed that it doesn't work if I try to reproduce. I only later realized that it depends on the pixel of the construction if they can pass or not.

But I can't tell an alternative and see your point.