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

Shorter URL Encoding #51

Open
XeroOl opened this issue Dec 8, 2019 · 6 comments
Open

Shorter URL Encoding #51

XeroOl opened this issue Dec 8, 2019 · 6 comments

Comments

@XeroOl
Copy link
Contributor

XeroOl commented Dec 8, 2019

I've recently created a large level, and it's hard to share with others because the URL is 2500+ characters long. It would be nice if the URL was encoded in base64 or something that can store data in a way that is more dense.

@jmdiamond3
Copy link

On a similar note, holding Y to run through a solution is slow and sometimes doesn't show every move as the graphics can skip. However, holding BACKSPACE to undo moves is always lightning quick. I'm not sure there's an easy solution, but if there is it would be great to have.

@XeroOl
Copy link
Contributor Author

XeroOl commented Dec 15, 2019

I'm looking at lz-string and some sort of base-64 encoding as a potential strategy.

@XeroOl XeroOl closed this as completed Dec 15, 2019
@XeroOl XeroOl reopened this Dec 15, 2019
@XeroOl
Copy link
Contributor Author

XeroOl commented Mar 4, 2020

looks like lzstring has an encodeToBase64 and decodeFromBase64. It's licensed under MIT. I can do some tests to see if it would make sense to put in the effort

@eff96
Copy link

eff96 commented Mar 4, 2020

maybe list each entity in one coordinate as a number/letter/symbol, then list it, like in this level, simply name the level id as 123 instead of HyRr4JK1&1&3?124, but if you cant name it 123, there are many other characters right in your keyboard to use for probably each individual connected texture for walls, blocks and snakes, you can use these characters:

`1234567890-=~!@#$%^&*()_+abcdefghijklmnopqrstuvwyxzABCDEFGHIJKLMNOPQRSTUVWXYZ[];',./{}|:"<>?

you can also use superscript and subscript if these characters above are still not sufficient.

@XeroOl
Copy link
Contributor Author

XeroOl commented Mar 4, 2020

I think the current implementation already uses a similar strategy.

@eff96
Copy link

eff96 commented Mar 5, 2020

yes it does, but i think it uses this format:

id/coordinate

but you don’t need to list the coords, just list the entity ids, left to right, up to down.

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

No branches or pull requests

3 participants