PT_ wrote:
Let's take again the matrix
Code: [0,4,3,2,0]
[0,0,0,1,0]
[0,0,1,0,0]
[4,0,0,5,0]
[3,0,5,2,0]
Then my string would be
Code: 0432000010001004005030520
While earthnite and I were working on porting our levels we noticed that some of them have over 9 node colors. If we ported the levels for you by concatenating integers from the matrix into a string, you could end up with two digit numbers which wouldn't work well with your compression algorithm.
As a solution, I suggest using a base higher than 10 to represent your matrix. Hexadecimal digits would probably be sufficient. You can then use inString( to decode the level into the matrix.
Code:
"0020010C...->Str1 //Level encoded as string
√(length(Str1->D
{Ans,Ans->[A]
For(A,1,D
For(B,1,D
inString("0123456789ABCDEF",sub(Str1,5A+B-5,1))-1->[A](A,B
End
End
With something like this, your compression method can support more than 9 distinct colors.
P.S. I am working on modifying my level processing utility so that it can interface with different compression algorithms. We can port levels for you after TI-FLOW is released.