That’s exactly what a growing niche of indie developers and CS students have been building: a fan-inspired, 2D stealth-action game written entirely in Java (Standard Edition). No Unity. No Unreal. Just pure javax.swing , custom game loops, and a lot of cinematic ambition.
class Guard boolean seesPlayer(Player p) double angleToPlayer = Math.atan2(p.y - y, p.x - x); double angleDiff = Math.abs(facingAngle - angleToPlayer); if (angleDiff > fieldOfView) return false; double distance = Point2D.distance(x, y, p.x, p.y); return distance < sightRange && !wallBetween(this, p); mission impossible 4 java game
long elapsed = System.nanoTime() - start; if (elapsed > 16_666_666) // Lag warning – skip some AI updates That’s exactly what a growing niche of indie