Some are aware of this but I thought I would share it a little more people.
[quote="Old Update"]About: Compression In Basic
I started playing around with compression with basic (no way ), this is atm just for my game Tank. It will only work with a closed area.
How it works:
It takes a Matrix and compresses it in a format of the number of times the number appears and decimal places of what the number is. The compressed matrix is in a form of list (L1), and the first two spots are the dimensions.
Example:
Code: Select all
/matrix data - 16x24
19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1
19.1 8 8 8 8 8 8 8 8 8 8 8 8 8 22.2 33.2 8 8 8 8 8 8 8 19.1
19.1 8 8 8 8 8 8 19.1 8 8 8 8 8 8 8 8 8 8 8 34.2 21.2 8 8 19.1
19.1 8 19.1 8 8 8 8 19.1 8 8 8 8 8 8 8 8 8 8 8 22.2 33.2 8 8 19.1
19.1 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 19.1
19.1 8 8 8 18.2 18.2 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 19.1
19.1 8 8 8 8 8 8 8 34.2 15.2 15.2 15.2 15.2 15.2 15.2 21.2 8 8 8 8 8 8 8 19.1
19.1 8 8 8 8 8 8 8 20.2 8 8 19.1 8 8 8 20.2 8 8 8 8 8 8 8 19.1
19.1 8 8 8 8 8 8 8 20.2 8 8 8 19.1 8 8 20.2 8 8 8 8 8 8 8 19.1
19.1 8 8 8 8 8 8 8 22.2 15.2 15.2 15.2 15.2 15.2 15.2 33.2 8 8 8 8 8 8 8 19.1
19.1 8 8 8 8 18.2 8 8 8 8 8 8 8 8 8 8 8 8 13.2 8 8 8 8 19.1
19.1 8 8 8 8 18.2 18.2 8 8 8 8 8 8 8 8 8 8 13.2 13.2 8 8 8 8 19.1
19.1 8 18.2 18.2 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 13.2 13.2 8 8 19.1
19.1 8 8 18.2 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 13.2 8 8 8 19.1
19.1 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 19.1
19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1 19.1→[A]
Code: Select all
/Once converted
{16,24,25.191,13.08,1.222,1.332,7.08,2.191,6.08,1.191,11.08,1.342,1.212
,2.08,2.191,1.08,1.191,4.08,1.191,11.08,1.222,1.332,2.08,2.191,22.08,2.191
,3.08,2.182,17.08,2.191,7.08,1.342,6.152,1.212,7.08,2.191,7.08,1.202,2.08
,1.191,3.08,1.202,7.08,2.191,7.08,1.202,3.08,1.191,2.08,1.202,7.08,2.191
,7.08,1.222,6.152,1.332,7.08,2.191,4.08,1.182,12.08,1.132,4.08,2.191,4.08
,2.182,10.08,2.132,4.08,2.191,1.08,2.182,15.08,2.132,2.08,2.191,2.08,1.182
,15.08,1.132,3.08,2.191,22.08,25.191→L1
Code: Select all
2.191
{16,24,25.191,13.08,1.222,1.332,7.08,Ans,6.08,1.191,11.08,1.342,1.212,2.08
,Ans,1.08,1.191,4.08,1.191,11.08,1.222,1.332,2.08,Ans,22.08,Ans,3.08,2.182
,17.08,Ans,7.08,1.342,6.152,1.212,7.08,Ans,7.08,1.202,2.08,1.191,3.08,1.202
,7.08,Ans,7.08,1.202,3.08,1.191,2.08,1.202,7.08,Ans,7.08,1.222,6.152,1.332
,7.08,Ans,4.08,1.182,12.08,1.132,4.08,Ans,4.08,2.182,10.08,2.132,4.08,Ans
,1.08,2.182,15.08,2.132,2.08,Ans,2.08,1.182,15.08,1.132,3.08,Ans,22.08,25.191→LÂÂÂ