Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - meishe91

Pages: 1 ... 107 108 [109] 110 111 ... 207
1621
Chip's Challenge for Ti-Nspire / Re: Chips Challenge for TI-Nspire
« on: August 27, 2010, 05:55:20 pm »
Sweet. Yet another game being ported to Nspire :) To bad I don't have one :P Hope things go well with this :D

1622
S.A.D. (Seek and Destroy) / Re: The Complete Guide to Modifying S.A.D.
« on: August 27, 2010, 05:50:46 pm »
Very cool. I remember you saying you were going to come out with this. Glad it is being worked on early :)

1623
TI Z80 / Re: TI-Party
« on: August 27, 2010, 05:44:54 pm »
It could also be something like that WarioWare, Inc. game from the sounds of it. Sounds cool though :)

1624
TI-BASIC / Re: Run-Length Encoding for Strings
« on: August 26, 2010, 05:57:03 pm »
I haven't implemented any of it yet :P I'm debating what I wanna do in terms of using this stuff.

1625
TI Z80 / Re: Unnamed RPGish Game
« on: August 26, 2010, 05:51:17 pm »
Or you can just type it on the graph screen in the top left corner and use my Map Converter to put it in a string then to a matrix. Though I've been meaning to update that so it can do all the conversions, well just provide to codes to all the conversions. Might be a little easier for some people maybe.

1626
Congratulations you guys!

1627
TI-BASIC / Re: Run-Length Encoding for Strings
« on: August 25, 2010, 11:45:33 pm »
Ok, so a little update. First I'm gonna post the modified code that nemo made that just cleans everything up so you only have your original string and the outputted string left. Just makes it a little cleaner in the end, I think.

Code: (RLECMPN) [Select]
DelVar BDelVarA"_→Str2
Str1+Ans→Str1
"sub(Str1,B+1,1→u
Repeat u="_
Repeat A=9 or u≠sub(Str1,B+A+1,1
A+1→A
End
Str2+sub("0123456789",A+1,1)+u→Str2
B+A→B
DelVar AEnd
DelVar ADelVar BDelVar usub(Str1,1,length(Str1)-1→Str1
sub(Str2,2,length(Str2)-1→Str2

Ok, now for the decompression part. While I am still working on decompressing what my compression makes but I do have a way of decompressing what nemo's code gives you.

Code: (RLEDECMN) [Select]
"_→Str3
For(A,1,length(Str2)-1,2
For(B,1,expr(sub(Str2,A,1
Str3+sub(Str2,A+1,1→Str3
End
End
DelVar ADelVar Bsub(Str3,2,length(Str3)-1→Str3

Edit:
Figured out how to decompress mine now too :)

Code: (RLEDECMP) [Select]
"_→Str3
Str2+Ans→Str2
DelVar A1→B
Repeat "_"=sub(Str2,B+A,1
Repeat not(inString("0123456789",sub(Str2,B+A,1
A+1→A
End
For(C,1,expr(sub(Str2,B,A
Str3+sub(Str2,B+A,1→Str3
End
B+A+1→B
DelVar AEnd
DelVar ADelVar BDelVar Csub(Str2,1,length(Str2)-1→Str2
sub(Str3,2,length(Str3)-1→Str3

I'm sure there are some optimizations to be made.

1628
TI-BASIC / Re: Run-Length Encoding for Strings
« on: August 25, 2010, 10:12:04 pm »
Ok, sorry. I'll try to explain. I'll use part of my actual map as the example. So my original map data goes as shown:

Code: [Select]
111111111111111
100300020000000
100305020000000
100300020000000
100344420000000

So the actual sting looks like:

Code: [Select]
"111111111111111100300020000000100305020000000100300020000000100344420000000→Str1
When I was going to compress the data the first time I ran into that issue you were saying, how like the first part will say "151." So instead of setting a limit, which I thought about, I decided I just wanted to compress this thing in whole without a limit to see how much memory I could save. But with the map being in numbers it was to hard to read so I came up with that second program:

Code: [Select]
"_"+Str1→Str2
For(A,2,1+length(Str2
sub(Str2,1,A-1)+sub("SATRWHM",expr(sub(Str2,A,1))+1,1)+sub(Str2,A+1,length(Str2)-A→Str2
End
sub(Str2,2,length(Str2)-1,Str2

So since each number represented a different tile I just matched the number up with a letter that represented the tile.

0=Space=S
1=Border Tree=A
2=Mid-Map Tree=T
3=Rock=R
4=Water=W
5=House=H
6=Mart=M

That program just replaces each number with its respective token turning the map into:

Code: [Select]
AAAAAAAAAAAAAAA
ASSRSSSTSSSSSSS
ASSRSHSTSSSSSSS
ASSRSSSTSSSSSSS
ASSRWWWTSSSSSSS

Therefore making the string now:

Code: [Select]
AAAAAAAAAAAAAAAASSRSSSTSSSSSSSASSRSHSTSSSSSSSASSRSSSTSSSSSSSASSRWWWTSSSSSSS→Str1
Using that string there is no issue reading "16A2S1R3S..." So now if I can get the decompression to work correctly you don't run into the issue of it reading three numbers in a row or only two or something. Does that make more sense?

1629
TI-BASIC / Re: Run-Length Encoding for Strings
« on: August 25, 2010, 09:50:25 pm »
I'm fairly sure the limit thing is not the issue because I don't have my map as numbers. I changed the whole map to letter tokens to help make it readable, via the second code. So my compressed data looks something like "19A12B4D5A..." I actually might have been reading the wrong string data though, though I never checked. Probably should have :P I can check later. But the decompression routine I have now relies on the fact that you are using a non-integer token for your map. I'm still working on it but it looks like it is working.

On the limit thing, I never said it wasn't a good idea. I said it was unnecessary for what I was doing because it was just to compress the data, which is in letter tokens, down. If I were to use RLE for my game I would probably have the limit thing for a couple reasons.

1630
TI-BASIC / Re: Run-Length Encoding for Strings
« on: August 25, 2010, 08:58:17 pm »
Well just from looking at it it looks like those are all valid. Thanks. I didn't think about using u to store sub(Str1,B+1,1, though that is still a new thing for me. I'm testing it all right now. As for the set A to zero first thing, I thought of that but didn't wanna bother with adjusting things if it needed to be done at the time but I can look at it. It looks like you're right though, I think the only change would be to change row seven to Repeat u≠(Str1,B+A+1,1. As for the limit thing I'm not sure. I mean I know what you mean, since my original string was just numbers, but that's why I provided that second set of code to replace the numbers with a different token so it can be read easily.

So, as I was writing this it finished compressing and those changes did work. Though it took a little longer because, I think, it has to solve u each time it comes up. Which isn't a big deal though. I'm currently testing the changes with A.

As for a decompresser, I am still working on it. I'm close, I think. I got something to work but I don't think it worked properly because the final string ended up being like 200 bytes less than it normally is ??? The weird part is that the beginning and end both match up just fine though, so I don't know what is going wrong with it (unless someone else can explain a loss in bytes).

And again, while writing this the changing A program finished and it seemed to work as well. I'll make these changes to the first post though. Thanks again, nemo.

1631
TI-BASIC / Re: Run-Length Encoding for Strings
« on: August 25, 2010, 06:35:06 pm »
Nah, there is both of those, for what ever reason that we will never know. Thanks though :)

1632
TI-BASIC / Re: Run-Length Encoding for Strings
« on: August 25, 2010, 06:32:22 pm »
I believe its the String>Equ( command that is the useless one.  But for some reason it doesn't go both ways.  You need Equ>String() to transfer an equation to a string, but you dont need String>Equ() to transfer a String to an equation o.O

Ya, Builder, I think you're right. That is yet another thing that TI failed upon :P Thanks for clearing that up :)

1633
TI-BASIC / Re: Run-Length Encoding for Strings
« on: August 25, 2010, 06:26:45 pm »
When I try to do that though I get a ERR:DATA TYPE ???

By the way, I was just telling Z that I knew you'd pop in sometime and find something :P Also, thanks :)

1634
TI Z80 / Re: Unnamed RPGish Game
« on: August 25, 2010, 06:18:46 pm »
Oh, sorry, I didn't explain that right about the error. You get the error when it's being displayed since you are adding C to B you will end up with a 95 and 96 as your x-coordinate therefore causing the error. I didn't mean when going through the string.

1635
TI Z80 / Re: Unnamed RPGish Game
« on: August 25, 2010, 06:11:10 pm »
That doesn't always work. Like in this case you get a ERR:DOMAIN. It is also a bit slower. But it is smaller. It all really depends on the situation though because certain ending tokens need different amounts of spaces to clear them.

Pages: 1 ... 107 108 [109] 110 111 ... 207