Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Save Code Compression
- ExtraCheeeeese
-
Scratcher
16 posts
Save Code Compression
I'm working on a vector editor;Vector Editor where you draw and it renders in lines. The problem is, the save codes are in format " ", for the potential tens of thousands of lines. This lags computers out when you copy and paste, and I'd like suggestions for how to compress it. I tried using relative positions between the start and the finish, and I got a cool 2.5D effect, but it didn't work. I don't even know why. I don't plan to build a whole base96 converting engine, so what else is there?
- ExtraCheeeeese
-
Scratcher
16 posts
Save Code Compression
The save codes are in format “(line color) (comma) (line size) (comma) (line starting x) (comma) (line starting y) (comma) (line ending x) (comma) (line ending y)”
Used brackets, didn't know they were escape characters, corrected now
Used brackets, didn't know they were escape characters, corrected now

- redspacecat
-
Scratcher
1000+ posts
Save Code Compression
Used brackets, didn't know they were escape characters, corrected nowFYI, you can escape brackets by surrounding them with more brackets.
e.g.
[[]comma[]]
- Discussion Forums
- » Advanced Topics
-
» Save Code Compression