Retro Skeet Champion
80년대 고전 게임의 감성을 살린 클레이 사격 게임입니다. 날아가는 표적을 타이밍에 맞춰 격파하고 최고 점수에 도전하세요!
A retro-style clay shooting game inspired by 80s classics. Hit the flying targets with perfect timing and challenge for the high score!
HIGH : 00000
20.0
SKEET CHAMPION
Hit the targets when they enter the box!
PC: Z (Left) / X (Right) or Arrow Keys
Mobile: Tap Red Buttons
※ Yellow Bird = -1000 Pts (Avoid!)
※ Red Box = Tracking... (Fire when Inside!)
ROUND 1 OVER
GAME OVER
Architecture & Core Logic
-
상태 기반 루프 (State-Driven Loop): 게임은
MENU,PLAYING,ROUND_OVER와 같은 상태 머신으로 관리됩니다. 이를 통해 UI 전환과 입력 처리를 명확하게 분리하여 플랫폼 간 일관된 로직 수행을 보장합니다.State-Driven Loop: The game is managed by a state machine (e.g.,
MENU,PLAYING,ROUND_OVER). This cleanly separates UI transitions from input handling, ensuring consistent logic execution across platforms. -
델타 타임 물리 엔진 (Delta Time Physics): 기기 성능이나 주사율(Hz)에 관계없이 동일한 게임 경험을 제공하기 위해, 모든 이동과 물리 연산은 프레임 간 경과 시간(dt)을 기반으로 계산됩니다.
Delta Time Physics: To provide a uniform experience regardless of device performance or refresh rates, all movement and physics calculations are normalized using delta time (dt).
-
객체 풀링 및 큐 시스템 (Object Pooling & Queue): 표적의 생성은 확률에 의존하지 않고 미리 정의된 '스폰 큐'를 셔플하여 사용합니다. 이는 라운드당 고득점 표적의 등장 횟수를 보장하여 공정한 게임 플레이를 유도합니다.
Queue-Based Spawning: Instead of relying on pure RNG, target generation uses a pre-defined, shuffled spawn queue. This guarantees a fixed number of high-value targets per round, ensuring fairness.
Algorithm Development Guide
-
충돌 감지 (Collision Detection): 복잡한 충돌 처리 대신 '거리 차이'를 이용한 직관적인 방식을 사용합니다. 표적과 조준점 사이의 가로(X)와 세로(Y) 거리를 각각 계산하여, 두 거리 모두가 설정된 '명중 범위(Hit Zone)' 이내일 때만 명중으로 판정합니다. 즉, 표적이 조준 박스 안에 들어오는 순간(타이밍)을 `Math.abs(거리) < 범위` 공식을 통해 수학적으로 검증합니다.
Collision Detection: Instead of complex physics, we use an intuitive method based on 'distance difference'. It calculates the X and Y distances between the target and the sight separately. A hit is registered only when both distances are within the defined 'Hit Zone'. Essentially, it mathematically verifies (`Math.abs(dist) < zone`) if the target is inside the aiming box at the moment of firing.
-
보간 애니메이션 (Interpolation Animation): 총구나 조준점의 움직임에
Lerp (Linear Interpolation)알고리즘을 적용하세요. 입력 값에 즉각 반응하기보다 목표 값으로 서서히 수렴하게 만들면 훨씬 부드러운 시각 효과를 얻을 수 있습니다.Interpolation Animation: Apply
Lerp (Linear Interpolation)to the movement of the gun or crosshair. Converging smoothly to the target value creates a much more polished visual effect than instant snapping. -
사인파 운동 (Sine Wave Motion): 단순한 직선 운동 외에 '새'와 같은 변칙적인 움직임을 구현할 때는
y = sin(time)함수를 활용하세요. 주기에 따라 자연스럽게 위아래로 흔들리는 궤적을 쉽게 만들 수 있습니다.Sine Wave Motion: Use
y = sin(time)functions to implement irregular movements like flying birds. This creates natural, oscillating trajectories without complex physics.

댓글
댓글 쓰기