Once upon a time, I wrote some BASIC sprite displayers utilizing hex with a unique character, G, which would tell the displayer "Hey, this row is done, reset column to starting point and drop down a row". This was done to help reduce the size of sprites in general, and it worked well, for what it was meant for. This Hex2Sprite program was made available on the 83, 83+/84+, and CSE/CE calculators.
I decided to do some checking, and apparently I only ever made a monochrome version of Sprite2Hex, most likely because I began overthinking the project for the color screen calcs, and partially that was about the time I stepped out of programming calculators, which was for numerous reasons I won't get into here.
Now that I'm going for a full on upgrade of Age of Darkness for the Evo, I realized for the battle screen I'd like to use some form of sprites. Possibly. I'm still not 100% sold on it, but I'd at least like to try and see what can be done with the idea.
I've decided how I can go about creating the sprites on calc, which would in turn make them much easier to convert since I can directly manipulate the strings instead of just playing with the graph screen. So I'll be trying to get this made some what quickly, so I can see if I like how slow/fast sprites load up for the battle screen, and if we're going to end up wanting to use them or not.
Obviously the smaller the sprite, the faster it displays, so I'll be trying to keep it down to 16x16 or less, but the program will handle up to 32x32 sprites, using the on-calc colors.
WIP of the work area that I'm thinking of using, might need to bump the one border on the top up a little higher..
The idea is it will start all white, with a string of 1,024 0's, plus 2 characters for padding, 1 on each end of the string. Makes it easier on the coding side of things to manipulate the string. Just using the blue blocks to show where the work space will be.
I'll add a tool bar of some kind to the right to choose what color you want to use, and that value will be put to the string as you select the individual spots to place 'pixels'. I think the hardest part of this project will be having the calculator automatically truncate the ends of lines with 'G', but I'm sure I can figure something out.
I think I'd also like to be able to edit sprites, but that gets even more difficult, potentially, to re-materialize the data to the string.. We'll see, though.
Edit:
Didn't really take too long to set up the area where the sprite would be created. Was a little more complicated on the moving cursor around bit, but that was relatively easy once I knuckled into it. So far it properly generates a full 1026 character string for a 32x32 sized sprite with 2 padding characters.
The next function I need to work on is the.. For lack of a better term, 'encryptor', which will shave off un-needed white space to the right of the last color of a sprite, and replace all 0's with a singular G. I have an idea on how to accomplish this, we'll see how well it functions once implemented. Removing the padding characters is a breeze, no issues there for me to worry about.
So far you can
1) select your color of choice
2) switch to sprite editing mode
3) switch back to color selection
4) place a 'pixel' of your color choice and it stores to a string
5) you can Del a pixel and it reverts it back to whitespace
Edit 2:
Screenshot here
I managed to fashion up some code that perfectly matched my manual shortening of the sprite data. The only problem it suffers now is that I haven't given it an escape from the loop, nor can it eliminate the initial padding of the stored to string with the truncated data.
If you give me a moment, I'll post up a quick video (hopefully) showing me the fact it is doing things into the above link's thread.
I decided to do some checking, and apparently I only ever made a monochrome version of Sprite2Hex, most likely because I began overthinking the project for the color screen calcs, and partially that was about the time I stepped out of programming calculators, which was for numerous reasons I won't get into here.
Now that I'm going for a full on upgrade of Age of Darkness for the Evo, I realized for the battle screen I'd like to use some form of sprites. Possibly. I'm still not 100% sold on it, but I'd at least like to try and see what can be done with the idea.
I've decided how I can go about creating the sprites on calc, which would in turn make them much easier to convert since I can directly manipulate the strings instead of just playing with the graph screen. So I'll be trying to get this made some what quickly, so I can see if I like how slow/fast sprites load up for the battle screen, and if we're going to end up wanting to use them or not.
Obviously the smaller the sprite, the faster it displays, so I'll be trying to keep it down to 16x16 or less, but the program will handle up to 32x32 sprites, using the on-calc colors.
WIP of the work area that I'm thinking of using, might need to bump the one border on the top up a little higher..
The idea is it will start all white, with a string of 1,024 0's, plus 2 characters for padding, 1 on each end of the string. Makes it easier on the coding side of things to manipulate the string. Just using the blue blocks to show where the work space will be.
I'll add a tool bar of some kind to the right to choose what color you want to use, and that value will be put to the string as you select the individual spots to place 'pixels'. I think the hardest part of this project will be having the calculator automatically truncate the ends of lines with 'G', but I'm sure I can figure something out.
I think I'd also like to be able to edit sprites, but that gets even more difficult, potentially, to re-materialize the data to the string.. We'll see, though.
Edit:
Didn't really take too long to set up the area where the sprite would be created. Was a little more complicated on the moving cursor around bit, but that was relatively easy once I knuckled into it. So far it properly generates a full 1026 character string for a 32x32 sized sprite with 2 padding characters.
The next function I need to work on is the.. For lack of a better term, 'encryptor', which will shave off un-needed white space to the right of the last color of a sprite, and replace all 0's with a singular G. I have an idea on how to accomplish this, we'll see how well it functions once implemented. Removing the padding characters is a breeze, no issues there for me to worry about.
So far you can
1) select your color of choice
2) switch to sprite editing mode
3) switch back to color selection
4) place a 'pixel' of your color choice and it stores to a string
5) you can Del a pixel and it reverts it back to whitespace
Edit 2:
Screenshot here
I managed to fashion up some code that perfectly matched my manual shortening of the sprite data. The only problem it suffers now is that I haven't given it an escape from the loop, nor can it eliminate the initial padding of the stored to string with the truncated data.
If you give me a moment, I'll post up a quick video (hopefully) showing me the fact it is doing things into the above link's thread.




