Also, to go along with BTetris, I turned the game into a Hybrid BASIC version called Tetric H. You can grab it from the Cemetech Archives, and here's a pair of screenshots:

Because the 83 doesn't have support for the lowercase and other characters like the 83+ does Smile

And thanks! Very Happy

I think the 83+/84+ version is just a tiny bit faster than the CSE version is.
oh, makes sense, haha. And the 83+/84+ looks impressively responsive. Great work Smile
elfprince13 wrote:
oh, makes sense, haha. And the 83+/84+ looks impressively responsive. Great work Smile
Definitely seconded on this. After playing your and my versions, tifreak8x, I have a few feature requests for the next release of all of them (if any):

- [up] arrow for rotate. I find myself constantly hitting [up]
- The ability to move more than one side-to-side space per downward row
- I know you can't add a soft-drop (holding [down]), but a hard drop (immediately drop the piece into place) would be invaluable.
KermMartian wrote:
elfprince13 wrote:
oh, makes sense, haha. And the 83+/84+ looks impressively responsive. Great work Smile
Definitely seconded on this. After playing your and my versions, tifreak8x, I have a few feature requests for the next release of all of them (if any):

- [up] arrow for rotate. I find myself constantly hitting [up]
- The ability to move more than one side-to-side space per downward row
- I know you can't add a soft-drop (holding [down]), but a hard drop (immediately drop the piece into place) would be invaluable.


Well, the up arrow should be fairly easy to add in and not cause too much of a size increase to the game.

As to the others.. The left and right bit would require a delay/timer set up to be installed. The game is set up to essentially be on a higher level. Start a tetris game at level 9, and you only get to move those pieces once left or right as the piece falls (pending you find a good version of the game)

Hard dropping, I've given thought to. I'm not sure if I could get away with having a key pressed, store a value to a variable which would then ignore drawing the piece until it hits the bottom, and stores to the matrix. I'm not sure the code is set up in a way that would work.

And after looking at the code, I'm fairly certain to add those last 2 features would require a bit of a reorganization of code, or a rewrite. :<
tifreak8x wrote:
Well, the up arrow should be fairly easy to add in and not cause too much of a size increase to the game.
Yeah, I'm slightly disappointed that I forgot to add it to Tetric H before releasing it.

Quote:
As to the others.. The left and right bit would require a delay/timer set up to be installed. The game is set up to essentially be on a higher level. Start a tetris game at level 9, and you only get to move those pieces once left or right as the piece falls (pending you find a good version of the game)
Ah, that makes sense. In that case, I think there's value in making it a more challenging game. Smile

Quote:
Hard dropping, I've given thought to. I'm not sure if I could get away with having a key pressed, store a value to a variable which would then ignore drawing the piece until it hits the bottom, and stores to the matrix. I'm not sure the code is set up in a way that would work.

And after looking at the code, I'm fairly certain to add those last 2 features would require a bit of a reorganization of code, or a rewrite. :<
For the hard-drop, I think you could have a special case that just scans down from each block of the Tetromino to see where it would come to rest, then computing the highest Tetromino position from that, then jump to the placing code.
After getting a replacement TI-73, I've decided to take a look at BTetris again, to see about porting to that platform. The challenge of this is, the 73 has no Matrix support, so I'm converting the playing field to a list, without modifying the existing code too heavily. I've figured out how to use the current coordinate system used in the other versions to do checks and storing of values into the proper slots of the list. The code won't be pretty, but a few examples are:

(D*10)-(10-C) gets you the location of the list slot the top left pieces is currently located in.

E->[A](D+(L1(2)/3),C+(L1(1)/3

Is changed to

E->L2(((D*10)+((L1(2)*10)/3))-((10-C)+(L1(1)/3

I haven't even looked at the following for conversion:

If D+B=20 or iPart([A](D+(L1(2)/3)+1,C+(L1(1)/3)))=1 or iPart([A](D+(L1(4)/3)+1,C+(L1(3)/3)))=1 or iPart([A](D+(L1(6)/3)+1,C+(L1(5)/3)))=1 or iPart([A](D+(L1(Cool/3)+1,C+(L1(7)/3)))=1:Then

Or how to check if a line is full.
Since I unfortunately can't offer too much in the way of suggestions, considering that it looks like you have this more or less under control, I can only offer optimizations:

:: (D*10)-(10-C) to 10D-10+C
:: E->L2(((D*10)+((L1(2)*10)/3))-((10-C)+(L1(1)/3 to E->L2(10(D+L1(2)/3)-10+C-L1(1)/3

As you can see, very minor improvements indeed. Checking if line X is full will be very easy, assuming that L2 is your 10 wide, whatever tall board:
SourceCoder 3 (QUAD) wrote:
::If prod(seq(L2(Z),Z,10X,10X+9
::Disp "LINE IS FULL
I'll keep those in mind, but for now, make it work, then make it pretty Smile lol I still have to work on the other 3 pieces that need to be stored to the list and all that fun stuff, and see about implementing this into the game to see if it will work.

I'll have to see if all those commands are on the 73, not sure yet.
Indeed, functionality before optimization is important. I'm just trying to think what, if anything, I can do to help. Smile Best of luck figuring out all the different components you'll need to put together to get it working on the TI-73.
Oh, I know, and thank you Smile I'll definitely ask if I run into any roadblocks, or if anything looks like it might need optimized. Then, we can see about updating all versions with some of those above mentioned features Very Happy
Well, I think I finally figured out (It may not be optimized, and I need to plug it into the game before I worry about it, so no big deal there) a way to determine list elements properly.

L2(((10D)+10(L1(even)/3))-10+(C+(L1(odd)/3

I will be plugging these into the game sometime in the next couple of days, and see what this produces. Other errors have cropped up from copying the code from the 83 version and dumping to the 73. Hopefully I don't run into too many of those.

On the plus side, it does properly set up the board and text already, just have to put this together so it won't error out anymore.


Soooo I got this far Very Happy Sadly, it's a bit slow, going to have to see what I can do to potentially increase the speed. But for now, we have downward movement!

The error is stemming from the fact I've not moved from the matrix line checking to a list setup as of yet. Oddly enough, the T character normally used for matrix flipping, I think.
If that's the real speed, it's not horribly slow, but I look forward to seeing what optimizations you can come up with. We were talking about detecting filled rows in the list yesterday on IRC; I'd be happy to help if you get stuck. Also, I think you missed part of that final sentence; what about the transposition T operator?
Well, that's where the error stops at. I also find it odd that for a calc that doesn't have support for a matrix, it has matrix functions/commands. Unless that transposition thing can be used for non matrix related things?

Also, is there a command for me to use that would let me check from L2(#) to L2(#+10) and get a sum? With a little bit of a hack job of coding, I can make it see the first element of a line with little issue based on the value of D. Just not sure if sum( let's me plug in just a few elements from a list or not.
tifreak8x wrote:
Well, that's where the error stops at. I also find it odd that for a calc that doesn't have support for a matrix, it has matrix functions/commands. Unless that transposition thing can be used for non matrix related things?
I'm not aware of a use for transposition outside of matrices, so I'm surprised that it is allowing you to have that token in a TI-73 program.

Quote:
Also, is there a command for me to use that would let me check from L2(#) to L2(#+10) and get a sum? With a little bit of a hack job of coding, I can make it see the first element of a line with little issue based on the value of D. Just not sure if sum( let's me plug in just a few elements from a list or not.
The "easiest" way would be a seq() command, like this:
Code:
If 10=sum(seq(L2(X)!=0,X,D,D+9
Disp "10-item row starting at D is full

However, I'm not sure how fast that would be.
I'll plug it in here after while and check it out. Smile Thanks.
tifreak8x wrote:
I'll plug it in here after while and check it out. Smile Thanks.
Keep in mind that that's based on a 10-item-wide board and an input value D where D=1, 11, 21, and so on. In the meantime, I'll ponder if there's a way to perform this sum without creating sublists. I have an idea of something involving clever coefficients, but it requires more consideration.
I understand Smile I just have to set it up to go to the start of the columns each time, shouldn't be too hard to do. Not sure if I shouldn't use a new variable for that or not, though.


Decided that it needed a new screenshot for the CSE. I'll eventually update it with the files on ticalc and here.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 4 of 5
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement