I was trying to write a base 64 converter for a small tile-based project: the idea being to compress the data describing the tiles to be (slightly) shorter than a 300-character long sequence of the digits 0-3. I thought no-one would bother typing out such a long sequence (sadly, compressing it wasn't as effective as I'd hoped
).
Base 64 uses the digits ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789-_ to describe the numbers 0-63, so in theory, I could fit three times as much data into each byte.
Then, of course, I realised Scratch's string comparison operators are case-insensitive — ie.
...which means that I can't use base 64 after all. I could do base 16 (0123456789abcdef), but then I only get two tiles per byte, which isn't a lot.
So:
* Is there any way of doing case-sensitive string comparison in Scratch?
* Can we copy text straight out of Scratch yet? I think you can paste into the "ask" field, but I didn't think you could copy.
* Any thoughts about what I'm doing? Have you successfully achieved any amount of compression in Scratch? Have you made "codes" for a tile-based game, or something similar? Is it even worth doing?
Many thanks!
Offline
hey, some pretty innovative ideas for saving! I never thought of data storage in long strings!
How many tiles are there in this thing? Maybe a base 16 wouldn't be too bad.
Is there a reason why you can't use a base 32, for example? The 26 letters + 10 numbers would be perfect for a 32bit storage (with only 4 waste characters)
I would consider this as an option, unless it really becomes difficult to store your tile data in a non-square number.
As for solving the Aa Bb problem, I'm not sure whether there is any go-around. It's been tried before, and there have been successful steps forward, but I can't tell you whether or not the target has been reached because I simply do not know.
Good luck with your system anyway!
Offline
blob8108 wrote:
I was trying to write a base 64 converter for a small tile-based project: the idea being to compress the data describing the tiles to be (slightly) shorter than a 300-character long sequence of the digits 0-3. I thought no-one would bother typing out such a long sequence (sadly, compressing it wasn't as effective as I'd hoped
).
Base 64 uses the digits ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789-_ to describe the numbers 0-63, so in theory, I could fit three times as much data into each byte.
Then, of course, I realised Scratch's string comparison operators are case-insensitive — ie.
http://dl.dropbox.com/u/9598124/Screens … arison.png
...which means that I can't use base 64 after all. I could do base 16 (0123456789abcdef), but then I only get two tiles per byte, which isn't a lot.
So:
* Is there any way of doing case-sensitive string comparison in Scratch?
* Can we copy text straight out of Scratch yet? I think you can paste into the "ask" field, but I didn't think you could copy.
* Any thoughts about what I'm doing? Have you successfully achieved any amount of compression in Scratch? Have you made "codes" for a tile-based game, or something similar? Is it even worth doing?
Many thanks!![]()
As far as I know, there should be a Spanish or Italian or Greek or Russian character for each letter in the alphabet.


Offline
cocolover76 wrote:
blob8108 wrote:
I was trying to write a base 64 converter for a small tile-based project: the idea being to compress the data describing the tiles to be (slightly) shorter than a 300-character long sequence of the digits 0-3. I thought no-one would bother typing out such a long sequence (sadly, compressing it wasn't as effective as I'd hoped
).
Base 64 uses the digits ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789-_ to describe the numbers 0-63, so in theory, I could fit three times as much data into each byte.
Then, of course, I realised Scratch's string comparison operators are case-insensitive — ie.
http://dl.dropbox.com/u/9598124/Screens … arison.png
...which means that I can't use base 64 after all. I could do base 16 (0123456789abcdef), but then I only get two tiles per byte, which isn't a lot.
So:
* Is there any way of doing case-sensitive string comparison in Scratch?
* Can we copy text straight out of Scratch yet? I think you can paste into the "ask" field, but I didn't think you could copy.
* Any thoughts about what I'm doing? Have you successfully achieved any amount of compression in Scratch? Have you made "codes" for a tile-based game, or something similar? Is it even worth doing?
Many thanks!![]()
As far as I know, there should be a Spanish or Italian or Greek or Russian character for each letter in the alphabet.
I think we're looking for something the user can enter here, not more characters. If you really needed more characters, you could start using symbols and stuff!
Offline
blob8108 wrote:
I was trying to write a base 64 converter for a small tile-based project: the idea being to compress the data describing the tiles to be (slightly) shorter than a 300-character long sequence of the digits 0-3. I thought no-one would bother typing out such a long sequence (sadly, compressing it wasn't as effective as I'd hoped
).
Base 64 uses the digits ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789-_ to describe the numbers 0-63, so in theory, I could fit three times as much data into each byte.
Then, of course, I realised Scratch's string comparison operators are case-insensitive — ie.
http://dl.dropbox.com/u/9598124/Screens … arison.png
...which means that I can't use base 64 after all. I could do base 16 (0123456789abcdef), but then I only get two tiles per byte, which isn't a lot.
So:
* Is there any way of doing case-sensitive string comparison in Scratch?
You can MAKE an ASCII of () block.
* Can we copy text straight out of Scratch yet? I think you can paste into the "ask" field, but I didn't think you could copy.
You can copy from list viewers.
* Any thoughts about what I'm doing? Have you successfully achieved any amount of compression in Scratch? Have you made "codes" for a tile-based game, or something similar? Is it even worth doing?
I honestly have no idea what you're doing. But good luck, anything to speed Scratch up is good.
Many thanks!![]()
Offline
Yes.
Offline
LS97 wrote:
hey, some pretty innovative ideas for saving! I never thought of data storage in long strings!
Sadly, it's not my idea...
LS97 wrote:
How many tiles are there in this thing? Maybe a base 16 wouldn't be too bad.
Is there a reason why you can't use a base 32, for example? The 26 letters + 10 numbers would be perfect for a 32bit storage (with only 4 waste characters)I would consider this as an option, unless it really becomes difficult to store your tile data in a non-square number.
As for solving the Aa Bb problem, I'm not sure whether there is any go-around. It's been tried before, and there have been successful steps forward, but I can't tell you whether or not the target has been reached because I simply do not know.
Good luck with your system anyway!
There are 300 tiles, which can each have a value of 0 to 3. This makes 2 bits of information.
With base 32, you get 5 bits of data, which makes fitting in 2-bit tiles really awkward (You'd have to spread 3 tiles across 2 bytes) -- but yes, that could work.
Thanks!
Last edited by blob8108 (2011-11-16 13:16:37)
Offline
cocolover76 wrote:
As far as I know, there should be a Spanish or Italian or Greek or Russian character for each letter in the alphabet.
That's a thought; I could try using non-Roman characters. Moving to Unicode could get messy, though - it's more likely to get mangled
And as LS97 pointed out, it makes it harder for the user to enter.
Last edited by blob8108 (2011-11-16 13:10:31)
Offline
scimonster wrote:
Yes.
Thank you!
Lists is quite a good idea, and should at least solve the case-sensing problem. I shall try this!
Offline
Just for fun and inspiration, I compiled a list of special charaters. You won't need them, I know, but I was extremely bored
á ß ç Ð é ƒ ġ Ĥ í ĵ ķ Ĺ ɱ ń ó ¶ ơ ŗ ŝ ţ µ ⱱ ŵ ẋ Ŷ ž
There, now I can be bored again...
Offline
Nice idea! I think I made a base64 converter in BYOB once. I might look at it again...
Offline
blob8108 wrote:
I was trying to write a base 64 converter for a small tile-based project: the idea being to compress the data describing the tiles to be (slightly) shorter than a 300-character long sequence of the digits 0-3. I thought no-one would bother typing out such a long sequence (sadly, compressing it wasn't as effective as I'd hoped
).
Base 64 uses the digits ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789-_ to describe the numbers 0-63, so in theory, I could fit three times as much data into each byte.
Then, of course, I realised Scratch's string comparison operators are case-insensitive — ie.
http://dl.dropbox.com/u/9598124/Screens … arison.png
...which means that I can't use base 64 after all. I could do base 16 (0123456789abcdef), but then I only get two tiles per byte, which isn't a lot.
So:
* Is there any way of doing case-sensitive string comparison in Scratch?
* Can we copy text straight out of Scratch yet? I think you can paste into the "ask" field, but I didn't think you could copy.
* Any thoughts about what I'm doing? Have you successfully achieved any amount of compression in Scratch? Have you made "codes" for a tile-based game, or something similar? Is it even worth doing?
Many thanks!![]()
The <list contains ?> block is case sensitive. Simply add "A" to a list and see if <list contains a?> says true or false.
Offline
blob8108 wrote:
I was trying to write a base 64 converter for a small tile-based project: the idea being to compress the data describing the tiles to be (slightly) shorter than a 300-character long sequence of the digits 0-3. I thought no-one would bother typing out such a long sequence (sadly, compressing it wasn't as effective as I'd hoped
).
Base 64 uses the digits ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789-_ to describe the numbers 0-63, so in theory, I could fit three times as much data into each byte.
Then, of course, I realised Scratch's string comparison operators are case-insensitive — ie.
http://dl.dropbox.com/u/9598124/Screens … arison.png
...which means that I can't use base 64 after all. I could do base 16 (0123456789abcdef), but then I only get two tiles per byte, which isn't a lot.
So:
* Is there any way of doing case-sensitive string comparison in Scratch?
Yes, Sci Linked to the wiki![]()
* Can we copy text straight out of Scratch yet? I think you can paste into the "ask" field, but I didn't think you could copy.
you can import vars and list
* Any thoughts about what I'm doing? Have you successfully achieved any amount of compression in Scratch? Have you made "codes" for a tile-based game, or something similar? Is it even worth doing?
Ive done base 16, never 64. i just used two base 16 digits [16*16=256]
Many thanks!![]()
Last edited by hello12345678910 (2011-11-26 08:58:56)
Offline
MathWizz wrote:
* Can we copy text straight out of Scratch yet? I think you can paste into the "ask" field, but I didn't think you could copy
You can copy from lists in the flash player.
![]()
...can you?
That'd be great — I can't make it work, though!
Offline