"Advanced TI-82 Programming Techniques"

by Frank Force


Hello everyone. I got a big response from the last column, so thanks to all. I should mention that I responded to EVERY piece of mail. Thanks to my readers I can slack off this issue and reprint some of these letters. I was really busy this month, but next month I hope to return to the usual format. I think that a lot of people are interested in AI which I haven't covered yet. So I am working on a Tic-Tac-Toe AI program that we will completely pull apart and analyze next month. I will still be including a letters section next column, but it will be in conjunction with a lesson. I still need you're letters, my address is great@voicenet.com

OOPS

I made a mistake in the last column (who could have guessed?) At the end I put my email address as *****@voicent.com. Instead it should have read *****@voicenet.com. I apologize for any confusion that this may have caused, but it was spelled correctly at the beginning of the column.

LETTERS, WE GET LETTERS

These are some letters that I received. Lines beginning with a > are the original question, anything else is my response to it. Names have been removed to protect the innocent.

> I read your article in TI-GCM Issue 8 about link programming,
> where you wrote:  "The most popular seems to be the 'taking
> turns' method, used in Battleship, but there are many other
> ways."  I just wonder: what other ways? I find that the GET
> function is pretty limited, not to say too limited, but perhaps
> you have some great ideas/tips on how to use it. Please send me
> everything you've got.

Ok, here are some ideas. You can have player 1 playing the game like Pong. Player 1's calc is constantly trying to get(X). X will be the direction player 2 wants to move (-1 for left, 1 for right, 0 for stop). Meanwhile player 2 is in a menu that looks like this:

PLAYER 2 CONTROL
1:LEFT
2:STOP
3:RIGHT

Because the numbers 1, 2, and 3 are set up in the order left to right, it makes sense to assign those controls to them. When player 2 presses 1 (left) for instance it changes X to -1. Then when player 1's calc gets X, it will see that X is -1 and move left. Get it? I recommend trying out the Pong game that I made, it has a two player mode. I also made 2 player snake game based on the same theory.

Another similar way to do this is to have player 2 in a pause prompt instead. When you press enter it unpauses for a second, changes the direction and then repauses it. That will effectively give you a 2 way (left or right) switch.

I once made a Mechwarrior type maze game. Because of the nature of the game, both calcs had to work independently of each other. I did this by just always keeping both calcs in a pause prompt or a menu. They can move from the menu, also shoot, and use radar etc. After moving it displays the map with their new location and pauses it. Then back to the menu. At every chance the calc gets information from the other calc and it always works because the other calc is always paused or in a menu. I hope those ideas help out. Pong should be available at the TI-GCM site by the time you're reading this.

> I've got a HUGE problem with graphics. I'm trying to create an
> RPG, but I need to use LOTS of graphics. My first question is,
> do you know of anyway I can conserve space and load time with > > graphics (without using Pic files). 

I suggest using text characters. They will give you just about any shape you'll need. Also if you need a little variation you can combine regular text with some pxl-on statements.

> Second, for a world map screen, I use a grid-like structure.
> What I had originally done was stored numbers to a Matrix.
> Then I'd run the Matrix through a program that turned the
> numbers into pictures.  Example: Column 1, Row 1 equals one,
> so a tree goes there. Column 1, Row 2 equals 5, so a town goes
> there. Anyway, I thought this was a very good idea at first.
> But the load time is so SSSSLLLLOOOOWWWW. And the Matrix,
> not to mention the programs that store the data entered into
> the Matrix, take up too much space. So my second question is,
> do you have any better ideas for creating a grid-like map or
> any ideas how I can speed this way up and save space?

I know what you're problem is, because I had the same problem when I made Dungeons and Dragons. What you want to do is instead of filling up a whole screen, just limit it to like 5 shapes (trees, towns, etc.) per screen. This will load way faster. Check out D&D (available on TI-GCM sight) and see how I solved the same problem.

> I have seen in some programs for the 82 the use of lower case
> letters how is that done?

Well there are some lowercase letters if you go to VARS and then Statistics. Look through those menus and you should find a-e, r, and n. But if you want like o, you have to do it a different way. To get o, first display or. Then output a blank space (or the rest of the word) over the r part. that will leave just the lowercase o. This way you can get just about any lowercase letter.

> The question is:  can the $4 dollar link and software for the
> TI-82 work on the TI-83?  They are supposed to be backwards
> compatible. 

Well I checked on the links section for ti-calc.org at http://www.ticalc.org/link/ It seems that it wont work with an 83. I have used my $4 link for about a year on my 82 and that works great. You might want to write to the creator of the $4 link at tobin@edm.net and ask him yourself.

WRAP UP

All done. That's it. Next issue: Tic-Tac-Toe and mo' letters. Send questions/suggestions to great@voicenet.com Chow!