GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — getScreenPosition behaves different for client and module bots · Issue #879 · bwapi/bwapi

getScreenPosition behaves different for client and module bots #879

New issue
Copy link
New issue
Copy link
Open
Open
getScreenPosition behaves different for client and module bots#879
Copy link

Description

@NiteKat
NiteKat
opened on Jul 14, 2021
Issue body actions

getScreenPosition behaves differently for client and module bots in 4.4.0 and probably other 4.X versions too.

getScreenPosition returns Positions::Unknown if UserInput flag is not enabled for a module bot, and screen position if it is enabled. It does not care about that flag for client bots, and will always return the screen position.
Module - https://github.com/bwapi/bwapi/blob/v4.4.0/bwapi/BWAPI/Source/BWAPI/GameImpl.cpp#L188
Client - https://github.com/bwapi/bwapi/blob/v4.4.0/bwapi/BWAPIClient/Source/GameImpl.cpp#L445

setScreenPosition does not care about the flag either type of bot.

Most likely correct behavior should be for module bots to behave like client bots, and just always return the screen position regardless of user input flag.

Activity

  1. dgant commented on Jul 14, 2021

    @dgant
    dgant
    on Jul 14, 2021
    Contributor
    More actions

    I believe this is working correctly. https://github.com/bwapi/bwapi/blob/v4.4.0/bwapi/BWAPIClient/Source/GameImpl.cpp#L445 is logic for the client API but the data is set correctly on the backend, subject to the same code path as the module API: https://github.com/bwapi/bwapi/blame/3438abd8e0222f37934ba62b2130c3933b067678/bwapi/BWAPI/Source/BWAPI/GameImpl.cpp#L186

    Empirically I can confirm that PurpleWave (a client, albeit using JBWAPI instead of the client API) is not receiving accurate screen positions when user input is disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.