Codex tab: Mobile RPG Codex
Project Velan Codex — Source of Truth
revision 34 · exported 2026-11-02 · open the doc
Code name: Velan (working name; final title TBD). This document is the single source of truth for the game's lore, systems, and design decisions. Items marked (Idea) were floated in discussion but not yet confirmed.
Vision Open page
- A mobile RPG in the spirit of Final Fantasy, built around touch input.
- Large world(s), battle-based gameplay.
- Faux-3D overworld with fully 3D battles.
- A loose single storyline inside a fixed world, but no endgame: mastery is open-ended because casting relies on human input that can never be truly perfected.
- The land itself is also called Velan, for now.
- The story's ending is open-ended for now.
- Platform: iOS first (Apple developer account in place), engine: Unity 6.
Core Theme Open page
- The world has two great sides of magic, a "light" side and the other side (deliberately not called "dark").
- This is not good vs. evil. Each side calls the other evil, but they simply hold different philosophies.
- The truth at the heart of the game: no side is right. Whether someone is good or bad comes down to the individual, not their side. The protagonist can only become truly enlightened by realizing this.
- Story reveal (for now): both sides caused the Breaking, the disaster that shattered the world's great mirror. Each side tells only the half that blames the other. Details: Story Bible.
- Inspiration: Jin Yong's The Smiling, Proud Wanderer, where Linghu Chong follows his own conscience and masters techniques from both the "righteous" sects and the "evil" cult.
The Two Sides Open page
Working names (work in progress): the light side is the the Evane (a soft spin on "even"). Others call the other side the Shattered (a broken mirror). They call themselves the Facets (each shard catches the light its own way).
The Light Side: magic with limits Open page
- Believes magic may only be used for good and must never break the rules of nature.
- Divided into five well-defined factions, each with its own drawing style. The five are in constant competition over who's best, with tension and conflict between them.
- Each faction owns exactly one drawing style.
- One faction is the Waymakers, who guard motion (what moves keeps its course). They draw parallel, and Gale is their spell.
- Factions should NOT be the cliché classical elements (fire, water, earth, air).
- (Idea) Each faction guards one rule of nature, for example:
- Wardens of Measure: balance, cause and effect, every spell has a cost.
- The Tenders: growth and decay, the cycle of life.
- Keepers of the Hour: time and the order of events.
- The Still Choir: sound, stillness, the unseen.
The Other Side: magic without limits Open page
- Believes magic was given to people to use for anything it can do.
- No limits on what magic should be used for.
- Name and internal structure TBD.
Protagonist Open page
- Player chooses male or female.
- Starts as an ordinary villager or farmer, unaligned with any side or faction, possibly an orphan with no attachments.
- Born with immense, limitless magical potential (Anakin-like).
- The player decides who to join, or can stay unaligned from the start.
- The ideal (Linghu Chong) path: a player who embraces and masters techniques from both sides.
Story Opening Open page
(Idea) Full world, story outline, cast and locations proposals: Story Bible.
- The player's village is attacked (monsters or invaders).
- The attack comes from a warp upstream, opened partly by an Evane mistake. Details: Story Bible.
- A tutorial prompt shows mirrored L shapes; the character "accidentally" draws them and casts a repel spell, kicking off the story.
- (Idea) The first cast is overwhelmingly powerful, drawing the attention of both sides.
- A mentor in town (an elder or retired magic-user, not necessarily called "wizard") recognizes the potential and sends the player on a quest to learn more about magic, in a Hobbit-style send-off.
The Mentor Open page
- Trustworthy, but jaded.
- Once caught up in the endless conflict between the two sides. Was pushed to do something and/or realized the conflict was pointless and fruitless, and walked away.
- A living example that stepping outside the conflict is possible.
Spellcasting
Two-Thumb Drawing Open page
- Spells are cast by drawing with both thumbs.
- Most spells are mirrored (some are not): e.g. an "S" on the right thumb and a horizontally flipped "S" on the left.
- Cast quality is judged by how well the two strokes match in shape, size, pace and speed. A perfect match is a perfect cast.
- (Idea) Difficulty tiers: mirrored (easiest), parallel (same shape, same direction), asymmetric (different shape per thumb, master level).
- (Idea) Quality factors map to effects: shape accuracy decides whether it fires, size sets area, speed trades power vs. timing, sync between thumbs acts like a critical.
Drawing Styles Open page
- Each faction has exactly one drawing style. Light-side spells are mostly mirrored (at least in general shape; the Waymakers draw parallel); the other side's spells are mostly not mirrored, a clear visible divide between the two. Non-mirrored spells (e.g. circle on the left thumb, square on the right) are very hard to perfect: same pace, starting and ending together.
- Players can learn all styles but aren't expected to master all of them: pick one that fits you and grow with it.
- (Idea) The game watches how the player naturally draws early on, and different factions court them based on that style.
Breath (Cast Timer) Open page
- Casting has a time limit, like holding your breath (e.g. ~600 ms), tied to player level.
- Super simple spells can be drawn slowly and carefully.
- Breath lengthens with level and gear, allowing longer combos.
Combos and Composite Spells Open page
- Spells must be learned in-game before they can be cast; knowing or being able to draw a spell (e.g. looked up online) does not mean you can cast it. Players cannot invent spells, but can create composite spells by chaining casts, Street Fighter-style.
- Combos are mostly drawn as one continuous stroke.
- Combos can multiply spells or mix effects (e.g. wind + fire = fire tornado).
- (Idea) The strongest composites mix spells from different factions or both sides, rewarding the unaligned path.
Living Spell Library Open page
- Spells are not finite. New ones are created and slowly released into the world for players to discover.
- (Idea) Released through discovery (glyph fragments in ruins) rather than announcements.
Cast Scoring Pipeline (Draft) Open page
Each cast gets one weighted quality score built from separate parts; each spell can weight the parts differently. Fourier descriptors were considered but set aside, since they smooth out corners and ignore orientation and timing.
- Capture: record each thumb's path as points with timestamps.
- Shape: resample each stroke to a fixed number of points (e.g. 64), normalize size and position, and compare point by point to the template ($1 / Protractor-style recognizer).
- Pace: compare each stroke's speed profile to the template's using dynamic time warping, which forgives an overall faster draw but catches rushing one part.
- Sharp angles: detect corners where direction changes suddenly; score their count, position and sharpness separately so rounded corners lose points.
- Thumb sync: for mirrored spells, flip the left stroke and compare it directly to the right; score start time, end time and pace alignment between thumbs. Non-mirrored spells skip the flip but keep timing sync.
- Breath: the cast must finish within the player's breath window.
- Combine: weighted score decides fizzle vs. cast and the cast's quality.
- Validation: server-side checks that input looks human (natural jitter and timing variation).
Spell Book (Prototype)
The casting prototype ships eight spells, five Evane and three Facet. Repel, Coil, Gale and Facet Seal came first, one per drawing style; Brace, Mend, Bevel Lash and Prism Snare are the first batch from the Spell Set tab. Each lives in its own data file (Assets/StreamingAssets/Data/Spells/<id>.json), and the scorer checks exactly what this table describes. Shapes are written as the player sees them on a landscape phone; "outward" means toward that thumb's screen edge.
| Spell | Side | Style | Left thumb | Right thumb | Size | Sharp corners | Effect |
|---|---|---|---|---|---|---|---|
| Repel | Evane | Mirrored | Mirrored L: straight down, hard corner, then left (outward) | L: straight down, hard corner, then right (outward) | 32 mm | 1 per thumb, 62% along the stroke | 10 damage, enemy staggered 2.5 s |
| Coil | Evane | Mirrored | Mirrored S: start upper left, curve over the top to the right, sweep down through the middle, round the bottom, finish lower right | S: start upper right, curve over the top to the left, sweep down through the middle, round the bottom, finish lower left | 34 mm | None: smooth curves only | 24 damage |
| Gale | Evane | Parallel | Peak: up and to the right, sharp tip, down and to the right | Same peak, same direction | 30 mm | 1 per thumb, at the tip (50%) | 15 damage |
| Facet Seal | Facets | Independent | Circle, counter-clockwise, starting and ending at the top | Square, clockwise from the top-left corner: right, down, left, up | 28 mm | Left none; right 3, at 25%, 50% and 75% | 22 shield |
| Brace | Evane | Mirrored | Mirrored bracket: left (outward), hard corner, straight down, hard corner, back right | Bracket: right (outward), hard corner, straight down, hard corner, back left | 30 mm | 2 per thumb, at 27% and 73% | 15 shield |
| Mend | Evane | Mirrored | Mirrored cup: straight down, round the bottom, back up the left (outward) side | Cup: straight down, round the bottom, back up the right (outward) side | 34 mm | None: smooth curves only | 20 heal |
| Bevel Lash | Facets | Independent | Triangle, clockwise from the top | One straight stroke down | 28 mm | Left 2, at 33% and 67%; right none | 30 damage (meant to ignore shields; no enemy has one yet) |
| Prism Snare | Facets | Independent | Square, clockwise from the top-left corner: right, down, left, up | Triangle, clockwise from the top | 28 mm | Left 3, at 25%, 50% and 75%; right 2, at 33% and 67% | 8 damage, enemy staggered 6 s |
Stroke direction is part of the spell: an L drawn from the bottom up, or a Repel drawn with both thumbs as the same (unmirrored) L, does not cast. Size is the longer side of the drawn shape; drawing 1.5x too big or too small costs about half the size score. Every spell must be learned before it can be cast; a well-drawn unlearned spell fizzles with "You have not learned …".
Speed and Tempo Open page
Pace is judged by the shape of the speed curve, not raw speed: drawing a whole spell faster costs nothing, but rushing or dragging one part does. The ideal curve follows how careful hands move: slower where the path bends (the two-thirds power law of human motion), nearly stopping at each sharp corner (about 65% slower), and easing in and out over the first and last 12% of the stroke. Tempo is the whole cast measured against the breath window, which starts at the first touch.
| Spell | Speed within each stroke | Tempo across both thumbs | Breath window |
|---|---|---|---|
| Repel | Steady down, brake hard into the corner, snap outward: slow, stop, go | Both thumbs start, corner and finish together | 600 ms |
| Coil | One continuous flow with no stops; eases slightly through the top and bottom turns | Thumbs mirror each other moment by moment | 700 ms |
| Gale | Quick rise, brake at the tip, quick fall | Same peak at the same moment on both sides | 600 ms |
| Facet Seal | Left glides at an even speed all the way round; right stops at each of its three corners | Thumbs move at different rates by design; sync checks they drift exactly as the two shapes require, and start and end together | 800 ms |
| Brace | Out, brake, down, brake, back: two hard stops | Both thumbs start, corner and finish together | 600 ms |
| Mend | One continuous flow; eases slightly round the bottom | Thumbs mirror each other moment by moment | 650 ms |
| Bevel Lash | Left stops at the triangle's two corners; right is one even stroke | Thumbs move at different rates by design; start and end together | 850 ms |
| Prism Snare | Left stops at three corners, right at two | The thumbs brake at different moments; start and end together | 900 ms |
Thumb sync allows about 80 ms between the thumbs' start and end times before it costs a third of the timing score. A spell can set its own breath window (Coil, Facet Seal, Mend, Bevel Lash and Prism Snare do); the default is 600 ms, and it is meant to grow later with player level and gear.
Overall quality weights the parts: shape 35%, corners 20%, sync 20%, pace 15%, size 10%. Coil and Mend override them (shape 40%, pace 20%, sync 20%, corners 10%, size 10%), since they have no corners to judge. A cast fizzles below 45% overall, when either thumb's shape scores under 30%, or when breath runs out. Quality sets power: a cast just over the fizzle line hits at 0.6x, a perfect one at 1.5x, with most of the gain at the top, so precision keeps paying off. Perfect needs zero error, which no hand produces; careful test draws land around 88–96%. All of these numbers are tunable on the device and are first guesses until playtesting.
Spell Sheet
Assets/StreamingAssets/Data/Spells.The second batch is drawn in the spell sheet above.
Top row, left to right: Repel, Coil, Gale, Facet Seal. Second row: Brace, Mend, Bevel Lash, Prism Snare. In each pair the left half is the left thumb and the right half the right thumb; the white dot is where the stroke starts. The image is rendered from the spell data files, the same way the in-game spell book draws its icons.
Learning Spells (Prototype) Open page
A new player knows only Repel (marked startsLearned in its data file); every other spell is learned by tracing it. Tapping an unlearned spell in the spell book pauses the battle and shows each thumb's shape at its intended size, with a dot where the stroke starts. Three traces that are recognized as that spell and score at least 55% teach it, and it is saved on the device. Breath is not timed while learning, so a student can draw slowly. A drawing that best matches a spell you have not learned fizzles with "You have not learned …"; it never falls back to a weaker spell you do know. The trace count (learnTraces) is per spell, and the 55% bar is tunable on the device. Later, glyph fragments found in the world will unlock what can be studied.
Composite Spells (Prototype) Open page
Any two learned spells can be chained into a composite by drawing the second straight on from the end of the first, without lifting either thumb. The game joins the two templates end to end, so the joint becomes a corner when the stroke turns there, and scores the whole chain on shape, corners, pace and sync like any spell. With the eight prototype spells, that gives 64 chains, each castable once both parts are learned.
| Composite | Chain | Effect | Breath window |
|---|---|---|---|
| Tempest | Gale, then Coil | 55 damage, 1 s stagger | 1,105 ms |
| Bulwark | Repel, then Facet Seal (Evane and Facet together) | 35 shield, 3 s stagger, 10 damage | 1,190 ms |
| Any other chain | Any two learned spells, the same spell twice included | Both spells' effects added together, then x1.2 | 85% of the two spells' windows added together |
Named composites live in Assets/StreamingAssets/Data/Composites/ and override the generic sum, so mixes like wind and fire can have their own effect. Chains are limited to two spells for now; longer chains will need more breath, which is meant to grow with level and gear.
Character, Morality and Reputation Open page
- Detailed player profiles with many stats, far beyond a single level number.
- A perception / charisma-style reputation.
- Players may choose to be evil, but then they're largely confined to an underworld with other bad actors, and may be refused entry to towns, villages and cities by gate guards.
- Evil players can redeem themselves, but it gets exponentially harder the further they fall.
- A truly good person can be liked by both sides.
- Morality is judged by how the player handles quests, main and especially side quests.
- (Idea) Track personal morality separately from standing with each side.
Quests and NPCs Open page
- Single loose main storyline supported by NPCs, side quests, side missions and separate story arcs.
- Side quests are crucial: a very large library, available anytime from town centers and bulletin boards (e.g. escort a shipment from here to there).
- Rewards: reputation, money, experience.
- (Idea) Moral choices hidden inside ordinary jobs.
Gear and Economy Open page
- Diablo-style gear (amulets, etc.) that players find, collect and trade.
- Gear can affect casting, such as breath length.
- Trading happens through a market, not directly between players.
Multiplayer Open page
- Explicitly not an MMORPG dominated by the top 10% of players.
- PvP only in designated places, such as a dojo or training arena.
- No open-world PvP, no killing other players or taking their stuff.
- No co-op. Future: scheduled tournaments (annual or quarterly) with a leaderboard.
- Server-side checks needed to detect bot / non-human drawing input.
Tech and Production Open page
- Engine: Unity 6, iOS build support, tested on a real iPhone.
- Claude Code connected to the Unity editor via Unity's official tooling.
- (Idea) Spells, quests, gear and NPCs stored as data on the server so content can grow without app updates.
- Art: heavy reliance on AI tools (Midjourney for concepts, Meshy for 3D models).
Open Questions Open page
- Game title (code name Velan for now). Final names for the sides (working names in section 3).
- Names and philosophies of the light-side factions (the Waymakers are confirmed; the other four are still ideas).
- Name and structure of the other side.
- Art direction.
- The mentor's name and full backstory.
- Whether NPCs travel with the player in battle (Tamsin and Rook travelling along is worth exploring).