← Back to projects

Top-down arena brawler · Unity 6

Swordman

A top-down 2D arena brawler for four fighters. Pick swords off the ground; they orbit you and hit on contact. There is no attack button.

Overview

Sword against sword breaks both blades. Sword against body deals one of three hit points, and a kill pays a flat three-sword bounty.

Walking scrapes the sand overlay so the tilemap underneath shows through. The game is a mobile-first arena, shown here as a vertical gameplay clip.

Combat

Combat does not use an attack button. Blades are kinematic trigger colliders, including full kinematic contacts so swords can clash with each other.

Movement & arena

Player and AI share the same movement path: both write MoveInput, and a shared Rigidbody2D velocity moves the body. Input comes from the Input System, with WASD and the arrow keys.

The arena is a weighted-random Tilemap, tiled fence sprites, and BoxCollider2D walls. Pickup and VFX objects go through a small object pool.

Enemies

Enemies run a five-state FSM: wander, seek, chase, attack, and flee. The state is re-decided a few times per second, with separation and wall avoidance.

Sand, feedback & tools

The sand trail is a ScratchCard mask driven from gameplay. World position is converted to screen space, then to a texture coordinate. Body and blades use different brush widths.

Hits use pooled sprite bursts, runtime-generated PCM one-shots, and camera shake. UI is uGUI: HUD, nametags, and a result screen. Rendering is URP 2D, with Light2D and sorting layers.

An editor tool rebuilds the scene, prefabs, and generated textures: the sand overlay, recolored bodies, and brushes.

Technologies

Unity 6 C# URP 2D Physics2D Tilemap Input System uGUI

Features