Author Topic: TI-83+/84+ (SE) BASIC Tips, Tricks, and Routines  (Read 15044 times)

0 Members and 2 Guests are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: TI-83+/84+ (SE) BASIC Tips, Tricks, and Routines
« Reply #30 on: November 09, 2010, 12:33:47 am »
Yeah. I just heard somewhere that for the 4 directional key detection they were much slower than the larger way.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: TI-83+/84+ (SE) BASIC Tips, Tricks, and Routines
« Reply #31 on: November 09, 2010, 12:42:34 am »
Ya, I think I remember that but I don't think it's that much slower, personally.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: TI-83+/84+ (SE) BASIC Tips, Tricks, and Routines
« Reply #32 on: November 09, 2010, 01:01:55 am »
Well, it actually made a big difference in games like Illusiat 13, apparently (someone modified it once to check). Like under 2 FPS framerate during walking instead of over 3.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: TI-83+/84+ (SE) BASIC Tips, Tricks, and Routines
« Reply #33 on: November 12, 2013, 01:36:01 am »
Is it me of is Goto sometimes faster than While/Repeat...? O.O

Make two programs, each having the following code at the very start:
Code: [Select]
1->A
While 1
rand
A+1->A
End

Code: [Select]
1->A
Lbl 1
rand
A+1->A
Goto 1


This Goto speed gain over While/Repeat only happens if the Lbl is at the very start of the program.

A For loop is even faster since I can then remove the A+1->A line, but if it's code with no variable incrementing, then For seems slightly slower than Goto (although faster than While/Repeat).

Could someone else run those tests to confirm? Although the speed gain would be negligible for large code, maybe it could be a slight speed boost in some cases (although the Title/menu code would need to be placed below the gameplay one, with a Goto at the very start of the program.
« Last Edit: November 12, 2013, 01:38:22 am by DJ Omnimaga »

Offline blue_bear_94

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 801
  • Rating: +25/-35
  • Touhou Enthusiast / Former Troll / 68k Programmer
    • View Profile
Re: TI-83+/84+ (SE) BASIC Tips, Tricks, and Routines
« Reply #34 on: November 12, 2013, 03:56:22 pm »
Another idea is to have a subprogram for the main game.
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (2.30 2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag  東方ぷろの

Offline Hexatron

  • LV3 Member (Next: 100)
  • ***
  • Posts: 76
  • Rating: +2/-1
    • View Profile
Re: TI-83+/84+ (SE) BASIC Tips, Tricks, and Routines
« Reply #35 on: November 13, 2013, 08:05:42 pm »
Convert Hex to Dec
Code: [Select]
DelVar SInput Str1
For(I,1,length(Str1
inString("0123456789ABCDEF",sub(Str1,I,1))-1 -> C
S+C16^(length(Str1))-I -> S
End
S
« Last Edit: November 13, 2013, 08:11:07 pm by Hexatron »