BurnySc2 / sc2-planner

MIT License
50 stars 13 forks source link

Using this Planner for other RTS? #53

Open eMarchenko opened 5 months ago

eMarchenko commented 5 months ago

Hi! First of all, thank you for the amazing job!

I was curious if it is possible to reuse this project for other RTS games? To be more precise, how much work is required to:

  1. Fork and remake the planner for another RTS, let's say Warcraft 3, without adding any new mechanics (i.e., the initial build might be incomplete).
  2. Refactor existing codebase to be more like a library/engine with an SC2 app on top of it, so other games can easily reuse the codebase?
BurnySc2 commented 5 months ago

Hey,

that is quite a good question to consider for other RTS games.

In https://github.com/BurnySc2/sc2-planner/blob/d4b88c289d95081b5115a69090224e725a60cdff/src/game_logic/income.ts I tried to emulate the income, which works because normally bases will be built always in the same distance to minerals and vespene, and bases usually have 2 vespene geysirs. Furthermore the construction of units, structures and upgrades is constant except for when chrono boost is used.

To name a few RTS and why you will run into issues with my approach:

I have yet to see how the income works in Stormgate, Immortal: Gates of Pyre and Zerospace.

Additionally you will have to keep the project up to date with the game version (patches), so you need to find a way to automate the process of updating unit cost, build time and tech-tree requirements.

For SC2 I found now roughly 3 ways: Using the Bot API, exporting and parsing XML with the map editor, or extracting the XML files directly.

Other than that, the project might be reuseable. However I am more of a backend programmer (so this progamming style might not be ideal in this project) and will prefer to not use any JS frameworks (angular, react, vue or svelte) in the future, but rather server side rendering with HTML + htmx.