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

Debug.debugSphereOut() has swapped Red/Blue color channels #24

Closed
lpalm opened this issue May 5, 2020 · 3 comments
Closed

Debug.debugSphereOut() has swapped Red/Blue color channels #24

lpalm opened this issue May 5, 2020 · 3 comments
Assignees
Labels

Comments

@lpalm
Copy link
Contributor

lpalm commented May 5, 2020

DebugInterfaceImpl Line 116: If I want to get a Blue sphere, I have to send a Red Color and the other way around. It seems like the channels are swapped?

@lpalm lpalm changed the title Debug.debugSphereOut() has swapped Red/Blue Debug.debugSphereOut() has swapped Red/Blue color channels May 5, 2020
@ocraft
Copy link
Owner

ocraft commented May 5, 2020

debug().debugSphereOut(observation().getCameraPos(), 10.0f, Color.BLUE);
debug().sendDebug();

I've checked the code above on 4.11 path and the sphere is properly blue for me.

@lpalm
Copy link
Contributor Author

lpalm commented May 5, 2020

I pasted your code and got a red sphere
Screenshot 2020-05-05 at 9 36 15 PM

I'm running MacOS Catalina 10.15.4.
OCraft: Ocraft uses sc2api in version 4.10.3.76114. The game server uses 4.11.4.78285.
Starcraft v4.11.4

I'm guessing is a mac issue if you are not running mac.
https://stackoverflow.com/questions/228477/how-do-i-programmatically-determine-operating-system-in-java

It might too much work to fix it, as its not a serious problem.

@lpalm
Copy link
Contributor Author

lpalm commented May 6, 2020

I have Windows for bootcamp, so I installed SC2 and copied my bot to win. There have been no changes and a blue sphere was generated.

Capture

I think the binary of SC2 for Mac is a little different than Windows, and the RBG is encoded as BGR. There's evidence on the internet of this. e.g.
https://www.reddit.com/r/gamemaker/comments/9l58p7/hexa_color_code_inverted_mac_rgb_windows_bgr/

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

No branches or pull requests

2 participants