A hands-on coding curriculum for learning LPC programming on 3Kingdoms MUD. Each chapter pairs with a section of the 3K Code Primer, giving you practical exercises to reinforce every concept you read about.
Work through 21 chapters, 56 exercises, and a capstone project that takes you from "Hello Mud" to building a complete dungeon area.
- Download this repository — click the green Code button above and
choose Download ZIP, or clone with git:
git clone https://github.com/locrian3k/the-forge.git - Open the lessons — open
web/index.htmlin your browser. This is your home page with navigation to every chapter. - Read a chapter in the browser, then open the matching exercise starter file in your text editor and fill in the TODOs.
- Compare your work against the solution files when you are done.
No MUD access, compiler, or special tools are needed. Just a browser and a text editor.
the-forge/
web/ Lesson pages (open index.html in your browser)
index.html Home page with chapter grid
style.css Dark theme stylesheet
exercises.js Progress tracker (saves in your browser)
chapters/ One HTML page per chapter (0-21)
exercises/ Starter files with TODOs for you to complete
ch01_intro/ Chapter 1 exercises
ch02_types/ Chapter 2 exercises
... (ch03 through ch21)
solutions/ Fully commented reference implementations
ch01_intro/ Chapter 1 solutions
ch02_types/ Chapter 2 solutions
... (ch03 through ch21)
reference/ Quick-reference cheatsheets
cheatsheet-types.md One per major topic
glossary.md MUD and LPC terminology
capstone/ Final project templates
README.md Capstone overview and phases
standard/ Standard room track
dungeon/ 3K dungeon room track
phases/ Phase-by-phase guidance
| Chapter | Topic | Exercises |
|---|---|---|
| 0 | The Big Picture | — |
| 1 | Introduction | 2 |
| 2 | Types | 2 |
| 3 | Variables | 2 |
| 4 | Operators | 3 |
| 5 | Mappings & Arrays | 2 |
| 6 | Functions | 3 |
| 7 | Control Structures | 3 |
| 8 | Modifiers | 2 |
| 9 | Preprocessor | 2 |
| 10 | Inheritance | 3 |
| Chapter | Topic | Exercises |
|---|---|---|
| 11 | Code Style | 2 |
| 12 | Driver Functions | 3 |
| 13 | Rooms | 4 |
| 14 | Objects | 2 |
| Chapter | Topic | Exercises |
|---|---|---|
| 15 | Weapons | 2 |
| 16 | Armor | 2 |
| 17 | Monsters | 3 |
| 18 | Putting It Together | 4 |
| 19 | Advanced Topics | 4 |
| Chapter | Topic | Exercises |
|---|---|---|
| 20 | Dungeon Rooms | 3 |
| 21 | Dungeon Integration | 3 |
Every exercise is tagged as one of two difficulty tiers:
- Apprentice — Core exercises covering fundamentals. Start here if you are new to LPC or programming in general.
- Journeyman — Deeper challenges that combine multiple concepts, debug existing code, or tackle real-world MUD patterns.
You can do just one track or both.
- Read the primer chapter — each lesson page links to the corresponding section of the 3K Code Primer.
- Read the lesson page — open the chapter in
web/chapters/for concept recaps, detailed requirements, and hints. - Write your code — open the matching starter file from
exercises/in your text editor. Follow the TODO comments. - Check your work — compare against the solution in
solutions/. The solutions are heavily commented to explain the reasoning. - Track your progress — use the checkboxes on each lesson page. Your progress is saved in your browser's local storage.
The curriculum culminates in a multi-phase capstone where you build a complete dungeon area for 3Kingdoms:
| Phase | Name | After Chapters | What You Build |
|---|---|---|---|
| 1 | The Foundation | 1-9 | defs.h, entrance, base room, layout |
| 2 | Atmosphere | 10-14 | Items, searches, readables |
| 3 | Combat | 15-17 | Monsters, weapons, armor |
| 4 | The Boss | 18-19 | Boss fight, unique drop, mechanics |
| 5 | Polish | All | Integration, disease, paths, testing |
Templates and phase guides are in the capstone/ directory.
When you become a wizard on 3Kingdoms, you will be able to upload your exercises
to the MUD and test them live. Until then, compare your code against the
solutions provided in the solutions/ directory.
The reference/ directory contains quick-reference cheatsheets for every major
topic, plus a glossary of MUD and LPC terminology. These are designed to be
looked up while you work, not read front to back.
Found a bug in an exercise or solution? Have an idea for a new exercise? Open an issue or pull request.
This curriculum is released under the MIT License. See LICENSE for details.