Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using this Planner for other RTS? #53

Open
eMarchenko opened this issue Apr 15, 2024 · 1 comment
Open

Using this Planner for other RTS? #53

eMarchenko opened this issue Apr 15, 2024 · 1 comment
Labels
question Further information is requested

Comments

@eMarchenko
Copy link

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 BurnySc2 added the question Further information is requested label Apr 15, 2024
@BurnySc2
Copy link
Owner

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:

  • Age of Empires 4 allows construction of buildings with multiple villagers, as well as different races have different gather rate (e.g. HRE gathering faster if near a prelate).
  • Supreme Commander (and Beyond All Reason) has a flowing economy where you have a steady income and are constantly spending your resources at a different rate, as well as multi construction vehicles may be used to build units and structures
  • Warcraft 3 lumber income depends on how far away the lumber is (similar to AOE4 lumber)

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants