I am learning how to program using my TI-89, and am having trouble setting the limits of movement on the graph screen, which leads to a Domain Error. How can I program it to where I can move a sprite xx pixels down when I hit the down arrow, yet stop movement when I would go below the screen if the sprite was re-drawn again.

Thank you very much
There's two possible solutions to your problem. The first solution is to use Pt instead of Pxl commands: PtOn, PtOff, etc (PointOn, PointOff). These take the x and y coordinates of the graphscreen instead of x,y pixel values. The other option, and probably the faster of the two, is every time you change your x and y coordinates, check it they're less than 0 or greater than the width or height. If one is less than zero, set it equal to zero. If it's greater than the width-1 or height-1, set it to width-1 or height-1.
check out Tifreak's awesome tutorials page, it has one on sprites/graphics (by me of course...)
TI-89 guys... 83+ stuff might help give him theories, but not actual code.

http://tifreakware.calcgames.org/tutorials/89/

That should help a bit... Though the tutorials in that section are kinda... sparse Razz
There's definitely not enough TI-89 info around the community.
I agree with that, although now that I have gotten into programming a lot more I am figuring it out very easily. The information is out there to some extent for the TI stuff, but I have found that doing work in C++ is really making it easier to program on the calc, and with a lot of tutorials out there for that it makes translation to TI stuff very easy.

I am thankful for this web-site and forum though, as it makes it very easy to gleam info from.
c++??? Do you mean c?
I think both C and C++ would be helpful for understanding some of the logical and flow structures of ASM, since they're essentially the same except for a few syntactical and librarical changes in C++/
oops, I thought he meant programming c++ for calc >.>
My situation is this, I am using VTI at work to program on the TI-89 using TI-Basic while I am not occupied with work, since I can't install any coding software, (a administrative privileges) and at home I have TIGCC and Microsoft Visual C++ installed to learn some more advanced stuff. I have found that learning the C and C++ makes it really easy to accomplish a lot of stuff in TI-Basic once I get a better handle on things like program flow and how to get what I want to do in a program done, plus the VTI makes doing graphics stuff really easy at this early stage in my learning, which I can't seem to easily translate on the PC yet, and there isn't enough information on TI stuff to learn only in that environment, so I get two or three perspectives and it really helps to learn that way as I can make different connections and see some results on the TI that I still have a ways to learn on the PC. It also helps to figure out how to do stuff on the TI and then come back to the more advanced stuff with the character that comes from being creative in Basic to get something done with some sort of optimal performance.

It is sort of a combo of having to takebaby steps on the PC stuff since I am doing it all on my own with the help of tutorials, but being able to get some results on the TI with not muchtraining, (I want to make games) So i learn in different environments to get a broad perspective of info to take from and wok with to hopefully make it easier to learn programming.
vaiism wrote:
My situation is this, I am using VTI at work to program on the TI-89 using TI-Basic while I am not occupied with work, since I can't install any coding software, (<font color=red>censored</font> administrative privileges) and at home I have TIGCC and Microsoft Visual C++ installed to learn some more advanced stuff.

Just install TIGCC to a flash drive and then copy to your computer at work. It will work then, since it doesn't use the registry anyway. As for VTI, at home I would suggest TiEmu, which has actually been updated in the past 5 years and can emulate the Titanium and Voyage 200 as well.
TiLem (z80 series) and TiEmu (68k series) are undoubtedly superior alternatives to VTI in terms of ease-of-use, features, and accuracy of emulation.
I've tried to get TIGCC on a flash drive, but it doesn't run from it, it will load the inital start-up screen then nothing else happens. I will check out TiEmu, thanks for the heads up.
  
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 1 of 1
» 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