Page 9 of 12

Posted: Sun 29 May, 2005 9:46 pm
by KevinJB
I dont think your post above will stay on this forum for long.
I think you misinterpreted it. Although I understand your point, allow me to explain what I meant by it.

When I said, 'BASIC was MADE for idiots', I meant that the language was not created with people that have an IQ higher than 12 in mind- it's meant to be crash proof, so that no unknowing buyer makes a quick program, then ends up crashing their calculator.

What I did not say was 'BASIC is ONLY for idiots'... meaning that there are people who can make it almost as powerful as assembly- like you, Kevin (btw we have the same name ;)). So, T.I is not going to risk the situation Patori stated.

Which means that, when they were deciding whether or not to include archiving programs, they said 'BASIC is not being made for advanced programmers. So if it can crash the calc in the hands of an idiot, we won't include archiving prgms'.

Sorry for the long explanation, I just didn't want that post to be take the wrong way. Remember, there is a difference between MADE for, and ONLY for. Perhaps I should have said 'made with idiots in mind'.

EDIT #1: originally stated 'sorry for the explanation'. added long.
EDIT #2: Oh, yeah, Kevin, I thought you might want to know that I'm proud to be a BASIC programmer too- as well as assembly. In fact, I'm about 75% done with my own RPG in TI-BASIC, called Dragon Tears.

Posted: Sun 29 May, 2005 9:50 pm
by DJ_O
Rezek wrote:
I dont think your post above will stay on this forum for long.
I think you misinterpreted it. Although I understand your point, allow me to explain what I meant by it.

When I said, 'BASIC was MADE for idiots', I meant that the language was not created with people that have an IQ higher than 12 in mind- it's meant to be crash proof, so that no unknowing buyer makes a quick program, then ends up crashing their calculator.

What I did not say was 'BASIC is ONLY for idiots'... meaning that there are people who can make it almost as powerful as assembly- like you, Kevin (btw we have the same name ;)). So, T.I is not going to risk the situation Patori stated.

Which means that, when they were deciding whether or not to include archiving programs, they said 'BASIC is not being made for advanced programmers. So if it can crash the calc in the hands of an idiot, we won't include archiving prgms'.

Sorry for the long explanation, I just didn't want that post to be take the wrong way. Remember, there is a difference between MADE for, and ONLY for. Perhaps I should have said 'made with idiots in mind'.
No I didnt fully misinterpreted it, I just though that saying "for idiots" would be a bit harsh for some people, but I didnt found it really harsh for me though

I think you should have said:
"TI-BASIC was made by idiots." :lol: j/k

EDIT: oops missed your double-post, nice you are working on a RPG too I cant wait to see screenshots :)

EDIT 2: hmm Dragon Tears, remind me of a RPG I made with a friend 2.5 years ago called Mystique: La Larme Du Dragon (La Larme Du Dragon means The Dragon Tear in english) :roll:

Posted: Sun 29 May, 2005 11:03 pm
by merthsoft
Kevin wrote:It's annoying for game programmers though, but its because TI philosophy is that calcs are for maths, not gaming :roll:
Calculators made to calculate something, blasphemy...

Posted: Sun 29 May, 2005 11:07 pm
by thecheat
yes blasphemy get the heretic!!!!! :lol:

Posted: Mon 30 May, 2005 12:26 am
by KevinJB
EDIT: oops missed your double-post, nice you are working on a RPG too I cant wait to see screenshots Smile
screenshots? bahh... it'll be done on wednsday! (see sig) :twisted:

EDIT 2: hmm Dragon Tears, remind me of a RPG I made with a friend 2.5 years ago called Mystique: La Larme Du Dragon (La Larme Du Dragon means The Dragon Tear in english)
Great minds think alike. :wink:
It's annoying for game programmers though, but its because TI philosophy is that calcs are for maths, not gaming Rolling Eyes
Not always ;) (send9prgmXXX)

Posted: Mon 30 May, 2005 12:35 am
by thecheat
err your sig says:
CANT THINK OF A GOOD SIG YET

how is that supposed to tell how close you are to being done?

Posted: Mon 30 May, 2005 1:05 am
by KevinJB
uh, woopsie! wrong account :oops:. check my sig on unitedti :roll: !
EDIT: NOW check it.. :wink:

Posted: Mon 30 May, 2005 1:14 am
by thecheat
hehe raised it up 100 people :P 8) :D *stops being off topic*

Posted: Mon 30 May, 2005 2:35 am
by KevinJB
167 :shock: if you just 'upped' it to 100, that means 67 people checked the site JUST FROM THIS POST! (it's been on anther sig on this forum, that didn't happen). *hopes to build suspense* :twisted: :twisted: :twisted: </off topic>

To make this on topic, hhe is a nice text input optimization:
--------------------------------------------------------
When you need to input a string on the graph screen, most people choose one of two methods, the most popular being the first:
1- Getkey Loop, then a series of 'If A=31:"A"->Str1', on and on and on.
2- Create a large string, where the 31st place in it is an 'A', then sub(str1,getkey,1) it...
The first one is SLOW, and the second one take a HUGE amount of memory for the string, not to mention the string creation. In the words of Sigma, hopefully you are depressed by now, so here's the simple way: (// are comments)

ROUTINE: Text Input- Store a keypress character to str1.

Code: Select all

"ABCDEFGHIJKLMNOPQRSTUVWXYZ"->Str0     //Holds our placefinder
Repeat Ans:Getkey->A:End     //Simple getkey loop
10 fPart( A / 10 ) -> B     //B holds first decimal place of keycode
iPart(A / 10) -> A     //A holds 'tens' or second decimal place

//This next part is a formula to convert keypress to 1-26 pointer to char.
A-4-> A     //A is now 0 - 5
B-((B^2)A/(A+1)  //A, B, and C are now correct
4A -> A                     //??? Can't remember, just know it's part of the formulae!
If not(A):B->C           //A,B,and,C
If A=4:A+B-1 -> C     //D,E,F,G,H
If A=8:A+B -> C        //I,J,K,L,M
If A=12:A+B+1 -> C  //N,O,P,Q,R
If A=16:A+B+2 -> C  //S,T,U,V,W
If A=20:A+B+3 -> C  //X,Y,Z
Disp sub(Str0,C,1)     //Brownie points if you noticed a pattern in the above if/then statements!
I'm working on a complete 1 line formula for just a keypress based on the patterns. It's difficult however.
BTW: I know the above code could be HILARIOUSLY optimized, but I left it there for less confusion

-------LEFT FOR POSTERITY-------------
ADMINS: Give me about an hour- I lost the rest of the formulae, I'll have it here soon (all i remember is it has to do with B^2... :(, but i have it stored somewhere.)

EDIT: By dumb lock I had the orignal program stored in groups, but half of it is gone! So I've updated this post, and am currently working out the last half...
EDIT: DONE!!!!

Posted: Mon 30 May, 2005 3:18 am
by DarkerLine
The second way does take a lot of memory, but something like

Code: Select all

Repeat Ans:getKey:End
sub("ABC       DEFGH     IJKLM     NOPQR     STUVW     XYZ",Ans-40,1
is still smaller than most methods of trying to shrink the size of the string. The code below is most likely the best you can do:

Code: Select all

Repeat Ans:getKey:End
sub("ABC  DEFGHIJKLMNOPQRSTUVWXYZ",Ans-20-5int(.1Ans),1

Posted: Thu 09 Jun, 2005 12:08 pm
by dysfunction
Which is faster,

Code: Select all

If...
Then
command
Else
command
End
or

Code: Select all

If...
command
If...
command

Posted: Sat 11 Jun, 2005 9:38 pm
by DarkerLine
There are no general rules for If statements. The best way is to test both and see which gives you the better speed.

Posted: Mon 18 Jul, 2005 3:23 am
by tokijnct
Is there any way to optimize the following code for recalling map data?

Temp(3)=Map CoordX
Temp(4)=Map CoordY

Code: Select all

 PRGM MAP01A
:If Temp(3)=10 and 10=Temp(4
:[matrix]
:If Temp(3)=10 and 9=Temp(4
:[matrix]
:
and so on...
:
:Ans=>[A]                     - for XLib
:{1=>theta                    - Tells previous prgm that map data has been obtained to avoid ERR:UNDEFINED
This code currently gives me about 9 screens worth of a map for over 2.5k of memory'

Posted: Sun 18 Sep, 2005 3:34 pm
by DarkerLine

Code: Select all

{Temp(3),Temp(4 -> L1

If min(L1={10,10:[matrix]
If min(L1={10,9:[matrix]
...
there's one way.

Code: Select all

10Temp(3)+Temp(4 -> A
If A=99:[matrix]
If A=98:[matrix]
...
And there's another. (you'd use 0..9 for map coordinates instead of 1..10)

Posted: Mon 19 Sep, 2005 7:02 pm
by tifreak8x
Rezek wrote:167 :shock: if you just 'upped' it to 100, that means 67 people checked the site JUST FROM THIS POST! (it's been on anther sig on this forum, that didn't happen). *hopes to build suspense* :twisted: :twisted: :twisted: </off topic>

To make this on topic, hhe is a nice text input optimization:
--------------------------------------------------------
When you need to input a string on the graph screen, most people choose one of two methods, the most popular being the first:
1- Getkey Loop, then a series of 'If A=31:"A"->Str1', on and on and on.
2- Create a large string, where the 31st place in it is an 'A', then sub(str1,getkey,1) it...
The first one is SLOW, and the second one take a HUGE amount of memory for the string, not to mention the string creation. In the words of Sigma, hopefully you are depressed by now, so here's the simple way: (// are comments)

ROUTINE: Text Input- Store a keypress character to str1.

Code: Select all

"ABCDEFGHIJKLMNOPQRSTUVWXYZ"->Str0     //Holds our placefinder
Repeat Ans:Getkey->A:End     //Simple getkey loop
10 fPart( A / 10 ) -> B     //B holds first decimal place of keycode
iPart(A / 10) -> A     //A holds 'tens' or second decimal place

//This next part is a formula to convert keypress to 1-26 pointer to char.
A-4-> A     //A is now 0 - 5
B-((B^2)A/(A+1)  //A, B, and C are now correct
4A -> A                     //??? Can't remember, just know it's part of the formulae!
If not(A):B->C           //A,B,and,C
If A=4:A+B-1 -> C     //D,E,F,G,H
If A=8:A+B -> C        //I,J,K,L,M
If A=12:A+B+1 -> C  //N,O,P,Q,R
If A=16:A+B+2 -> C  //S,T,U,V,W
If A=20:A+B+3 -> C  //X,Y,Z
Disp sub(Str0,C,1)     //Brownie points if you noticed a pattern in the above if/then statements!
I'm working on a complete 1 line formula for just a keypress based on the patterns. It's difficult however.
BTW: I know the above code could be HILARIOUSLY optimized, but I left it there for less confusion

-------LEFT FOR POSTERITY-------------
ADMINS: Give me about an hour- I lost the rest of the formulae, I'll have it here soon (all i remember is it has to do with B^2... :(, but i have it stored somewhere.)

EDIT: By dumb lock I had the orignal program stored in groups, but half of it is gone! So I've updated this post, and am currently working out the last half...
EDIT: DONE!!!!
Hmm, I made two programs, one that types text on the homescreen, the other on the graphscreen, both programs are only 330 bytes each... And it runs fairly fast. There is also my command input program, used for TI-City, it runs extremely fast...

Text Program: http://calcgames.org/cgi-bin/files/files.cgi?ID=622

TI-City: http://calcgames.org/cgi-bin/files/files.cgi?ID=495

Something you might check out...