Author Topic: Tetris in TI basic  (Read 17757 times)

0 Members and 1 Guest are viewing this topic.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Tetris in TI basic
« Reply #60 on: April 18, 2010, 10:11:49 pm »
Well don't let this discourage you from working on games.  If anything let it be a learning experience :) There is always more we can learn about the TiOS, even I don't know all the tricks.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Tetris in TI basic
« Reply #61 on: April 18, 2010, 11:14:25 pm »
But sometimes it gets so bad that you want to run back to axe parser and put a blanket over your head....

Once on the 86 I tried a simple grayscale method. I found that clrdraw actually takes less time than zooming, and got a flickery gray! However, you had to repeat it over and over as, when it got to the goto and lbl, it would have a noticable pause.

I would've killed for 86 xlib that day.

EDIT: I meant it takes more time than zooming
« Last Edit: April 19, 2010, 09:50:22 am by willrandship »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Tetris in TI basic
« Reply #62 on: April 18, 2010, 11:15:57 pm »
But sometimes it gets so bad that you want to run back to axe parser and put a blanket over your head....

Once on the 86 I tried a simple grayscale method. I found that clrdraw actually takes less time than zooming, and got a flickery gray! However, you had to repeat it over and over as, when it got to the goto and lbl, it would have a noticable pause.

I would've killed for 86 xlib that day.
oh never use Lbl/goto for loops. Use While/repeat/for() with End so you dont have the pause thing

On the 83+ with xlib you can have decent looking grayscale and on the SE with Omnicalc too (see Reuben Quest)
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Tetris in TI basic
« Reply #63 on: April 18, 2010, 11:41:43 pm »
problem is, I had an 86.That's why I said I'd kill for xlib. If you don't know what that means (local colloquealism) basically it means I really wanted it.

Actually, at that point I didn't know how to use the for( function. :P Now i can't try it since that calc is dead.

I got really good grayscale with disp once, but it left annoying strings of flickering characters above it.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Tetris in TI basic
« Reply #64 on: April 18, 2010, 11:46:18 pm »
Yeah I know, I was just saying about the 83+ ^^

I wish the 86 had sometime like xLIB or Axe Parser and that the calc was more popular. It has a lot of RAM and is user friendly. The BASIC language on it is 1.5x slower than the TI-85 x.x so it can't achieve very complex games :(

Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Tetris in TI basic
« Reply #65 on: April 19, 2010, 09:38:04 am »
it is also very old, older than the 83+ but newer than the 83 I believe.
However, I'll bet he was right in the description about it being overclocked. No calc had that speed in TI-Basic Naturally. after all, that was the time when overclocking was popular.

Pics take up a little more space too, but not a whole lot more. On the 86 they're 1024 Bytes.

The real issue I had with the 86 was no archive space. Using just ram meant you could only have about 5 pics before your program got rather unwieldly.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Tetris in TI basic
« Reply #66 on: April 22, 2010, 04:47:34 pm »
yeah I still wish TI marketted the 86 better and made a 86+ or 86+SE. It was awesome and not that hard to use. Some people before argued that the 89 was a TI-86 when I said I wish there was a 86+, but the 89 is not a z80, has less user-friendly usage due to the many options and different TI-BASIC language. It's just not the same calc
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline theUnnamed

  • LV3 Member (Next: 100)
  • ***
  • Posts: 63
  • Rating: +3/-3
    • View Profile
Re: Tetris in TI basic
« Reply #67 on: April 23, 2010, 07:13:07 am »
I like the 89 It fixes a lot of things that were wrong with the TI basic language.  For example something I found yesterday  matâ–¶list() and listâ–¶mat() functionality was fixed to A) make sense and B) be useful.
Although I don't like having a difference between end statements for if while and for I liked the single end statement It allow for some useful exploits of the interpreter.
It is much different from 84 basic though

Edit: I think you should disregard this cause I think I'm getting my calculators confused
« Last Edit: April 23, 2010, 07:21:11 am by theUnnamed »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Tetris in TI basic
« Reply #68 on: April 23, 2010, 09:41:57 am »
I liked the EndIf, EndWhile, etc, actually. Altough it can end up confusing for someone used to just one instruction, it made it much easier IMHO to spot loops, conditions and other stuff that were not closed (had a missing End instruction). With just End, you have to count each While/if/repeat/etc. then count down everytime you see "End" and you can easily mess up in complex code with like 6 or 7 nested loops/if
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline theUnnamed

  • LV3 Member (Next: 100)
  • ***
  • Posts: 63
  • Rating: +3/-3
    • View Profile
Re: Tetris in TI basic
« Reply #69 on: April 23, 2010, 04:20:37 pm »
I see the benefit but because of it you can't play games like this:

Code: [Select]
:1->X
:goto START
:lbl LABEL
:pause "LABEL
:End
:lbl START
:pause "start
:If x=12
:Then
:pause "X=12
:Return
:End
:while X<11
:Pause "WHILE
:x+1->x
:If remainder(x,2
:goto LABEL
:Pause "While BOTTOM
:End
:For(b,1,2
:goto LABEL


because For( behaves differently from While when exiting you can do some really crazy things
In practice this trick is extremely hard to pull off but you can do things like inline recursion and complex stack insanity rather quickly without the use of extra programs.
Normally doing this is like playing with fire but it's occasionally useful.
« Last Edit: April 23, 2010, 04:22:23 pm by theUnnamed »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Tetris in TI basic
« Reply #70 on: April 23, 2010, 05:08:19 pm »
is that the Goto trick with End to not have memory leaks that is discussed on TI-BASIC Developer? I guess maybe that's a disadvantage of EndIf/EndWhile, then x.x. I never used this trick, though, since the last time I ever used a Lbl/Goto command in a TI-83 Plus BASIC game was in The Reign Of Legends 3, which I worked on from December 3rd 2003 to June 11th 2004. Afterward none of my game contained Lbl/Goto again and I did not know about that trick because TIBD did not exist until late 2006, at a time where I hardly coded anymore.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline theUnnamed

  • LV3 Member (Next: 100)
  • ***
  • Posts: 63
  • Rating: +3/-3
    • View Profile
Re: Tetris in TI basic
« Reply #71 on: April 23, 2010, 05:21:34 pm »
this is something of my own meandering. Although other people have probably figured it out.  I'm sure builder boy and weregoose have figured out this trick and possibly used it once or twice.  It has limited application outside of complicated implicit stacks and even then it's far easier to use sub routines. The applications for which it gains you anything are not easy to determine at all. I used it once  (other then messing around with it to confuse people) in a program that shaded an arbitrary area.
« Last Edit: April 23, 2010, 05:22:50 pm by theUnnamed »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Tetris in TI basic
« Reply #72 on: April 23, 2010, 05:40:32 pm »
yeah I heard it wasn't very practical in many cases. I guess it can come useful for people who love to use Lbl/goto a lot and understands such code better. I understand that several nested While/repeat can become confusing about where each ends x.x

I could show the code for Illusiat 13 menu and I am fairly certain some people may get confused
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Tetris in TI basic
« Reply #73 on: April 24, 2010, 01:46:53 am »
I believe there is a Thread about that method in the Useful Routines section :) It is indeed a very very tricky and cool way to do subs, and jumping around the program.  What can be considered a glitch is also an exploit! ;)

Offline jsj795

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1105
  • Rating: +84/-3
    • View Profile
Re: Tetris in TI basic
« Reply #74 on: April 24, 2010, 02:22:05 am »
yeah I heard it wasn't very practical in many cases. I guess it can come useful for people who love to use Lbl/goto a lot and understands such code better. I understand that several nested While/repeat can become confusing about where each ends x.x

I could show the code for Illusiat 13 menu and I am fairly certain some people may get confused

With the hnefatafl AI, there was like 7 stacked If...Then/While/For that it was hard to keep track of all the ends. :P

And this routine does seem very useful. Especially if you want to decrease the number of programs for the ease of transfer (I'm now considering to use for Hnefatafl since I want to make it all into one program, but there are many recurring codes so I might do this thing)


Spoiler For funny life mathematics:
1. ROMANCE MATHEMATICS
Smart man + smart woman = romance
Smart man + dumb woman = affair
Dumb man + smart woman = marriage
Dumb man + dumb woman = pregnancy
2. OFFICE ARITHMETIC
Smart boss + smart employee = profit
Smart boss + dumb employee = production
Dumb boss + smart employee = promotion
Dumb boss + dumb employee = overtime
3. SHOPPING MATH
A man will pay $2 for a $1 item he needs.
A woman will pay $1 for a $2 item that she doesn't need.
4. GENERAL EQUATIONS & STATISTICS
A woman worries about the future until she gets a husband.
A man never worries about the future until he gets a wife.
A successful man is one who makes more money than his wife can spend.
A successful woman is one who can find such a man.
5. HAPPINESS
To be happy with a man, you must understand him a lot and love him a little.
To be happy with a woman, you must love her a lot and not try to understand her at all.
6. LONGEVITY
Married men live longer than single men do, but married men are a lot more willing to die.
7. PROPENSITY TO CHANGE
A woman marries a man expecting he will change, but he doesn't.
A man marries a woman expecting that she won't change, and she does.
8. DISCUSSION TECHNIQUE
A woman has the last word in any argument.
Anything a man says after that is the beginning of a new argument.

Girls = Time * Money (Girls are a combination of time and money)
Time = Money (Time is money)
Girls = Money squared (So, girls are money squared)
Money = sqrt(Evil) (Money is also the root of all evil)
Girls = sqrt(Evil) squared (So, girls are the root of all evil squared)
Girls = Evil (Thus, girls are evil)
*Girls=Evil credit goes to Compynerd255*