Our high-school game used combat and progression to invite players into geological history.
Era Odyssey was the first game I made with friends in grade 11, for a learning-technology competition. We learned Unity and game development ourselves and wrote the game by hand with textbooks and experimentation, at a time before AI coding tools were useful to us. We wanted geological history to sit inside a game people would keep playing: move through Earth's periods, meet their creatures, fight, collect materials, grow stronger, and answer questions about the era. This repository preserves the Unity/C# side of that effort; the companion website introduces its world and download paths.
Connecting the game loop to the lesson
Stages in the Cambrian, Ordovician, and Silurian periods organize encounters and bosses. Defeated enemies award experience and materials; crafting and equipment feed the next stage. Fire, Water, Frost, and Earth skills add another progression layer. A Book of Era lets players read topic material, while a timed true/false activity turns part of that material into a play task. JSON save data ties progress, inventory, equipment, and skills across sessions.
The game became more than one combat scene because those systems had to support each other. A stage needed creatures and rewards; rewards needed inventory and crafting; progression needed a reason to return; the educational material needed a place in the loop. The source shows those connections through its controllers and data classes, while the original presentation is recorded in the README.
This checkout is a partial source archive of scripts and selected assets. It does not contain the complete Unity project settings and packages needed to verify a fresh build directly from this folder. The repository records a game that ran for its presentation, but this page does not claim that the archived checkout is a ready-to-open release or that its educational effect was measured.
Era Odyssey
A 2D idle combat game about Earth's geological history. Era Odyssey was developed by a high school team for a learning technology competition. Players travel through geological periods, fight creatures, collect materials, craft and upgrade equipment, and learn through an in-game book and timed questions.
The game ran successfully during its original presentation. This repository is an archive of source code and selected assets, not a complete Unity project that can be opened directly. The full project was too large for the team's Git workflow at the time, so it was stored on Google Drive and linked from the original readme.txt.
Full project archive on Google Drive | Companion website repository | Website download page
Game systems
| System | Player experience | Entry points |
|---|---|---|
| Periods and stages | Select stages in the Cambrian, Ordovician, and Silurian periods; backgrounds and enemies change with the period. | GameController, IteeSpawner |
| Idle combat | The player attacks, uses skills, takes damage, and gains experience; enemies can apply or receive elemental effects and drop items. | PlayerMainController, EnemyMainSystem |
| Enemies and bosses | Regular enemies, mini-bosses, and bosses are spawned in stage-based rounds. | IteeSpawner, EnemyMainSystem |
| Inventory and crafting | Collect materials from enemies and spend two material types to craft or upgrade weapons and armor. | InventoryAllItemSystem, PopUPInformationForCraft |
| Equipment | Equip two weapons and four armor pieces; equipment values contribute to combat calculations. | EquipmentSystem, PlayerMainController |
| Elemental skills | Fire, Water, Frost, and Earth skills have levels, cooldowns, and element-specific effects. | SkillAllSystem, Skill/, SlotSkill/ |
| Educational content | The Book of Era presents reading material; a timed true/false mini-game tests the player. | SelectCH, ReadBook, MiniGame |
| Persistence | Progress, items, equipment, and skills are serialized as JSON under Application.persistentDataPath. | DataPersistanceManager, GameData |
The educational material is part of the game flow. The Book of Era contains geological-period content, while Question assets define questions in Thai and English. The companion website adds story, creature, gallery, and team material.
Gameplay loop
flowchart LR
A[Select period and stage] --> B[Fight enemies and bosses]
B --> C[Gain experience and materials]
C --> D[Inventory]
D --> E[Craft and upgrade]
E --> F[Equip gear and develop skills]
F --> B
A --> G[Book of Era]
G --> H[Read and answer questions]
GameController tracks the player level, experience, unlocked stages, and current period. IteeSpawner manages enemy rounds and bosses. EnemyMainSystem handles enemy health, attacks, elemental states, experience rewards, and drops. PlayerMainController manages player statistics, damage, skills, and equipment-derived values.
Item definitions are stored in InventoryMaterialData and InventoryWeaponData ScriptableObjects. Inventory slots track quantities and discovery or usage state. Crafting reads two material IDs from an equipment definition, checks the required amounts, consumes materials, and increments the equipment quantity. The six equipment slots represent primary and secondary weapons, helmet, chest piece, leggings, and boots.
Architecture guide
1.BookOfEra/ Reading content, question assets, quiz logic, and related UI
1.Combat/ Player, enemies, stages, spawning, skills, prefabs, and enemy data
1.Inventory/ Item definitions, inventory, crafting, equipment, and UI
1.SaveData/ Save model, state collection, and JSON persistence
readme.txt Original link to the Google Drive archive
The code relies heavily on MonoBehaviour components and references assigned in the Unity Inspector. Source files alone cannot reveal every Inspector value, scene order, or prefab connection. Anyone restoring the game should inspect those bindings in the full project archive alongside the scripts.
Main data flows
- Startup and loading:
DataPersistanceManagercreates aFileDataHandler, finds components implementingIDataPersistance, loadsGameDatafrom JSON or creates default data, and distributes state to those components. - Stage progression:
GameControllerselects an unlocked stage and callsIteeSpawner.ChangeStage(). The spawner selects enemy prefabs for the active period and stage. - Combat and drops:
PlayerMainControllerand skill objects damageEnemyMainSysteminstances. Defeated enemies award experience and may create pickups that add materials to the inventory. - Crafting and equipment:
InventoryAllItemSystem.CraftWeapon()reads a recipe fromInventoryWeaponData.EquipmentSystemupdates the equipped slots, whichPlayerMainControllerreads when calculating combat values. - Saving:
DataPersistanceManager.OnApplicationQuit()gathers state from participating components and writes JSON toApplication.persistentDataPath.
Where to make changes
| Goal | Start with | Then inspect |
|---|---|---|
| Add an enemy or change spawning | 1.Combat/New Scripts/GamePlayScript/IteeSpawner.cs | Enemy prefabs, EnemyMainSystem, and EnemyScriptable/ data |
| Adjust damage or status effects | PlayerMainController.cs, EnemyMainSystem.cs | Skill/ and PrefabsObjectsScript/ |
| Add a recipe or material | InventoryWeaponData.cs, InventoryAllItemSystem.cs | Item assets, slots, and crafting UI |
| Change equipment behavior | EquipmentSystem.cs | PopUPInformationForWeapon.cs and calculations in PlayerMainController.cs |
| Add educational content | SelectCH.cs, MiniGame.cs, Question.cs | 1.BookOfEra/Ref/ and question assets |
| Change the save format | GameData.cs, DataPersistanceManager.cs | Classes in 1.SaveData/Data/ and all IDataPersistance implementations |
Companion website
The Era-Odyssey website repository is separate from this Unity source archive. Its pages include Home, Monster, Information, Play, Animation, Gallery, and About. The Home page introduces Demain H. Cover, the research island Saxabra, and the Si-2505 device that sends him into Earth's past. The Play page links to game files and an APK on Google Drive.
The website documents and presents the game and its story. It is not part of the Unity runtime.
Accessing the full project
- Browse the source: Clone this repository to inspect the included C# files, prefabs, and assets.
- Play or open the complete project: Use the Google Drive archive linked in the original
readme.txt, or consult the website's download page. - Edit in Unity: Obtain the full project first. Check its
ProjectSettings/ProjectVersion.txtto identify the original Unity Editor version, then open it through Unity Hub. This repository lacksPackages/manifest.jsonandProjectSettings/, so it does not establish an Editor version or support a verified build on its own.
The Drive archive's contents and current build status were not verified during this documentation update. The system descriptions above are based on the source in this repository and the separately stored website.
Technical debt
The presentation build worked. The issues below concern maintainability and risks visible in the archived source; they do not imply that the original presentation failed.
| Priority | Finding | Consequence and remediation |
|---|---|---|
| High | GameController.SilurianStage1–10 check UnlockLevel >= 21–30, while AutoChangeStage() identifies Silurian stages as 31–40. | Stage selection can pass its gate before the corresponding Silurian stage is unlocked. Centralize stage IDs and test the boundary for each period. |
| High | CraftWeapon accepts a material when (amount >= required amount) || (multiplier > required multiplier). | Amount and multiplier together represent a base-1,000 value; comparing each field independently can approve an insufficient balance. Compare normalized values before consuming materials. |
| High | InventorySlotWeapon and InventoryAllItemSystem duplicate number-conversion logic. Their while (number * mp < 0) branch does not normalize positive fractions and can fail to terminate for negative values. | Quantity and recipe calculations are fragile at numeric boundaries. Consolidate the representation and test zero, fractions, 1, 1,000, large values, and negative values. |
| High | InventoryWeaponData and InventoryMaterialData ScriptableObjects contain both item definitions and mutable player state such as NumberAmount, EverHave, and IsUse. | Template data and session state are coupled. Separate immutable definitions from runtime and saved state. |
| Medium | DataPersistanceManager discovers components through FindObjectsOfType<MonoBehaviour>() and resets saved data when array lengths no longer match the current item or skill counts. | Adding content may erase older progress. Introduce a save schema version and migrations, with load tests for previous saves. |
| Medium | FileDataHandler overwrites the JSON save file directly, and the manager saves on application quit. | An interrupted write can damage the save. Write to a temporary file, replace the old file atomically where supported, and retain a backup. |
| Medium | MiniGame.RandomQuestion samples from index 1, excluding index 0; its <= 2 selection condition also differs from the < 2 exhaustion check. | Some questions cannot appear through the random path, and repetition limits are inconsistent. Shuffle an explicit question pool and define the intended repeat count. |
| Medium | ReadBook.UpdateCH uses the English chapter name and the same txtFile array in both Thai and English branches. | Switching languages may leave book content unchanged. Provide language-specific text assets and verify the reading UI. |
| Medium | GameController and IteeSpawner connect stages, backgrounds, enemy lists, and UI through repeated strings and numeric IDs. GameController.Update() also calls Physics2D.OverlapCircleAll(..., 999f, ...) every frame. | Adding a period requires edits in several places, and enemy scans are repeated each frame. Move stage configuration into data and update counts and UI on state changes. |
| Medium | IteeSpawner imports UnityEditor from a runtime script. | Player compilation may fail outside the Editor. Remove the unused import or isolate Editor-only code. |
| Low | Naming and spelling are inconsistent (IteeSpawner, DataPersistance, Carbrian, Silder). EquipmentUsingSystem is commented out, and magic numbers and debug logs are widespread. | The execution path is difficult to follow. Refactor one system at a time, with regression checks around existing behavior. |
A practical restoration order is to open the full project in its original Unity version and document the build process; run smoke checks for stages, saves, and crafting; correct numeric and recipe logic; separate item definitions from player state; then reduce coupling between stages, spawning, and UI.
Archive note
The repository name Unity-EraOdesey and several class names differ from the game's title, Era Odyssey. This README retains existing file and class names so references remain accurate. The repository preserves a student team project as it was built, including the engineering decisions that made the original presentation possible and the maintenance work a future revision would require.
License
Original code and documentation authored by Jakkarin Promsee are licensed under the MIT License. Third-party code, assets, datasets, and other materials are not covered by this license; their original terms apply.