Alright so your limited to 9 pictures in a program but in a TI-Basic program you can pause the current program and open another so lets say in a game you entered another room and it called another program would you be able to have another set of 9 pictures in that sub program or would it just take the pictures from the main program and write them over the sub programs pictures?
No the 10 image variables are global, ei all programs use the same 10 images. However, you technically you could have 255 image variables, you would just need asm or xlib.
davidclue wrote:
Alright so your limited to 9 pictures in a program but in a TI-Basic program you can pause the current program and open another so lets say in a game you entered another room and it called another program would you be able to have another set of 9 pictures in that sub program or would it just take the pictures from the main program and write them over the sub programs pictures?
No, the 10 Picvars (Pic1-Pic0) are global to the OS. If you're making a game complicated enough to demand that level of graphics, I'd highly recommend using ICE Compiler. It allows you to write programs in the TI-BASIC editor, using TI-BASIC commands and syntax (mostly) but still take advantage of the power of an assembly program (full access to the full screen, 256 color palette, high level graphics commands, etc.) On the topic of graphics, I'd suggest using ICE Sprite Creator to create images for you to use in-game.
If you're doing this for a CE, ignore my post and just listen to Sam.

I don't know if you're using a CE though and since ICE wont work on a TI 84 Plus, I'd suggest using either AXE or do hybrid BASIC and use Doors. I'm not quite sure how Doors works with images, but I'd assume you'd be able to use more than 9, even if they're not of the pic or background variable type.
TheLastMillennial wrote:
If you're doing this for a CE, ignore my post and just listen to Sam.

I don't know if you're using a CE though and since ICE wont work on a TI 84 Plus, I'd suggest using either AXE or do hybrid BASIC and use Doors. I'm not quite sure how Doors works with images, but I'd assume you'd be able to use more than 9, even if they're not of the pic or background variable type.

DID SOMEONE SAY DOORSCSE!!!

DoorsCSE doesn't have any commands for full sized pics, but it has something called background pics, which are 80x60 pixels. Each "pixel" is actually a 2x2 square of pixels on the actual screen, because a pic isn't scaled to take up the entire screen. They can be displayed either fully or partially. You can have as many of them as you want (limited only by your amount of available memory of course) because they are stored in appvars. Only 2 slots in RAM are actually reserved for them though, so you can only have 2 loaded at the same time, which means if you want more than that, you will have to swap them out accordingly.In Kerm's Flappy Bird, BG pics were used for the background buildings.



There is also regular sprites. These are used in half-resolution mode (160x240 px) and are stored in appvars as well, meaning that you can have as much of those as you want just like the BG pics. Each pixel for a sprite is actually a 2x2 square of pixels on the actual screen. The appvars for regular sprites are called tilemaps and have a fixed size of 128x64, which means a single one doesn't take up the entire screen either. Here is what an entire tilemap looks like displayed on the screen:



DoorsCSE also has a Celtic II command which allows you to display a sprite in full-resolution mode. (Technically you can use it in half-resolution mode, but you have to do it in both buffers, and doing so will result in each pixel being 1x2 pixels on screen, making the sprite stretched out horizontally) The data is stored in Str9, limiting the size to your amount of free RAM, which means you will probably have to swap out things from the archive to fill up the entire screen (of course DoorsCSE does have commands that allow you to do that). When used "correctly", these sprites are 1x1 pixels on screen.
In the following image, the radioactive symbol in the top left is made using the Celtic commands, however, the image is displayed in half-resolution mode (the data is actually for a 16x8 sprite, but it gets displayed as a 16x16 because each pixel is 2 pixels wide in half-resolution mode)

  
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