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 ... 6 7 [8] 9 10 ... 207
106
TI Z80 / Re: yeongJIN_COOL's Universial base converter
« on: March 29, 2011, 06:49:32 pm »
Nice, that's pretty cool. I got bored and went though and optimized it and shaved off 31 bytes.

Spoiler For Sorry Chrome Users:
Code: [Select]
ClrHome
Disp "yeongJIN-COOL'S","Universal","Base Converter","
Pause "Press Enter
ClrHome
Input "TYPE NUM ",Str1
Input "BASE OF NUM ",A
Input "BASE TO CONVERT ",Y
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ→Str0
DelVar Xlength(Str1→B
For(D,1,A
If Str2=sub(Str0,D,1
D→E
End
X+(E-1)A^(C-1→X
End
"_→Str2
If not(X
"0→Str2
While X
sub(Str0,X-YiPart(X/Y)+1,1)+Str2→Str2
iPart(X/Y→X
If Ans<Y
Then
sub(Str0,Ans+1,1)+Str2→Str2
DelVar X
End
End
DelVar ADelVar BDelVar CDelVar DDelVar EDelVar XDelVar YDelVar Str0DelVar Str1Disp "RESULT",Str2

There are other optimizations that I missed I'm sure since I'm out of practice sort of. You can obviously shave off more if you take out the lowercase letters. It's a nice program though.

107
Axe / Re: Slope Physics Tutorial
« on: March 29, 2011, 05:07:34 pm »
Added to the tutorials page. It looks awesome.

108
TI-BASIC / Re: Sprite to Hex Routines
« on: March 27, 2011, 01:50:22 am »
Ah okay, cool.

109
TI-BASIC / Re: Sprite to Hex Routines
« on: March 27, 2011, 01:36:05 am »
For the sake of the topic it is just to display it and/or store it so no need to make recalling it Axe friendly :P So I believe this will be the end of optimizations on that one :P (Unless further optimizations are made to make it smaller that displays the same thing, of course.) That is a very tricky optimization though, how did you figure out the string order?

Code: [Select]
"_
For(A,0,7
For(B,0,1
Ans+sub("084C2A6E195D3B7F",sum(seq(2^Cpxl-Test(A,4B+C),C,0,3))+1,1
End
End
sub(Ans,2,16

110
TI Z80 / Re: World's Smallest Sprite Converter
« on: March 26, 2011, 11:23:42 pm »
In 83/84 basic, I got it down to 99 bytes with a one letter program name.  Wabbit crashed upon export, so I have no proof of it, but I doubt if it can get any smaller.

Edit: If I just have to display it, I can make it smaller (if anyone cares). :P

Check the new topic I made in the TI-BASIC sub-forum ;)

111
Portal X / Re: Portal X
« on: March 26, 2011, 09:04:49 pm »
Is there a reason that sometimes the box is sometimes one pixel away from him and other times it is right next to him? Just thought I'd point that out in case it becomes an issue for some reason.

112
TI-BASIC / Re: Sprite to Hex Routines
« on: March 26, 2011, 07:53:32 pm »
Is his to go to or from hex though? Or are you talking about he is using it to convert sprites to be put into the game?

113
TI-BASIC / Sprite to Hex Routines
« on: March 26, 2011, 06:13:16 pm »
So SirCmpwn's new topic about his 60 byte converter got me thinking about trying to beat it in Pure TI-BASIC...however I don't think it's possible. So, I just decided to try to make the smallest one I could possible and thought I'd share what I came up with. However, that's not the point of this thread. This thread is for people to post their own Pure TI-BASIC routines to convert a image on the graph screen into hex data. Just thought it'd be interesting to see what other people come up with.

Spoiler For People's Codes:
Mine:
Code: (Slower; 92 bytes) [Select]
"_
For(A,0,7
For(B,0,1
Ans+sub("0123456789ABCDEF",sum(seq(2^(3-C)pxl-Test(A,4B+C),C,0,3))+1,1
End
End
sub(Ans,2,16

Code: (Faster; 103 bytes) [Select]
"_
For(A,0,7
For(B,0,1
Ans+sub("0123456789ABCDEF",8pxl-Test(A,4B)+4pxl-Test(A,4B+1)+2pxl-Test(A,4B+2)+pxl-Test(A,4B+3)+1,1
End
End
sub(Ans,2,16

Code: (Just displays; Based off of Nemo's; 85 bytes) [Select]
For(A,0,15
Output(1,A+1,sub("0123456789ABCDEF",sum(seq(2^(3-B)pxl-Test(iPart(A/2),B+8fPart(A/2)),B,0,3))+1,1
End

Code: (Same as above but uses Text() to shave off an extra byte) [Select]
For(A,0,15
Text(8,4A,sub("0123456789ABCDEF",sum(seq(2^(3-B)pxl-Test(iPart(A/2),B+8fPart(A/2)),B,0,3))+1,1
End

Code: (Just displays; Based off of Phenomist's optimization; 84 bytes) [Select]
For(A,0,7
For(B,0,1
Output(1,2A+B+1,sub("084C2A6E195D3B7F",sum(seq(2^Cpxl-Test(A,4B+C),C,0,3))+1,1
End
End

Code: (Same as above but uses Text() to shave off an extra byte) [Select]
For(A,0,7
For(B,0,1
Text(8,8A+4B,sub("084C2A6E195D3B7F",sum(seq(2^Cpxl-Test(A,4B+C),C,0,3))+1,1
End
End

Nemo's:
Code: (92 bytes) [Select]
"_
For(A,0,15
Ans+sub("0123456789ABCDEF",sum(seq(2^(3-B)pxl-Test(iPart(A/2),B+8fPart(A/2)),B,0,3))+1,1
End
sub(Ans,2,16

Phenomist's:
Code: (Optimized from my slower one; 88 bytes) [Select]
"_
For(A,0,7
For(B,0,1
Ans+sub("084C2A6E195D3B7F",sum(seq(2^Cpxl-Test(A,4B+C),C,0,3))+1,1
End
End
sub(Ans,2,16

See what you can come up with and I'll add them to the list :)

Mine so far is the smallest at 84 bytes, 83 byte if done on graph screen, but it only displays it. For storing it Phenomist now holds the record at 88 bytes. Can anyone beat them? ;)

P.S. Sorry for using [code][/code] tags inside the [spoiler][/spoiler] tags but just want to see what people come up with without being influenced by other people's code.

114
TI-BASIC / Re: Improvements
« on: March 23, 2011, 04:43:11 pm »
You actually can just replace the If dim(rand(15)) with rand(15) because by the time it reaches fourth line in the main program Ans gets overwritten anyways. Unless one of your other program uses Ans as a starting variable? Just thought I'd tell you.

115
TI-BASIC / Re: Improvements
« on: March 23, 2011, 01:04:09 am »
Is there anything your particularly looking for? A certain part that you want to see if can be made faster, parts to be made smaller, improvements that you've thought of but not sure about?

116
TI Z80 / Re: Homescreen Game Pack
« on: March 22, 2011, 09:55:56 pm »
Oh okay. So just a typo while optimizing?

117
TI Z80 / Re: Homescreen Game Pack
« on: March 22, 2011, 09:07:37 pm »
Wait, what? I'm confused :P

118
Miscellaneous / Re: Programming Tutorials, Help, Etc.
« on: March 22, 2011, 04:46:57 pm »
Added.

119
Miscellaneous / Re: Programming Tutorials, Help, Etc.
« on: March 22, 2011, 03:30:54 pm »
Nah, Hot_Dog still wins by about eleven :P And added.

120
TI Z80 / Re: Homescreen Game Pack
« on: March 22, 2011, 01:27:50 pm »
Isn't there a statement that just adds 0.1 to the number? Isn't that how I assign the number a spike? Would it fix it if there was a (fPart(L1(A))≠.1) type of thing there?

Pages: 1 ... 6 7 [8] 9 10 ... 207