Q:

Opinions on collision detection objects with a moving scene

So my question is simple, and I guess it boils down to how anal you want to be about collision detection. To keep things simple, lets assume we're talking about 2D sprites defined by a bounding box. In addition, let's assume that my sprite object has a function to detect collisions like this: S.collidesWith(other); Finally the scene is moving and "walls" in the scene can move, an object may not touch a wall.
So a simple implementation might look like this (psuedo code):
moveWalls();
moveSprite();
foreach(wall as w) {
    if(s.collidesWith(w)) { 
        gameover();
    }
}

The problem with this is that if the sprite and wall move towards each other, depending on the circumstances (such as diagonal moment). They may pass though each other (unlikely but could happen).
So I may do this instead.
moveWalls();
foreach(wall as w) {
    if(s.collidesWith(w)) { 
        gameover();
    }
}
moveSprite();
foreach(wall as w) {
    if(s.collidesWith(w)) { 
        gameover();
    }
}

This takes care of the passing through each other issue, but another rare issue comes up. If they are adjacent to each other (literally the next pixel) and both the wall and the sprite are moving left, then I will get an invalid collision since the wall moves, checks for collision (hit) then the sprite is moved. Which seems unfair. In addition, to that, the redundant collision detection feels very inefficient. I could give the player movement priority alleviating the first issue but it is still checking twice.
moveSprite();
foreach(wall as w) {
    if(s.collidesWith(w)) { 
        gameover();
    }
}
moveWalls();
foreach(wall as w) {
    if(s.collidesWith(w)) { 
        gameover();
    }
}

Am I simply over thinking this issue, should this just be chalked up to "it'll happen rare enough that no one will care"? Certainly looking at old sprite based games, I often find situations where the collision detection has subtle flaws, but I figure by now we can do better :-P. What are people's thoughts?

A:

Whether it is worth improving the accuracy is something we can't tell you, but should become evident during playtesting. As for increasing the reliability of your collision detection, you have several choices:

Decrease the simulation step size. If stepsize * (player max velocity + wall max velocity) < (player width + wall width), you won't miss any collisions. 
Also check that the player is one the same side of the wall before and after the simulation step.
Rather than only checking for collisions at the end of each simulation step, derive a formula that computes the time at which the wall and the player would collide given their current velocities, and flag a collision if that time is within the current simulation step. This if probably overkill in your case, but can be useful in modeling things such as bouncing off walls.

