Plastik Posted June 28, 2015 Share Posted June 28, 2015 Made this thread as to not hi-jack the magellan thread anymore as Opry99er suggested. I want to learn as much as possible about using sprites and tiles on the Ti. I'm slowly getting the hang of extended basic and I find the magellan program to be a god send. I create the sprites in magellan then try to turn them into code. Currently I'm trying to figure out how to repeat a sprite or tile horizontally. I have an example below I made, I have the bottom floor sprites repeating and would like to now try it in code. Quote Link to comment Share on other sites More sharing options...
Iwantgames:) Posted June 28, 2015 Share Posted June 28, 2015 Slightly off topic - Super Mario TI would be awesome Quote Link to comment Share on other sites More sharing options...
Opry99er Posted June 28, 2015 Share Posted June 28, 2015 Nice. Unfortunately, with the way colors are handled in XB, your "ground" is impossible. Those tiles consist of 3 colors and, in XB, colors may only be set as foreground and background. You could use SPRITEs, but the TI has the 4 SPRITE per line limit. A scaled down version can be done, with fewer colors, fairly easily. I can make some suggestions, if you are okay with compromising. Quote Link to comment Share on other sites More sharing options...
Plastik Posted June 28, 2015 Author Share Posted June 28, 2015 Nice. Unfortunately, with the way colors are handled in XB, your "ground" is impossible. Those tiles consist of 3 colors and, in XB, colors may only be set as foreground and background. You could use SPRITEs, but the TI has the 4 SPRITE per line limit. A scaled down version can be done, with fewer colors, fairly easily. I can make some suggestions, if you are okay with compromising. Well like the dog from before, I can dumb it down to be compatible with the Ti's limitations. Side question with the F18a does the Ti still have the 4 sprite limit? Teach me oh great one Quote Link to comment Share on other sites More sharing options...
Opry99er Posted June 28, 2015 Share Posted June 28, 2015 I am FAAAR from a great one. I know only basic BASIC stuff. The F18 can turn off the limitation, by the way. Quote Link to comment Share on other sites More sharing options...
Opry99er Posted June 28, 2015 Share Posted June 28, 2015 Here's a little example of how to use HCHAR, VCHAR, and SPRITE. 100 CALL CLEAR 110 CALL CHAR(96,"1028449292FE2010") 120 CALL HCHAR(1,1,96,32) 130 CALL VCHAR(1,1,96,24) 140 CALL HCHAR(24,1,96,32) 150 CALL VCHAR(1,32,96,24) 160 CALL SPRITE(#1,96,9,10,10,4,1) 170 GOTO 170 I redefine ONE character. I use tile placement and a SPRITE here. You can see how to repeat characters in this code. HCHAR and VCHAR have the same format. (row,column,character pattern,repetition) Quote Link to comment Share on other sites More sharing options...
Opry99er Posted June 28, 2015 Share Posted June 28, 2015 Ill show some more stuff in a few...when kids go to bed Quote Link to comment Share on other sites More sharing options...
Opry99er Posted June 29, 2015 Share Posted June 29, 2015 Here's how we set the colors... Add the following lines to the above example. 104 CALL SCREEN(16) 105 CALL COLOR(9,2,7) This sets the screen to white and character set 9 to black foreground and red background. Each character set is made up of 8 ASCII codes... The set that contains character 96 happens to be set #9. Quote Link to comment Share on other sites More sharing options...
Opry99er Posted June 29, 2015 Share Posted June 29, 2015 When using tile graphics, you can get quite elaborate if you are clever and use your sets well. We have 14 available sets in XB, so you can imagine how cool you can get with your tile graphics. You can also overlay SPRITEs on top of tiles for even more color combinations. In your dog example, you can do your base graphic in tiles and overlay SPRITEs to give you another color (5 instead of 4) Quote Link to comment Share on other sites More sharing options...
Opry99er Posted June 29, 2015 Share Posted June 29, 2015 SPRITE colors are independent of tile colors, so you can have set 9 as black on dark red and use character 96 to define a SPRITE with a different color (I used light red for my SPRITE)... Again, these are primarily limitations of Graphics Mode 1. Once you get into bitmap, the possibilities are remarkable (as seen in Rasmus's games) Quote Link to comment Share on other sites More sharing options...
Plastik Posted June 29, 2015 Author Share Posted June 29, 2015 When using tile graphics, you can get quite elaborate if you are clever and use your sets well. We have 14 available sets in XB, so you can imagine how cool you can get with your tile graphics. You can also overlay SPRITEs on top of tiles for even more color combinations. In your dog example, you can do your base graphic in tiles and overlay SPRITEs to give you another color (5 instead of 4) Ah yes I was gonna ask about overlaying sprites and tiles for more combos now I have an answer. Thanks for the example code I was finally able to get my ground, well on the ground. 100 CALL CLEAR 110 CALL SCREEN(15) 120 CALL CHAR(138,"FFFFFFF795945208") 130 CALL CHAR(139,"0000000000000000") 140 CALL COLOR(14,13,11) 150 CALL HCHAR(23,1,138,32) 160 CALL HCHAR(24,1,139,32) 170 GOTO 170 Quote Link to comment Share on other sites More sharing options...
Plastik Posted June 29, 2015 Author Share Posted June 29, 2015 SPRITE colors are independent of tile colors, so you can have set 9 as black on dark red and use character 96 to define a SPRITE with a different color (I used light red for my SPRITE)... Again, these are primarily limitations of Graphics Mode 1. Once you get into bitmap, the possibilities are remarkable (as seen in Rasmus's games) I'm definitely gonna practice more in graphics mode 1 then move on, but what are the advantages of bitmap mode? Is that what they classified as High res mode on the Ti? Quote Link to comment Share on other sites More sharing options...
Opry99er Posted June 29, 2015 Share Posted June 29, 2015 A fine start, friend. You are becoming an XB coder and don't even know it. Look forward to watching this progress and if you have any questions, feel free to ask. There are some brilliant minds here who really know their stuff. I will do my best to help too. Quote Link to comment Share on other sites More sharing options...
Opry99er Posted June 29, 2015 Share Posted June 29, 2015 I'm definitely gonna practice more in graphics mode 1 then move on, but what are the advantages of bitmap mode? Is that what they classified as High res mode on the Ti? Yes. You can control every pixel on the screen and do crazy things that should not be spoken of... XB cannot natively access bitmap mode however... It can be done via assembly. Quote Link to comment Share on other sites More sharing options...
+RXB Posted June 29, 2015 Share Posted June 29, 2015 (edited) Using the TIM card or a 9938 VDP chip with XB on the TI99/4A a XB program call XHI allowed bit map mode from XB. Of course how this worked was the extra 162K of VDP memory. This has always been the big problem with the TI is the total lack of VDP memory to do much of anything idealistically. Everything we do has to be done to save every single byte of space. Edited June 29, 2015 by RXB Quote Link to comment Share on other sites More sharing options...
Plastik Posted June 29, 2015 Author Share Posted June 29, 2015 Yes. You can control every pixel on the screen and do crazy things that should not be spoken of... XB cannot natively access bitmap mode however... It can be done via assembly. Does XB256 Allow bitmap mode? Thanks again for all the help. I'm really enjoying the challenge when coming up with sprites. 1 Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted June 29, 2015 Share Posted June 29, 2015 Yes. You can control every pixel on the screen and do crazy things that should not be spoken of... XB cannot natively access bitmap mode however... It can be done via assembly. ...and fbForth. ...lee 2 Quote Link to comment Share on other sites More sharing options...
Omega-TI Posted June 29, 2015 Share Posted June 29, 2015 ...and fbForth. 1 Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted June 29, 2015 Share Posted June 29, 2015 This book might also help: Smart Programming Guide for Sprites by Craig Miller. ...lee 1 Quote Link to comment Share on other sites More sharing options...
Plastik Posted June 29, 2015 Author Share Posted June 29, 2015 This book might also help: Smart Programming Guide for Sprites by Craig Miller. ...lee Thanks I'll take a look at it Quote Link to comment Share on other sites More sharing options...
Tursi Posted June 29, 2015 Share Posted June 29, 2015 I don't think XB256 gives you bitmap mode in XB, but The Missing Link does. Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted June 29, 2015 Share Posted June 29, 2015 I don't think XB256 gives you bitmap mode in XB, but The Missing Link does. Tursi is right - The Missing Link allows you to use the bitmap mode in XB. There are a few other programs that give a limited version of bitmap, but none that I know of is as thorough as TML. XB256 opens up the graphics mode and removes many of the limitations built into XB. You can use 256 unique characters (XB offers 112). The 112 characters normally used for XB can be used as sprite patterns (28 16x16 sprites) or used for a second screen which could be a help screen or something else. XB256 is supported by the compiler so you can write and debug a program in XB, then compile it for a huge speed increase. Quote Link to comment Share on other sites More sharing options...
Plastik Posted June 29, 2015 Author Share Posted June 29, 2015 So many resources so little time, see you guys in a year when I'm done reading everything Quote Link to comment Share on other sites More sharing options...
Tursi Posted June 29, 2015 Share Posted June 29, 2015 (edited) Slightly off topic - Super Mario TI would be awesome What? Super Marios Bros wasn't enough for you? Edited June 29, 2015 by Tursi Quote Link to comment Share on other sites More sharing options...
TheMole Posted June 29, 2015 Share Posted June 29, 2015 Plastik, I just want to say that I like the graphics you create. Shame the Mario stuff isn't technically possible on the real hardware, but even the simplified stuff is really well done. Kudos. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.