I'm working on a turn-based game with CRPG (Computer RPG) elements in HTML5. It has to support 10K+ CCUs (Concurrently Connected Users).

The CRPG elements in the game are item and character systems:

  • The game has characters, characters have items.
  • Items may be worn or used as consumables.
  • Items may be crafted and upgraded.
  • Characters gain experience and get new levels.
  • Characters and items have characteristics (like health, attack strength etc.).
  • Characters may have buffs and debuffs placed on them that affects characteristics.
  • Characters have talents that acts like permanent buffs or debuffs.
  • Items worn and consumables used may affect character characteristics.
  • Characters may strike each other, and strike outcome is calculated based on the effective characteristics of the attacker and target.

All of the above has to be stored and handled on the server-side.

To avoid developing everything from scratch for the 100th time, I'd like to maximize my reuse of existing code: original, free, or commercial.

I can adapt the CRPG model requirements to the implementation limitations to a certain (considerable) extent. Technology stack does not matter much either — as long as it is reasonably scalable.

How can I author my server-side solution to maximize code reuse?

  • 1
    \$\begingroup\$ I'm sorry, but we generally don't answer questions asking for product recommendations. \$\endgroup\$
    – Philipp
    Aug 26, 2020 at 9:46
  • 1
    \$\begingroup\$ This all sounds like custom rules that each game implements a little differently anyway. I suppose it would be possible to make a shared library for something like XP gain, but it would be like a dozen lines so who would bother adding a third-party dependency for something like that? I don't think you're going to find what you're looking for, and you should be prepared to write your own server-side implementation. \$\endgroup\$
    – DMGregory
    Aug 26, 2020 at 11:54
  • \$\begingroup\$ I've tried to edit your question away from the off-topic product recommendations request Philipp cautioned about, and focus instead on solving your problem of re-using code wherever possible. That may have strategic or implementation answers that aren't limited to "Use library X (link)" \$\endgroup\$
    – DMGregory
    Aug 26, 2020 at 12:04
  • \$\begingroup\$ BTW, any help with terminology is very much welcome! If you see where I can improve the question text, especially by using better terms, please say so (or just suggest an edit). This will also help me to maybe google up the answers on my own (and document them here, of course). \$\endgroup\$ Sep 1, 2020 at 8:25
  • 1
    \$\begingroup\$ This question is too broad. Is there a specific aspect we can help you with? You can always ask multiple questions for multiple aspects. \$\endgroup\$
    – Evorlor
    Sep 3, 2020 at 14:52


You must log in to answer this question.

Browse other questions tagged .