Working on Trady, related questions
#10
Well, most servers that I know that have ingame money allow users to buy that ingame money using real money. It's a way for those servers to earn their hosting costs. So there will probably need to be a system for real money input into the system somehow. And once you have real world money involved, things can't ever be so simple as "hashtable during runtime". Imagine a few players losing their ingame money due to some serverside mishap. This would be really, really bad.

With transactions, I was aiming at multithreading - if the account balance is made available to multiple plugins, several plugins can simultaneously access that value, it needs proper locking. Simple scenario: plugins first query the account balance and then decrease it if there's enough funds. If two plugins are multithreaded so that they both first check and only then they decrease the account balance, it could result in a negative balance.

About shared plugins data - that is very difficult to do, if not impossible; on the other hand, the account balance per-player variable is relatively easy to do. That's why I was even considering it. There's not a chance of the shared data being implemented in reasonable future, but there's a good chance of the variable, if you just say so.
ThuGie: each plugin runs in a separate Lua VM, so they cannot share any variables. They can interact only by using outside objects - files, maybe events etc.
Reply
Thanks given by:


Messages In This Thread
RE: Working on Trady, related questions - by xoft - 09-14-2012, 11:00 PM
RE: Working on Trady, related questions - by xoft - 09-24-2012, 05:35 AM
RE: Working on Trady, related questions - by xoft - 09-24-2012, 07:32 AM
RE: Working on Trady, related questions - by xoft - 11-08-2012, 07:09 PM



Users browsing this thread: 8 Guest(s)