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

Higher level protobuf API #4

Open
9 of 35 tasks
shmocz opened this issue Sep 9, 2023 · 0 comments
Open
9 of 35 tasks

Higher level protobuf API #4

shmocz opened this issue Sep 9, 2023 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@shmocz
Copy link
Owner

shmocz commented Sep 9, 2023

Most game control related commands in commands_yr.proto are low level, and map almost directly to a call of specific underlying game function. While this simplifies the library implementation, there are several problems:

  • All high-level commands, such as "move unit", "produce building", etc. must be implemented client-side as wrappers built upon these low level commands. This is the case in pyra2yr currently.
  • It's not clear what the commands actually do, and how should they be issued to achieve desired operation. In practice one needs to consult pyra2yr sources.
  • While there are basic checks for invalid command data, some inputs might still cause crash, and perfectly restricting all illegal inputs is difficult, as the functionality of the underlying game commands isn't totally understood. In addition, restrictions may be counterproductive for debug/test purposes.

Solution is to add high-level API, that provide human readable commands for essential game controls. The low level API should be left intact for development purposes, but could be disabled by default as a safety precaution.

Non-exhaustive list of high level API features:

Production

  • Produce units and buildings
  • Cancel production
  • Put production on hold
  • Queue/dequeue production

Unit control

  • Attack
  • Attack move
  • Boarding into IFV, flak track, BF etc.
  • Capture
  • Deploy/undeploy
  • Detonate with Seal/Tanya or place Ivan bomb
  • Eject passengers from IFV, flak track, BF etc.
  • Guard
  • Move
  • Repair building with engineer
  • Repair units with repair IFV
  • Repair units on service depot
  • Select/deselect
  • Scatter
  • Stop
  • Waypoints

Building-related controls

  • Attack with defense structures
  • Place building
  • Repair building
  • Sell buildings and walls
  • Set primary building
  • Set rally point

Superweapons and specials

  • Chronoshift
  • Launch nuke/dominator/mutator/weather storm/iron curtain
  • Paratroopers
  • Spy plane/psychic reveal

Other

  • Ally/unally with player
  • Waypoints
  • Taunts
  • Chat
  • Place/remove beacon
@shmocz shmocz added enhancement New feature or request help wanted Extra attention is needed labels Sep 9, 2023
@shmocz shmocz pinned this issue Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant