stevengann / trpg Goto Github PK
View Code? Open in Web Editor NEWAn OOP C# framework for Text RPG games, inspired by the improved console window in Windows 10.
An OOP C# framework for Text RPG games, inspired by the improved console window in Windows 10.
One of the goals of TRPG is that it should be modular enough to be plugged into any interface suitable for a Nethack rogue-like RPG game. One of the intended examples of this was for simple support of MUDs. Adding network support won't be simple, and the following will have to be considered:
There's a couple serious issues with the current random dungeon generation. The current generation treats it like a quad-tree, but trees were never really my forte.
Paradox rooms: As the dungeon branches, the tips of some branches have door indicating that they continue on, but going through those doors will put you back in the same room. Even though it says you can go West, no matter how many times you go West you're still in the same room.
Infinite Loop: When the dungeon is generated on started, there's a small chance of an infinite loop. Stepping through the code, it's easy to see why, but I haven't found a good way to fix it yet.
As of now, the TRPG player starts with a set of stats and those are modified by the buffs on items in the inventory. There needs to be some for of leveling at least, and some way for players to choose how their character advances.
Levels:
Skills:
Whether it is magic, magicka, mana, or the Force, most RPGs include some form of magic. TRPG needs this. The simplest way would be a command that applies Buffs to yourself or a specified monster. We'd need to expend the Buff class a bit. To prevent making the Buff class too big and general, there should be a Spell class added. Perhaps with the following fields:
That leaves the mechanic of how spells are made available to the player, and how they are cast. Many RPGs handle this by having a secondary sort of inventory containing spells. A spellbook of some kind. Alternatively, spells could be physical objects such as scrolls or tomes in the regular inventory. I'd love to see some extension to the parser that allows players to devise their own unique spells by typing in long and convoluted strings or phrases, but that's somewhat out of the scope of TRPG for now.
Sometimes, though not all the time, some monsters will become invulnerable after another monster in the same room has been killed. Specifically, the message "You cannot do that." is shown, meaning that there was a caught exception from this line:
gui.MainText = GameRules.PlayerAttacksMonster(this, (Weapon)playerInventory.Find(newCommand.Tokens[3].Text), playerStats, (Monster)dungeon.CurrentRoom.Contents.Find(newCommand.Tokens[1].Text), (int)DateTime.Now.Ticks & 0x0000FFFF);
The Try/Catch block surrounding this line of code was a lazy approach to making sure that the thing being attacked is a Monster, and the thing being used for attacking is a Weapon. I could replace it with a bunch of If blocks, but that'd be ugly and tedious.
An item crafting and enchanting system has been planned since the start of TRPG. The Item and Buff classes already have overloads for the Item+Item, Buff+Buff, and Item+Buff operators for this purpose, though an actual interface for these things has not yet been considered.
Crafting:
Enchanting:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.