Romance of the Three Kingdoms banner

Romance of the Three Kingdoms

54 devlogs
134h 37m 5s

Three Kingdoms is a roguelike deckbuilding game similar to slay the spire that is set during the late Eastern Han collapse, where the player takes the role of one of three warlords: Cao Cao, Liu Bei, or Sun Quan . Each campaign begins with a narra…

Three Kingdoms is a roguelike deckbuilding game similar to slay the spire that is set during the late Eastern Han collapse, where the player takes the role of one of three warlords: Cao Cao, Liu Bei, or Sun Quan . Each campaign begins with a narrative prelude that introduces the character’s ideology, alliances, and early conflicts, then transitions into a branching, replayable campaign based on nodes where decisions shape both combat outcomes and long-term political trajectories. Art assets were actually drawn by my older cousin a while ago and he gave them to me to create this game! I also joined FT pretty late and was given maybe 1 week to create this so I am really impressed at myself as well!

This project uses AI

Used AI for debugging as well as placements of objects, writing spine bridges for assets to be able to be displayed. Art was done by my cousin for his ex project(not in HC) ! Files generated by AI will have AI marked on the git repo/commit! I would say its maybe 85 me /15 AI which was mostly in the scenes folder? I also used it for commit messages because I was lazy. I also used them for linting which I am not sure is under debugging or not.

Demo Repository

Loading README...

manjumusei

Shipped this project!

Hours: 23.59
Cookies: 🍪 690
Multiplier: 29.26 cookies/hr

Final ship for the sanguo game for FT!!!!!!!!!! It will be rewritten in macondo in godot and have a polished UI there!

manjumusei

FINAL DEVLOG!!!!!!!!!!!!!!!!

Did some linting as well as final checking, as well as scale of character sizing + appearance and positioning of enemies and drafting for my eventual export to godot which is a whole new language I would like to learn since I think a game like this would be much easier to code (especially the cards) on there which will be continued in macondo. Happy gaming and I hope flavourtown was a blast for yall! Enemies now are positioned in a way where they dont swarm the screen. Theres also a visibiliy issue for the commander passives in terms of visual detail which will also need a hotfix soon in the future, but there are only 40 minutes left for FT!

Edit: This will be my FINAL devlog for FlavourTown since it is ending soon! Development will continue on Macondo and any sort of restructuring will be continued there! Latest code on git may not work since I am still working on it, so I have hosted the latest working version on cloudflare and took it off vercel since I want to transform it with a chaos engine! Link is here: https://tkpc-cih.pages.dev/, it is updated to the latest iteration of the ship.

Attachment
1

Comments

ivyliuwatermelon
ivyliuwatermelon 19 days ago

that’s SO COOL I wish you all the best on your project!!

manjumusei

Finished debugging liubeis common cards!! Found a race condition while I was debugging!!!!!!!!!!!!! There was a race condition in the persistent save logic where my sync function writes saveData.run then calls persistSave() without awaiting it and then there is multiple quick state changes that scheduled overlapping async saves and caused chaos! It hasnt affected my project yet because it is still not incorporated into my own save system and mostly served as a logging which I thought was decent enough for my localbuild, to transform it to a online db schema is my final goal for the game with a login system so this will need to be fixed in the near future!

Attachment
0
manjumusei

Finished testing and debugging caocaos rare cards, found a few errors related to targetting, will probably need a clarification patch for mechanics in the future. Also added a button for activation of the passives or quirks for caocaos influence mechanic

I will have to integrate another 67 cards and verify for Liubei to check for bugs now

Attachment
0
manjumusei

Finished testing caocaos uncommon cards on enemies to see if the tests would conflict or lead the engine astray! Each new card was tested on merchant rerolls + buying, damage+ shield calculation, DOT effects and against other cards which will take long and longer as we get to sunquan since he has a LOT of DOT effects. Tested around 40 ish cards! Again, i can only post the code because the checks are done manually. I have been thinking of some DOT reworks since they seem a bit weak

Attachment
0
manjumusei

SIKE! Another expansion and singular testing of caocao cards to ensure that they work with the system + integration for rarities, no output here other than the code itself, i am checking one by one to ensure that the new mechanics work as planned

Attachment
0
manjumusei

This should wrap things up since I will likely either continue the project on Macondo or in the future when I get an artist to draw cards for me, its been a good sprint! Happy voting!

Attachment
0
manjumusei

Undocumented for my last ship but I updated the UI!! Probs need to work on resizing assets next

Attachment
Attachment
Attachment
0
manjumusei

Shipped this project!

Hours: 50.64
Cookies: 🍪 1334
Multiplier: 26.34 cookies/hr

I built a Three Kingdoms–inspired roguelike deckbuilder that combines Slay the Spire–style combat. The game features three distinct factions with unique mechanics, dynamic event systems, and a combat engine designed for clarity and strategic depth.

The hardest part was structuring the combat and state systems so everything stays deterministic while still feeling dynamic. Managing interactions between buffs, debuffs, enemy intent, and cross-node effects without breaking consistency took significant iteration. I resolved this by formalizing strict state flows, separating local combat state from global run state, and designing clear rules for how effects stack, decay, and persist. Game mechanics in particular were really hard to keep centralized for me due to my ADHD but I pulled through. UI on the other hand is quite bad but refining that will be for the future!

manjumusei

Added another card expansion and gave buffs + interaction to caocao and liubei as well as added tutorials for players, Commander is used as a placeholder for login ID later when i create a login system for the system to be hosted on . This was done on ‘Physics engine’ as an addon to the project albeit me not pushing any changes since I only had my laptop with me because I was visiting grandparents and was writing the code and found out I wasnt on the correct repo halfway

Attachment
Attachment
Attachment
0
manjumusei

Increased font size for ease of reading
Changed the chinese text for copper currency from mandarin 铜钱 to a 🪙for better communication
Also merged the topbar and the dialoguebar when it shows up
Fixed another story sync issue

Attachment
Attachment
0
manjumusei

Changed relic mechanics to drop RNG instead of be event based
Also added glossary for users to read mechanics (scroll wheel broken idk why), probs have to fix it next

Attachment
Attachment
0
manjumusei

Another fat devlog but basically I have been working on the cards as well as the implementation… its on lapse! Please check and see if it is valid since I technically didnt use it but it will be implemented for the future when I have my art assets ready for each card

Attachment
2

Comments

manjumusei
manjumusei 24 days ago

Edit: Might not go through with the plan because to draw around 67 * 3 is kind insane

manjumusei
manjumusei 22 days ago

Edit: Maybe for macodo I will continue the drawings

manjumusei

A bit of a longer dev message but basically in this devlog I struggled with syncing story progress to nodular progress and specific boss nodess resulting in a story time drift where there wasnt really one singular source of truth so fixed this by centralizing everything in a runtime spine, (not SPINE) that acts as the backbone of the story progress

All story beats are now a flat, ordered array per act with hard‑coded columns. But not hard coded map generation.This basically guarantees that every beat appears at a known column on the map, and the map generator can simply stamp them in. and solves my branch mapping problem.

I used a .json schema to basically tie node to json information “id”: “A1_BEAT1_TURBAN_CAMP”,
“column”: 2,
“nodeType”: “event”,
“title”: “The Yellow Turban Remnant Camp”,
“body”: [
“Starving zealots in patched yellow scarves hold a walled granary. They demand safe passage to join Liu Bei.”
],

What this column -2 is the exact map column where the node is forced to appear, the player will always find it regardless at the second column of the app, not the node so the player will always find it and it cannot be skipped. Nodetype is the type of node which is an event node which will always spawn when the player hits the second column. Title and body should be self explanatory!

Attachment
0
manjumusei

Okay so i finally changed the mapping schema to be more visible and less confusing, added glowing nodes and made the nodes you traveled to/forgone fade away.

I also rewrote the ENTIRE logic for the maps, now they follow the storyline no matter which path you take, and these storyline choices determine the bosses and ending as well

Attachment
0
manjumusei

Working on rewriting the logic, there was a problem where the overlappings would lead to the player going into the wrong room, also path lighting was not done. working on it now and i will update later

Attachment
0
manjumusei

Implemented liubeis prelude dialogue ! As for the assets I havent really implemented them yet! Need to work on enemy mechanics later such as drawing from a weighted pool of attacks! A little backstory on Liubei is that he was a sandal maker during the last years of the Han dynasty, and is really humble. His rags to riches story is based on brotherhood with Guanyu and Zhangfei leading to the Oath of the peach garden. Historically as he dies, he dies controlling a third of China which is a true tale of what a commoner was capable of if he stuck to his ideals which is a theme I replicated a lot in Liubeis character path/node choosing.

Attachment
0
manjumusei

Final version 1.5 has been released!
Bugs fixed:
Enemy hp used to be a bit awkward with enemy dying at 2 hp then the reward screen would come
Added backdrops!
Settings still dont work but thats whatever in the roadmap
Need to replace energy symbol with some art as well as the drawpile probably
Cards still need to get replaced

Overall not a bad project for the lockedin Sidequest especially rushing everything. Happy testing!!!

Attachment
Attachment
Attachment
0
manjumusei

Working on card expansion currently, relics have been implemented but I need to find artwork for it :)))

i am also working on different mechanics that the game will use as well for future expansions and will work on card render tonight! This project was pretty rushed because of locked in sidequest but you cant have your pie and eat it too i suppose

Attachment
1

Comments

manjumusei
manjumusei 27 days ago

Probs need to do it via a third party card canvas creator then integrate it with the project somehow as a template and have the cards effects on it

manjumusei

Please note that the settings cog is for the future implementations, I also intend on drawing my own cards so you guys will need to cope with the current flat generated ones with an emoji. The games resolution is a bit blurry but still readable, Ill try to tune it but I think its a problem with the phaser pipeline with graphics render. As of now I will be submitting it for the locked in challenge so the game is only playable until the third combat where you wont be able to progress due to the relics not being fully implemented which will be my next job. Happy testing! Feel free to leave feedback!

Attachment
Attachment
Attachment
1

Comments

manjumusei
manjumusei 27 days ago

CARD RENDER AND RELICS WILL BE OUT IN A FEW DAYS, THIS IS JUST A PLACEHOLDER FOR NOW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

manjumusei

Prototype is done, frantically looking to get it shipped in the next hour for lockedin for the prototype! The game is NOT finished

Attachment
0
manjumusei

Used AI to generate the fallback mechanisms for the intent UI that describes the enemies next move

Attachment
0
manjumusei

Finished writing the future “Chaos engine” so tldr it aggregrates everything in the game, such as Runs, style of run, character etc as well as choices and relic draw which will shift and balance the game accordingly for modifiers so we will have an ever evolving game, currently it is not in practice since I need to finish the vertile slice for my lockedin and is uncommented

Attachment
0
manjumusei

Working on the UI and some placeholders, this is the art i will be using but phaser is having some issues retaining the resolution so i will need to troubleshoot

0
manjumusei
  • Wrote map node creation logic and baselines
    -Wrote status effects and when it will tick such as owner turn end or owner turn start
    -Wrote the card containers which I want to substitute for a template PNG later on
    -Refactored effectqueue logic so we have priority for status effects such as DOTs
    -Also did some UI changes, as well as damage numbers popping up on the screen
    -Coded the relics to be added, as well as their effects and a few placeholders for future work
    made the sprite appear in the battlefield, but I need to calibrate the 2d platform for presentations sake as well.
  • Used AI generated code for the typescript for the Spine36 bridge since there isnt one on the market for plugins for phaser 3.0 and I am really not familiar with how art assets react with the SpineBridge so um yea AI was used for debugging and finding a way for the sprites to appear on the screen without breaking the game

Very very hasty but im trying my very best to devlog, especially with how my other project got called out by fraudsquad for some reason and took away all of my cookies wtf

Attachment
Attachment
0
manjumusei

Okay ive been wrestling with a few problems

  1. Resolution, I am on a 2k monitor so for some reason the graphics are really blurry so im gonna need to fix that
  2. Debugging scripts will need to be made to address point in 1
  3. This might impact my sprites which I would like to be as polished as possible

As for what has been done in these hours

  1. I have finished the save system which saves the state of the game and player information for each run down to the second which may not sound like a lot but this save system logs everything such as rewards, relics, skills chosen, path etc etc so its really good for returning players if they would like to optimize their runs!
Attachment
0
manjumusei

Today Ive been locking in a lot so for todays session so far I wrote the save logic and the persistent seeding logic as well as fixing viewport so it looks clearer on different monitors since mine is 1440p and it was a bit blurry so I coded it to fix viewport, its now a loooot more clearer. I also made it so that the pen drawing will persist across the same playthrough

Attachment
Attachment
Attachment
0
manjumusei

Wrote all of the save and debug logic since that is the core foundation of what is required for the system, not much like always but its the core integral of the game. As the game gets more developed i probs need to add more atomic saves but for now this will do. I would say that I have a somewhat playable version of the game but will release screenshots later once I am done exporting the SPINE assets to phaser via the bridge.

Attachment
Attachment
Attachment
1

Comments

manjumusei
manjumusei 20 days ago

Found a race condition! Documented above!

manjumusei

Wrote the event system, the event outcomes and the skeleton rules based AI for user pathing which basically classifies nodes as pathBias?: ‘safe’ | ‘greedy’ | ‘aggressive’; and then depending on what the user picks, the system reacts accordingly. I also added debugging, and added the rewards interface imports for stuff like gold, cards, relics that may pop up after selecting a node. Now i will be working on the chronicle which is the “backend” that I want to transform much later where players playing as X charcacter choose more of X choice/ending/death transform the overall game to make it always spicy. I really dont have an image to show atm since its the structure so :/

Attachment
0
manjumusei

Going for lunch now so tldr today i made type definitions for character, then i made status definitions which are buffs and debuffs, might wanna add more in the future so I coded it in a very modular way as well. I also added a rules based “AI” system which i wanna develop more in the coming few days so the enemies will have a depth of personality

Attachment
Attachment
Attachment
0
manjumusei

Finally back after my surgery and writing index.ts and defining game mechanics and effects such as sunquans fire mechanic, liubeis tide mechanic etc

Attachment
0
manjumusei

Finished character mapping from character JSON to the uhhh each character, ill have to map the animations next to json for communication for the handler to API

EDIT: OH MY GOD MY ****** DIGITAL ASSETS ARE NOT COMPATIBLE WITH THE VERSION OF SPINE AND I DONT WANNA FORK 70 DOLLARS OUT WHAT DO I DO
EDIT2: THE SPRITES ARE NOW LIVE SO THIS WILL BE V0.1.0
EDIT3: I SPENT ABOUT 20 ISH MINUTES TO AN HOUR SETTING UP JAVA TO PORT MY PROJECT OVER BUT DIDNT DO IT BECAUSE I COULD FIND A WORKAROUND FOR THE SPINE ASSETS!!!!!!!!!! Idk if this is considered fraud because I was working on the skeletons and figured out I could “try” to get the assets exported

Attachment
0
manjumusei

Writing .json for the SPINE manager to map the digital assets to charactres and to map the animations to an action such as playing a card

Attachment
Attachment
0
manjumusei

Apparently spine(which is a rigging software) isnt tracked so im kinda sad but this is a prototype i have from my cousin who is an animation artist! Focusing on exporting them now!

Edit: This was the free software and I couldnt export it until i got the paid software which is in lapse

Attachment
0
manjumusei

I used AI to generate the spine plugin code for the bridge since I have no idea how SPINE assets work with phaser :// (ofc i reviewed the code and made tweaks to it)

Attachment
0
manjumusei

Finally managed to create a draggable map that you can zoom and then also draw, something inspired from slay the spire to remember the paths you wanna take. I also made a topbar layover which displays stuff like health, currency, relics etc

Attachment
Attachment
Attachment
0
manjumusei

Updated the map with symbols! Pity that time isnt tracked here otherwise, this is only for linear progression for the prologue at this current state.

Attachment
0
manjumusei

Finished with the map progression! I wanted to use unity but it was incompatible with my current phaser and typescript stack so this will have to do, it is in one line since this is the prelude which serves as a linear introduction to the character you have chosen, again I am using placeholders, will likely put images inside from one of the open sourced image repos

Attachment
Attachment
0
manjumusei

Fixing the map progression, wanna input a graphic scroller similar to the one from STS but i am unsure if it is compatible with the current typecript and phaser implementation (PLaceholder, will update when i have fixed the map)

Attachment
0
manjumusei

Writing hand mechanics as well as graphical reprsentation rn, its kinda hard to get the math right with the curvature

Attachment
Attachment
0
manjumusei

Coded logic for zone drag and drop acceptance and reject logic + graceful reject

Attachment
0
manjumusei

Mostly working on cards and how it shows up in the hand with the umbrella curve and how it reacts, for example drop zones on yourself and enemies

Attachment
0
manjumusei

Wrote some design cues in my master direction markdown doc as well as wrote a new mechanic im working on which is :Exhaust which renders an overused card useless to make spammers not be able to thin out their deck to use OP cards

Attachment
0
manjumusei

Writing card containers right now, will probably want to migrate it to a jpg format or something because i SUCK at art. Will use emojis as placeholders for now

Attachment
0
manjumusei

Wrote the starting card decks for CaoCao Liubei and SunQuan in typescript! It follows a centralized structure where all of the cards will be sourced from index.ts. This follows a typical slay the spire deck starting formula. At the time of updating this 13 days later, there has been 3 or so expansions and reworks of cards and passives

Attachment
1

Comments

manjumusei
manjumusei 20 days ago

To clarify, the basic cards are mostly the same for the 3 characters, expansion happened later

manjumusei

Wrote liubei cards! will elaborate later! BUT tldr there willbe different cards contained in this centralized format and also some sort of passive mechanic which I will need to write and consult the lore document for

Attachment
Attachment
0
manjumusei

Currently I am writing cards that will go into liubeis deck, its a really long process icl but tldr its just a similar json format which allows me to keep it all centralized in one file, im not sure if this will have to be rewritten in another language if i were to port it to a fully online system

Attachment
0
manjumusei

Finished making caocaos basic deck and now thinking of upgrade camp nodes on the map where you can upgrade a card to ‘plus status’ like in STS

Attachment
Attachment
0
manjumusei

Wrote a bunch of ts for caocaos “deck” and what I envision the gameplay to be, I am aiming for something similar to slay the spire in terms of mechanics and a RPG/alt history outcome that depending on what choices you make, your deck will evolve and so will your fictional endings will occur!

Attachment
0
manjumusei

Wrote up the skeletons as well as the layout of what I am envisioning for the game as well as a centralized lore document

Attachment
1

Comments

manjumusei
manjumusei 20 days ago

Yes I know the cat isnt a devlog but I didnt have anything to show at that time :/