Throne of Lies: Medieval Politics
Throne of Lies: Medieval Politics is an online player versus player (PvP) social deduction game that brings players into a complex web of intrigue and deception as they struggle for power and survival. The game features a diverse cast of over 50 classes across four factions, providing unlimited replayability and fostering a dedicated community of players who have logged thousands of hours in the game. The project has gone through a full development cycle, from architecture to launch and updates, and has organically grossed over $500,000. Throne of Lies incorporates advanced moderation systems, scalable design, and rich in-game social features to enhance player engagement and enjoyment.
Throne of Lies: Medieval Politics (Online PvP) lead game developer, architect, producer and publisher; IP successfully sold in 2020.
- Full Development Cycle: From architecture to launch and updates, organically grossing $500k+.
- Online Matchmaking System: Automatically gather and display connecting players with chat.
- Moderation System: Role-based report<>review system with priority queues and automations.
- Friend System: Robust with rich presence, invite, follow (self-invite), social trophies, blocking.
- Discord: C#/JS SDKs, rich presence system, realtime BaaS integration, join/follow/invite systems.
- Realtime Engagement: Role-based, in-game query<>action system directly integrated in Discord.
- Build Pipeline/Automations: Post-build code generation for parsing and continuous integration.
- Achievements: Funded on Kickstarter; 2x award finalists; featured on PC Gamer: i42.quest/pcg
- Successfully Sold: After being acquired by PT.farm, I was rehired back for 18mo for online multiplayer backend updates.
Backend as a Service (BaaS) - Discord Community | Comparison Sheet
When creating Throne of Lies, we went through UNET -> PlayFab -> GameSparks -> and, by 2022, BrainCloud. As this has been quite the experience, I created this hub to centrally discuss BaaS with other devs - and there is no other community anything like it for this topic.
- Founder and lead organizer, containing 1,000+ online multiplayer gamedevs with 20+ officials.
- Official ambassadors include: Epic Games, Amazon, Microsoft, AccelByte, Photon, Beamable…
- 💡We are the only external community with Epic representatives on an official basis.
- Founder of the BaaS Comparison Sheet, comparing major competitors in exquisite detail.
BaaS: Epic Online Services (EOS) - Open Source
- Skip to the open source code examples to check out my coding style!
- The first and only working Unity port, at that time, even praised by several EOS staff.
- To this day, the code is still used as a schema for initial/OAuth2 EOS architecture.
BaaS: GameSparks (GS)
- Created architecture of Mongodb-based backend with cloud script and NoSQL.
- Founded GS Community Edition - Open Source - patching the obsolete WebSocket (WS).
- GS Projects: TODO - Requires new Project Breakdown.
Photon PUN - Realtime Online Multiplayer
- Used RPCs to matchmake, chat, synchronize state and trigger realtime events.
- Created a custom, 3rd-party authentication with GameSparks.
Other Online Multiplayer/BaaS Implementation
- BrainCloud (BC): Completely ported the game from GameSparks to BrainCloud in 2022.
- Microsoft PlayFab (PF): Created BaaS architecture and implemented solutions before GS.
- Unity UNET: Created P2P architecture and implemented solutions before PF.
- Created the first tutorial video when public documentation was scarce: i42.quest/unet
- Nearly 200 items dynamically loaded from a server-side JSON catalog.
- Soft Skills:
- 15+ years of Photoshop experience.
- Creative writing experience.
- 50 classes: Crafted and balanced over 50 classes with the protagonists and antagonists having an average 1~2% win margin difference (hyper-balanced, with an average 51% win rate to the good guys), despite the mathematical `100!` number of ability combos.
- 4 Factions: The antagonists, 1 of 2 protagonists that could appear, and a neutral faction.
- Convert Mechanics: Good players could be converted by the evil factions into a completely revamped “evil version”, joining the opposing rank upon doing so while still keeping balance.
- Unlimited replayability: We boast the average veterans maintaining thousands of hours of gameplay while still returning back for more, due to the sheer number of combos and player interactions.
- Art Direction: While the game was, admittingly, not the prettiest, it was unique and consistent in theme.
- Music Direction: The choice of music composition ended up scoring us a “Great Soundtrack” tag on Steam.
- One of our exclusive songs, ♫ It’s Just a Dream ♫, won multiple awards in England. We also produced an exclusive song with lyrics: ♫ The Hangman’s Dance ♫.
- Lore: I personally created every flavor text in the game, every lore piece and class/ability name.
- Every item, ability or class weaved its way throughout the deep storytelling of the realm surrounding Castle Adiart, awakening both mystery and intrigue.
- Crafted the monologue, decided upon and pieced together the background music with Audacity, and decided the trailer content in our 1st story trailer. See the backstory in our pre-alpha story trailer on YouTube: The Court Wizard & The Sage.
- Scalable Plug n Play System: Every class and ability in the game is essentially like an NES cartridge - if you want to change up some balance, you can simply drag an ability in this slot and it will work.
- Globally Sync’d: If you updated a class, every information piece in the game would be updated to reflect this without any other changes. Most data is runtime-generated.
- Fully and dynamically cloud saved/loaded.
Synchronized, Modular Classes/Ability System
- Using ScriptableObjects for classes and abilities, all classes/abilities in the game can be mixed and matched like plugging in a game cartridge.
- As classes/abilities are changed up, all information in the game, including complex information cards, will update to reflect the changes.
- Purchase in-game gold with real-life money, via Steam’s multi-step flow.
Dynamic Chat Modulations/Links
- For new players, confusing acronyms are dynamically replaced with full context and info links.
- Dynamically replace known player content or glossary terms with action-filled, clickable links.
- When a player dies, their killer may creatively leave a drawn deathnote to taunt the enemy.
AAA Moderation Report, Queue, and Review System
- In-game review system for both volunteer “Guides” and official staff to participate.
- Smart queue system, prioritizing repeat-offenders and more-critical situations first.
- Automated escalation system, passing lower-priority cases to lower-tier moderators.
- Each mod rank had a maximum allowed action, where higher punishment requests would auto-escalate.
- Logs and player info with numerous filters/analytics to determine a fair case judgment.
- Escalation system to pass notes, evidence, and notable logs for second-opinion requests.
- Before the 2.0 moderation system, in-game reports used to utilize the Discourse API to create forum tickets.
Moderation 2.0 Report Review Tool Breakdown
- View Report Info: As seen on the center of the screen, one may review the caseId, predefined reason, both the accuser and reporter (since sometimes the reporter has a history of a reporting everyone, for example), and the player-described reason.
- Reported Match Player List: Every match, for a limited time, is saved, complimenting the report tool. View the accused, the reporter, their in-game alias, permanent username/id, the outcome of the game and when they left. One may also view their moderation history outside the match.
- View Player History: One may view stats regarding the reporter/accused to deduct the integrity of the report. Did the player have a huge ban history? Does the reporter seem to report every game? If reported for gamethrowing, is the accused a new player? This helps take things into consideration for gray-lines that may require further clarification to ensure a just action.
- Chat Filters & Special Flags: Being a social deduction game based on chat, going through an entire match’s chat history is tedious. Due to special flags logged throughout the match, we can filter exactly what we want to see; fully color-coded. This may just be the most ambitious parsing project, yet.
For example: The “trollbox” ability would allow a player to speak through another player’s mouth. If this is used in an unfortunate way, sometimes the wrong player may be reported. In the logs, we essentially get truesight to see the original authors of messages.
- Search: If filters weren’t enough, search for keywords to make reviews easy and highlight only relevant lines.
- Evidence Box: This was not only logged (and webhooked to a private Discord channel for mods to review), but would be used for our escalation system, including a summary to the next reviewer.
- Judgement Buttons: Mods can choose either Innocent or Guilty. Guilty will check for a whitelist of moderation status and ensure rank is high enough for the suggested action. If underranked, the report will file as top-priority for a higher-ranking mod to review the next time they request a new report - as well as a webhook to a private Discord channel.
Discord Bot - Realtime, In-Game Moderation
- Commands (via whitelisted mod) will engage with BaaS to issue in-game actions in realtime.
- Including: Warnings/bans, gold, popup messages, name changes, queries, memos.
Discord Bot - Invite/Join/Follow Features
- Private and public invite/join/follow features directly from Discord:
- Custom Invite systems with realtime info before Discord officially supported them:
Discord Bot - Realtime stats
- Public game over summary webhooks with winner list:
Discord Bot - Smart Self-Claim Steam Key Dispenser
- Utilized DiscordJS, Discord OAuth2, MongoDB Atlas, and Redis.
- First of its kind to give away actual keys (instead of simply selecting a winner).
- First of its kind to verify the user has a real Steam account with no VAC issues or banned alts.
- 1,000 keys given away in 1 hour with no issues.
- Commercialized later as a standalone bot: Dragonclaim
Social / Rich Presence
- The very first live game to use Discord RP - and contributed to make it first work in Unity!
- In-game friends list with rich presence, including invite/follow systems.
- Optional “invite code” system for streamers and large parties.
- Steam friends auto-synchronized.
- Realtime Discord status updates.
Auto-Triggered Events ( Xmas | Halloween | April Fools | Anniversary )
- Both server-side and client will trigger in-game events at a fully-automatic scale.
- Limited holiday items, changed scenery, altered particles/UI.
- Discord Webhook events, from lore-notable NPCs, appearing in #general or #news.
Anti-Hack Security: Realtime Stream
- Realtime security alert stream via Discord private channels, demoing a man-in-the-middle save.
Anti-Hack Security: VM Detection
- The first known game/software to create a reliable VM detection system without fault.
Self-Serve GDPR System
- Get data: Once per 30d, players may self-serve request the entirety of their data in JSON form.
- Anonymize: Players may delete (anonymize) their account, after a 30d grace period.
- Entrepreneurial Experience: Technical sales, organic marketing, self-sustainment, team building.
- Paralegal: Copyrights, worldwide-filed trademarks, contracts, terms of service, GDPR, EULA.
- Mandarin Chinese（中文）: Intermediate-level speaking, reading, writing and typing.
- Art/Lore Direction: Although low budget/unpolished, the art is unique with vibrant lore.
Other Notable Experience
- [De]Serialization: Mastered Newtonsoft since 2016, with custom typings and architecture.
- OAuth2: “Login via” Steam, Discord, Twitch, Epic Online Services, FB.
- Server/DevOps: JS, Nodejs, Nginx, ExpressJS, REST API, Stripe (custom payments), auto-mailers.
I am a full-stack experienced, backend passionate dev/architect with the niche specialty of online game development. While I have been making online games since 2016, I have been coding throughout most of my life; both professionally and as a hobbyist.
As the lead game developer, architect, producer, and publisher of Throne of Lies: Medieval Politics, I was responsible for overseeing the entire development process and ensuring a high-quality and engaging gaming experience. My tasks included crafting and balancing the game's classes and factions, designing and implementing robust online systems, creating in-game lore, and directing the game's unique art and music. Additionally, I managed the project's technical aspects, from backend architecture to server operations and security measures.
- JetBrains Rider/Webstorm
- Microsoft PlayFab
- Photon PUN
- Steam API
- Discord API
- More @ StackShare
Developing an online multiplayer social deduction game like Throne of Lies presented various challenges, including the need for a reliable and secure online infrastructure, a balanced and engaging gameplay experience, and an effective moderation system to maintain a positive community. Additionally, the social deduction genre is highly dependent on players' interactions and communication, demanding a robust chat system and diverse in-game scenarios to foster rich player engagement.
To address these challenges, Throne of Lies was built using a range of cutting-edge tools and technologies, including Unity, C#, and various backend-as-a-service (BaaS) platforms. The game's design was meticulously crafted to provide balanced gameplay with over 50 classes across four factions, resulting in a hyper-balanced win rate and unlimited replayability. Advanced moderation systems were implemented, including an in-game report, queue, and review system, as well as real-time Discord bot moderation. Robust chat features, such as dynamic chat modulations, links, and a unique deathnote feature, were incorporated to enrich player interactions and enhance the game's social aspects.