A while ago I shared BOXMAN before I knew how to use appvars. No that I know how to make appvars and have already used them to make Moon Bubble, (I forgot most of what I knew.)
I copied what I saw in the Moon Bubble code which worked and used the info on the wiki page about it but it still isn't working. Here is my code for the real( command:

Code:
real(0,1,1
"BOXMANS"
real(5,0,0
real(8,1,0
ClrHome

That's how I set up the appvar. is this part correct? Down a little farther is this where it should draw the 8x8 sprite at 1,1 in the appvar with a transparent index of 255.

Code:
real(4,1,0,0,1,1,10(X-1),120-10(ʟBOX(X-1))-10,255,0,1,1,1

This is the part that won't work, unless it's the part above. Please reply! Thanks. Very Happy
The first thing that I spot is that you have a ClrHome in there. Once you're in xLIBC's half-resolution mode, set up with real(0,1,1), you shouldn't be using any of the OS's display functions. You should avoid ClrHome, Disp, Output, ClrDraw, Text(, Line(, Pxl-On(, and so on. You should wait until you disable half-resolution mode (using real(0,1,0,1)) to use those again. If you want to clear the screen by filling it with a color, take a look at real(0,3,4,...).

As for your sprite display line, I must commiserate that the arguments to the real(4 (DrawSprite) functions are a bit confusing. Try doing the following:
Code:
real(4,0,0,0,0,0,255,1,0,1
Argument by argument:
real(4,0: Display a sprite using TI-OS values
0,0: At (X=0, Y=0)
0,0: With offset (0,0) (this is always 0. I don't understand what this is for)
255: Using 255 as the transparent index
1: Do update the LCD after displaying this. Only use this after you have drawn everything you want to display.
0: Start with the very first sprite in the following list
1: Draw the second 8x8 sprite in the spritesheet. 0 would be the first one, 1 is below it, 2 is below that, 7 is the bottom of the column, 8 is the top of the second column, and so on.
Thanks Kerm! I had to modify the screen refresh part of the code you showed me but it worked! The new version of BOXMAN should be coming out soon (like, this week)
Botboy3000 wrote:
Thanks Kerm! I had to modify the screen refresh part of the code you showed me but it worked! The new version of BOXMAN should be coming out soon (like, this week)
That's great! If you want to continue using this thread for BOXMAN (since it's in the Your Projects section), feel free to rename it and to occasionally post progress updates and the final release announcement here.
Ok. After long last (a week) I am finally in the testing stage of the new BOXMAN! This version is a HUGE improvement over the last version. I made the last version in a hotel when I didn't know how to use appvars and it was supposed to be a one day project. Now is a step forwards! I won't include a screenshot so that it will be a surprise for everyone. The new version of BOXMAN will be coming to you next week, so stay tuned!
Cool! Smile Can't wait to give it a shot! Good luck!
Ok everyone. I know I said next week but I just can't hold it in any longer. I will upload it now! WOO! I am very happy how it turned out and everyone can write posts here about what they think. Very Happy
Nope. Scratch that. I try to download the file and the appvar to the computer and when I put it in an emulator, it is a version that is, like, 2 WEEKS old! Does anyone know how to fix this problem? I NEED help.
Ok. I figured it out. I don't know how, but, it is working now and I should be able to upload the new version of BOXMAN. It will be called BOXMAN2 on your calc, but the old version will not be downloadable anymore. Thanks for everyone's support and check out the archives to see it.
For the sake of clarity, the offsets in the sprite routine are useful when you need to convert world coordinates into screen coordinates (like to account for a mapx/y for example). Typically used when using USERVARS though.
tr1p1ea wrote:
For the sake of clarity, the offsets in the sprite routine are useful when you need to convert world coordinates into screen coordinates (like to account for a mapx/y for example). Typically used when using USERVARS though.
What you're saying if I am understanding, is that you use the offset whem your appvar is a big map of a world. is this correct?
Kind of yeah. For when your sprites position in a 'world' and is at an advanced x/y position in your map.
  
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