0
\$\begingroup\$

Where to begin... I'm currently busy with a few Udemy courses on game development using Unreal Engine 4. My end goal is to develop an MMORPG that I've always wanted to play, but never found online.

Q: How would I represent in-game money in a database table?

I've thought of adding it as a field in the "character" table, but then I struggle to see how I can implement it as a field in the "bank" table... Bank already has a quantity field, so I though about adding the money values as "items", but I just can't get myself to approve that...

Some information on the table fields:

  • Each players bank will have a size limit (upgrade-able) on how many items they can place in it. I was thinking of moving it out to the "character" table as it doesn't really have anything to do with the bank table...

As for the rest of the tables, I'm still working on them. For now I just wanted to get the communities opinion on how to represent money in an mmorpg database.

Current DB Structure

\$\endgroup\$
0
\$\begingroup\$

Every player has one "cash money" value and one "bank money" value, so you could add both as integers values to the character table. If you really want to separate the banking system from the character system, you could create another table bank_accounts with the columns character_id and money.

\$\endgroup\$
  • \$\begingroup\$ Adding the field to the "character" table actually sounds like a good idea... Having everything character related including money in the same table. Thanks a lot for the quick response. \$\endgroup\$ – Francois Du Toit Jul 5 '19 at 8:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.