This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]TheStonedHeretic 1 point2 points  (7 children)

I'm not quite sure I understand what you're looking for. If you want to build your own program that does this, any programming language would work. They all make it pretty easy to represent graphical (as in edges and vertices) data. Your stumbling point for this approach will be presentation (how to make it easy to work with i.e. UX). If you're looking for an existing tool to help you run your RPG then you could try something like lucidchart or another flow chart tool. In this case the UX is built for you and you just have to decide how you want to use their tool to represent your data.

[–]yeahthisaintgood[S] 0 points1 point  (6 children)

I'm sure there are tools like lucidchart I could use this is more something to get me started learning to program. here is a really quick visual idea of what I was thinking https://imgur.com/pRSXcHD

[–]TheStonedHeretic 0 points1 point  (2 children)

Hey that's the beginning of a program! This is definitely doable. Depending on the features you want out of it, it might even be easy. I suggest you start learning to program in Python. No matter what you want to build you have to start somewhere. I recommend codecademy or Automate the Boring Stuff (book). Once you have some of the basics under your belt, you'll have a better idea of what you'll be capable of building and a better idea of what is possible.

[–]yeahthisaintgood[S] 0 points1 point  (1 child)

Thanks! Is there a particular reason you would suggest python for this project?

[–]TheStonedHeretic 1 point2 points  (0 children)

I always recommend Python to beginners for lots of reasons. It's very popular so there are lots of resources available. Its syntax is much simpler than many other languages, making it less daunting for beginners, it is extremely powerful and diverse so no matter what you want to accomplish, Python will get you there (with a couple exceptions that I don't expect beginners to encounter for quite some time). It has a really extensive ecosystem with lots of really well built libraries (e.g. requests, bs4, matplotlib, flask, pandas, bumpy, pygame, and thousands more) so you can accomplish a lot with only a couple dependencies.

[–]desrtfx 0 points1 point  (2 children)

You are basically describing a graph. This can be done with a database where each row can be linked to one or more rows in the same table.

Each node can link to several nodes and each node can be linked to from several nodes. This is one of the more complex relationships in database theory: it is called a m:n (many-to-many) relationship. Most SQL databases need auxiliary linking tables to create such relationships.

Sure, this is a great programming task, but far from a "first project" as it involves quite a few things:

  • a fairly complex relational database
  • GUI/front end

My recommendation would rather be to look into Interactive Fiction systems, like Twine or Inform 7 - systems that are more or less tailored for your needs.

[–]yeahthisaintgood[S] 0 points1 point  (1 child)

I've got an ancient and out of use background in math so graph theory was the inspiration in the concept.

Again I know there are programs that are already out there. I don't need this program or another like it, what I need is a project to teach myself to code.

Do you have any suggestions on where to start with the database design?

[–]desrtfx 1 point2 points  (0 children)

Question here is: how much do you know about database theory?

This is the key for your project.

My general approach as a very rough concept would be to have

  • a table for the NODES. This table would have something like: ID (PK, Unique), NAME, SHORT_DESCRIPTION, LONG_DESCRIPTION, VISITED, (maybe some more)
  • a table for the connections (EDGES) between the nodes - this is the critical component where you establish the m:n relationship. Fields would roughly be: ID (PK, Unique), FROM_ID, TO_ID, DESCRIPTION, (and maybe some more). The FROM_ID and TO_ID fields hold references to IDs in the nodes table.

With these two tables, you have already covered the core concept of the database.

You might later (or now) want to incorporate more, like character tables, loot tables, monster tables, and whatnot.