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

What kind of RoomVisual support do we want? #46

Closed
daboross opened this issue Sep 17, 2018 · 4 comments
Closed

What kind of RoomVisual support do we want? #46

daboross opened this issue Sep 17, 2018 · 4 comments
Labels
C-enhancement Category: A PR with an enhancement or a proposed on in an issue. C-unimplemented Feature that exists in Screeps, but that is yet unavailable in our API.

Comments

@daboross
Copy link
Collaborator

Opening this as a separate issue from #30 since there are multiple ways we could support this and discussing it seems fairly self contained.

RoomVisual allows drawing nice graphics on rooms. It's a convenient API. However, all of the JS code in RoomVisual does is create the right JSON structures then call console.addVisual(room_name, structure).

In implementing bindings for RoomVisual, we could either wrap RoomVisual's methods themselves, or just wrap console.addVisual and create a RoomVisual equivalent ourselves in pure rust code.

@daboross daboross added C-enhancement Category: A PR with an enhancement or a proposed on in an issue. A-screeps-game-api labels Sep 17, 2018
@ASalvail
Copy link
Collaborator

The latter seems to make more sense. It'd greatly reduce the overhead of communicating through the screeps API.

I'm curious however: would we bypass this restriction

However, there is a usage limit: you cannot post more than 500 KB of serialized data per one room (see getSize method).

@ASalvail ASalvail mentioned this issue Sep 21, 2018
63 tasks
@daboross
Copy link
Collaborator Author

I don't believe we would - the check is done in addVisual itself rather than in any of the wrapper methods: https://github.com/screeps/engine/blob/551aa41163c45273d706ce238c6b35f379c0149e/src/game/console.js#L40

@ASalvail ASalvail added the C-unimplemented Feature that exists in Screeps, but that is yet unavailable in our API. label Aug 22, 2019
@Azaril
Copy link
Contributor

Azaril commented May 1, 2020

Here's a PR for the full API: #306

@Azaril
Copy link
Contributor

Azaril commented May 1, 2020

Closing as resolved with #306

@Azaril Azaril closed this as completed May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: A PR with an enhancement or a proposed on in an issue. C-unimplemented Feature that exists in Screeps, but that is yet unavailable in our API.
Projects
None yet
Development

No branches or pull requests

3 participants