Back to projects

PROJECT NOTES / 2D ADVENTURE

2D Adventure
A learning journey.

I completed this Unity 2D action-platformer exercise following M Studio's 勇士传说 tutorial. Explore forests and caves, fight enemies, and interact with chests, checkpoints and portals. This is tutorial-based practice, not an independently designed original game.

Play now
MY INVOLVEMENT
Following the tutorial and practising its systems
CONTEXT
M Studio's 勇士传说 tutorial
FOCUS
Unity 2022.3.62f3c1 · 2D action · WebGL

Connect actions to a world.

  1. 01

    Movement and combat

    Ground and wall checks, animation hit windows, damage and feedback

  2. 02

    Enemy behavior

    Boar patrol and chase, aerial bee pursuit, snail hiding and invulnerability

  3. 03

    Scenes and checkpoints

    Event channels, additive Addressables loading and selected-state restoration

Connecting input and animation, enemy behavior, scenes and saved state was the main learning exercise.

01 / GAMEPLAY & CONTROLS

Explore forests and caves.

Run, walk, crouch, jump, wall-slide, wall-jump and perform grounded melee attacks. Grounded slides consume regenerating energy; damage causes knockback and temporary invulnerability. Portals connect the forest and cave, and the on-screen settings button pauses play and offers volume adjustment.

Action Keyboard Gamepad
Move horizontally A / D or Left / Right arrows Left stick
Crouch on ground S or Down arrow Left stick down
Jump / wall-jump Space South button
Walk on ground Hold Left Shift Hold left trigger
Grounded attack J West button
Grounded slide K Left shoulder
Interact nearby E East button
Load saved state (script shortcut) L Not bound

Gamepad labels refer to button positions. Chests open visually without inventory or loot. Activate the cave checkpoint before loading saved state. A desktop browser and keyboard are recommended; this build has no on-screen touch controls.

02 / WHAT I LEARNED

Work on the connections.

Input, animation and combat timing

Input System accepts grounded attack input and Animator coordinates three attack animations. Clips activate attack-area objects during hit windows; triggers forward contacts to the character component for damage, invulnerability and hurt/death events. Exiting the animation state clears the attack flag. I practised coordinating input, animation, hitboxes and feedback rather than applying damage directly on a keypress.

Enemy finite-state machines

Enemies delegate logic and physics updates to state objects with exit/enter callbacks. The boar uses BoxCast sensing to switch from patrol to chase, returning after a lost-target timer. The bee uses circular detection and aerial pursuit; the snail skill state handles hiding and invulnerability. I practised separating shared sensing, movement and timers from species-specific behavior.

Event channels and scene lifecycle

ScriptableObject event channels carry scene, health, audio and fade notifications. The scene loader coordinates Addressables references, fades, unloading, additive loading and player repositioning. Loading disables gameplay input; completion in a location scene restores it and refreshes camera bounds.

Checkpoint persistence

A checkpoint raises a save event. The data manager collects registered ISaveable objects and writes Newtonsoft JSON to SAVEDATA/data.sav under persistentDataPath. Character IDs key position, health and energy, while the scene loader saves the current scene. This restores selected state, not a complete world snapshot.

Other practice includes Tilemap collisions, ground/wall physics checks, URP 2D lighting and post-processing, Cinemachine bounds and shake, health/energy UI, AudioMixer volume control and DOTween fades.

03 / SOURCES & SCOPE

Tutorial practice, not an originality claim.

The learning source is M Studio’s Unity 勇士传说 tutorial. Facts and controls follow the Unity project’s English and Chinese READMEs. This site loads the existing WebGL export; it does not rebuild Unity source or promise full-world saves or touch controls.

Dustyroom’s Casual Game Sounds U6 includes a CC0 license; DOTween is by Demigiant / Daniele Giardini. Authors, sources and redistribution terms for Generic-Character, Legacy-Fantasy-High Forest, FREE CASUAL MUSIC PACK and SmileySans-Oblique are not fully documented locally. Third-party assets retain their own terms; verify licensing before public deployment or redistribution.

Back home. Keep exploring.