feat(gameplay): large zoomable map, neighborhood layout, tagging fix

Major changes:
- Map: 80x40 (was 38x18) - requires zoom/pan to navigate
- CameraController: pinch-to-zoom, drag-to-pan, scroll wheel zoom
- Neighborhood layout: streets grid with house rows, backyards, fences
- All gaps minimum 2.5 units wide for unit passage
- Streets visible on ground (gray paths)

Bug fixes:
- Tagging: only captured unit goes to jail, never the instigator
- Collision handled once (by lower instance ID)
- Respawn offset fixed for landscape mode

New constants:
- CameraMinZoom/MaxZoom/StartZoom
- MinGapSize, StreetWidth
- VisionRadius increased to 6 (larger map)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
John Lamb
2026-02-01 21:45:28 -06:00
parent c4b3507272
commit 1911da1e33
9 changed files with 354 additions and 81 deletions

View File

@@ -137,25 +137,25 @@ public class Unit : MonoBehaviour
void HandleTagCollision(Unit other)
{
// Only process collision once - lower instance ID handles it
if (GetInstanceID() > other.GetInstanceID()) return;
// Determine who gets tagged: farther from their own base loses
// The instigator (closer to their base) is NOT captured
Transform myBase = Game.Instance.GetBase(team);
Transform theirBase = Game.Instance.GetBase(other.team);
float myDistance = Vector2.Distance(transform.position, myBase.position);
float theirDistance = Vector2.Distance(other.transform.position, theirBase.position);
// Only the one farther from their base gets tagged
if (myDistance > theirDistance)
{
TagOut();
}
else if (theirDistance > myDistance)
{
other.TagOut();
}
else
{
// Equal distance - both get tagged (more chaos!)
TagOut();
// They are farther or equal - they get tagged
other.TagOut();
}
}
@@ -193,9 +193,10 @@ public class Unit : MonoBehaviour
{
yield return new WaitForSeconds(Game.RespawnDelay);
// Respawn at base
// Respawn at base (landscape - horizontal offset toward center)
Transform baseTransform = Game.Instance.GetBase(team);
Vector3 offset = new Vector3(Random.Range(-2f, 2f), team == Team.Player ? -2f : 2f, 0);
float xOffset = team == Team.Player ? 2f : -2f;
Vector3 offset = new Vector3(xOffset, Random.Range(-2f, 2f), 0);
transform.position = baseTransform.position + offset;
isTaggedOut = false;