Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: meishe91 on August 10, 2010, 09:34:49 pm
-
So finally I am getting a version that I'm quite satisfied with. As far as I know this there are no known bugs so please inform me if any are found.
So this spriter is quite revolutionary, I think and have been told. Some of the features may run a bit slow but that is only due to the limitations of TI-BASIC. These programs, depending which one you use, will pad the side/s of the sprite to the nearest multiple of eight. This means that if you are making a 5*7 sprite and happen to use the one that pads both sides then it will give you a hexadecimal code for a 8*8 sprite, padding zeros on. If you use the one that only pads width then it will give the hexadecimal code for a 8*7 sprite.
Features for this program include:
-Any sprite size (well from 1*1 to 88*63 (padding width only) or 88*56 (padding both sides))
-Gray cursor.
-Cursor wrap around.
-Invert the sprite.
-Clear the sprite.
-Rotate the sprite 90º to right and left.
-Flip the sprite horizontally or vertically.
-Single row or column filling or deleting.
-Single row or column inverting.
-Supports sprites from one pixel in size to a size of fifty-six pixels.
Arrows - Move the cursor around.
[2ND] - Turns the current pixel on or off.
[MODE] - Rotates the sprite 90º to the left.
[DEL] - Rotates the sprite 90º to the right.
[X,T,Θ,n] - Flips the sprite horizontally.
[STAT] - Flips the sprite vertically.
[ALPHA] - Inverts the sprite.
[MATH] - Inverts the current column.
[X-1] - Inverts the current row.
[APPS] - Turns the whole row on.
[SIN] - Turns the whole row off.
[PRGM] - Turns the whole column on.
[COS] - Turns the whole column off.
They Sprite2Hex_PadBothSides.8xp stands at 877 bytes and Sprite2Hex_PadWidthOnly.8xp is 868 bytes. (Unfortunately with the new updates them made it bigger :()
-
cool
add in a few more tools (mebbe rotation/flipping and saving the previous sprite) and that could be rather useful, especially because it's pure basic so anyone can use it
-
Ok, I added in rotation and flipping horizontally. Any other features before I release the next version?
-
Ok, here is the next release of my sprite maker. If anyone thinks of more features I will add them, or at least try to.
[2ND] - Turns a pixel on or off.
[ALPHA] - Inverts the sprite.
[MODE] - Rotates the sprite 90º (or π/2 radians :P)to the left.
[X,T,Θ,n] - Flips the sprite horizontally.
[CLEAR] - Clears the sprite.
[ENTER] - The "finish" button to get the hexadecimal code.
P.S. The only feature I can think of right now is making it so you can create multiple sprites in one go.
-
Wow, looks great!
-
If you are starved for features, how about 16x16 and vertical flipping?
-
Wow, looks great!
Thanks :)
If you are starved for features, how about 16x16 and vertical flipping?
Ya, I've thought about doing 16*16. I haven't decided though for sure yet but I might just make it so you can make any size sprite you want from 4*1 to 62*94 sprites (if you really needed). I don't know how possible that is but I could probably figure something similar out.
I can add vertical flipping it just will add that much more code when you can make the sprite any direction between the flipping and rotating in it right now. But I can if people want it. Thanks.
-
What about grayscale? Is it written in axe or basic? I can't tell :P
-
If you are going to support 62*94 sprites, you need a different calculator ;). However, if you meant 94*62 sprites, you will probably want to turn off the axis.
-
What about grayscale? Is it written in axe or basic? I can't tell :P
It's pure 100% TI-BASIC. Look at the sub-forum ;)
If you are going to support 62*94 sprites, you need a different calculator ;). However, if you meant 94*62 sprites, you will probably want to turn off the axis.
Psh...details, details :P And ya I know. The axes are just always off on my calculator so I didn't think about turning it off.
I'm thinking I will make a plan with features tonight or something and then rewrite it all or something. I just would like to know what all I'm implementing before I do that. So, I would like to invite you all still to make suggestions :)
Features as of now:
-Rotation in both directions.
-Flip horizontally and vertically.
-Invert the sprite.
-Clear the sprite.
Possible features:
-Multiple sprite support.
-
The axes are just always off on my calculator so I didn't think about turning it off.
That's exactly the opposite of my calculator :P mine are almost always off.
-
The axes are just always off on my calculator so I didn't think about turning it off.
That's exactly the opposite of my calculator :P mine are almost always off.
Isn't that what I said I about mine? ??? Or did you mean on?
-
Oh, my mistake x.x
-
Yeah. Who needs axes? Heck, when i graph stuff at school i never turn the axes back on, since I end up needing trace for anything that I can't solve in my head.
-
Looks nice. How about using this code:
If K=45
Text(-1,0,0," // 2 spaces
Regardless, nice job! :)
-
Thanks. Won't that only clear seven rows though? I thought tokens were 5*7. But I don't think that'll work if I support different sprite sizes.
-
Thanks. Won't that only clear seven rows though? I thought tokens were 5*7. But I don't think that'll work if I support different sprite sizes.
Right, "they are 5*7", plus a buffer row that makes them 6*8. :)
-
Oh ok, I thought that was just the small text that had the buffer row.
-
Nice job so far Meishe91
As for Axises I kinda prefer to turn them ON during math but have my games turn then OFF. I kinda dislike when I download BASIC programs and it doesn't turn them OFF automatically. I think it is a bad coding practice (although automatically turning them off and not turning them back ON on game exit tend to annoy certain people in math classes)
-
Ya, I don't do a whole lot of graphing during the summer or outside of a math class so I just leave them off usually. Otherwise I have them on because it makes it easier for me to see graphs and such.
Edit:
Ok, update time.
This supports SQUARE sprites of any size from four pixels to sixty-three pixels.
Arrows - Move the cursor around.
[2ND] - Turns the pixel on or off.
[ALPHA] - Inverts the sprite.
[MODE] - Rotates the sprite 90º to the left.
[DEL] - Rotates the sprite 90º to the right.
[X,T,Θ,n] - Flips the sprite horizontally.
[STAT] - Flips the sprite vertically.
[CLEAR] - Clears the sprite.
[ENTER] - Continues on to the hexadecimal output.
It is pretty simple to use and all. One thing about the output though. It rounds the hexadecimal up to the nearest multiple of four if it isn't evenly divisible. What I mean by this is that if you have a 7*7 sprite and you click to make it export out the hexadecimal code will be for a 8*7. Now, if anyone has an issue with this and would like it to just output like an 8*8 (in this case) I can add that in.
This currently stands at 590 bytes. I will either get screenshots up sometime this week or if someone can make some that would be appreciated. Once I figure everything out for this thing I will just update the first post and make that all official.
-
Wow pretty small. I also like the control. However, what do you mean by 8x7? Does it means doing 8x8 sprites (the standard in Axe Parser) is impossible right now?
-
I kinda dislike when I download BASIC programs and it doesn't turn them OFF automatically. I think it is a bad coding practice (although automatically turning them off and not turning them back ON on game exit tend to annoy certain people in math classes)
Here's the best thing to do in a program that uses the graphscreen:
:StoreGDB 1
:AxesOff
Change window settings
....Code here....
:RecallGDB 1
:DelVar GDB1
-
GDB keeps the graph zoom/window/axe settings? I thought it only kept the equations and the like. I was experimenting the other day with ZoomRCL and the like to see if it recalled the Axes and it didn't work, so that's nice to know at least.
-
GDB keeps the graph zoom/window/axe settings? I thought it only kept the equations and the like.
It keeps both. :)
-
Nice ^^
I guess this is probably why some BASIC games leaves a GDB1 or GDB0 behind. FFTOM did that
-
Wow pretty small. I also like the control. However, what do you mean by 8x7? Does it means doing 8x8 sprites (the standard in Axe Parser) is impossible right now?
No, no, no. I didn't mean it like that. Say you are making a 7*7 sprite. Since hexadecimal, or at least the way I'm doing it, reads four pixels at a time it doesn't fit into seven nicely. So it will just push the sprite width wise to eight columns to help it compensate for that. So 5*5 will be exported as 8*5, as will 6*6, and 7*7. Right now it does a check to do the fix but I'm thinking now that I can shorten it to it doesn't have to. I'll look at the code later since I don't work today.
Basically though:
██████ This 6*6 sprite will be exported like...
██████
██████
██████
██████
██████
██████__ this. A 8*6 sprite.
██████__ So the resulting hexadecimal code is FCFCFCFCFCFC
██████__
██████__
██████__
██████__
Does that make sense?
-
Here, let me try. In other words, it's like xLib. With xLib you had to pad the edges of sprites that had a width that wasn't a multiple of 8 to make them have a width that's a multiple of 8. Meishe's program also must pad to make them have a width of a multiple of 8 (or maybe 4, he may do it that way too). :)
-
Padding, ya, that's a better word for it :P Ya, I do it in a multiple of four, though I could change it to eight if people wanted.
-
Wow pretty small. I also like the control. However, what do you mean by 8x7? Does it means doing 8x8 sprites (the standard in Axe Parser) is impossible right now?
No, no, no. I didn't mean it like that. Say you are making a 7*7 sprite. Since hexadecimal, or at least the way I'm doing it, reads four pixels at a time it doesn't fit into seven nicely. So it will just push the sprite width wise to eight columns to help it compensate for that. So 5*5 will be exported as 8*5, as will 6*6, and 7*7. Right now it does a check to do the fix but I'm thinking now that I can shorten it to it doesn't have to. I'll look at the code later since I don't work today.
Basically though:
██████ This 6*6 sprite will be exported like...
██████
██████
██████
██████
██████
██████__ this. A 8*6 sprite.
██████__ So the resulting hexadecimal code is FCFCFCFCFCFC
██████__
██████__
██████__
██████__
Does that make sense?
Ooh ok I see now. ^^
-
Ya, would it be easier on people to pad it on both sides? And do people want multiples of eight or four?
-
Ya, would it be easier on people to pad it on both sides? And do people want multiples of eight or four?
My vote is for 8, because two nibbles = a byte. :)
-
Ok, I'll work on making it eight then. So now the question is should I pad both sides?
-
Nah, I'd say just on the right. :)
-
Ok, will do. I'll work on it then. Thanks.
Edit:
Ok, so I'm just going to release two versions. One that just pads the width and one that pads both height and width. It was a simple change so ya.
Edit x2:
As I said, I am going to release two versions. One that pads just the width and one that pads both the width and height. I have also added in a few new features too. They affect row/column only and could be useful. One other thing, the limit of sprite size has been decreased and increased, depending how you look at it. Technically it's been decreased though. You can now do sprites from one pixel up to fifty-six pixels. I will be updating the original post with this version because as of right now this is the final version. Hope you all will enjoy it.
-
Ok just tried the editor finally, it works pretty well and most stuff is quite fast for basic. Nice job so far
-
Ya, that damn speed limitation is a killer but I tried. I'm sure there could be something more done to optimize but I haven't gone over it to much. Thanks though :)
-
Wow, nice job! It's by far the best sprite editor I've seen in Basic.
Here are my three suggestions:
1: Make the cursor wrap around the screen. If you're at (0,0) and press up I'd like it to go to (0,Max_Y). :)
2: Make the current location gray. This can be done like this:
:Repeat Ans
:Pt-Change(X,Y)
:getKey->K
:Pt-Change(X,Y)
3: Change the end to this:
:ClrHome
:RecallGDB 1
:DelVarGDB1sub(Ans,2,length(Ans)-1->Str1
This makes it display a string that you can scroll through and will not display Done. I'm not sure if it works like this on OS 2.53 MP, but it's just as good as what you had before. :)
Wonderful job! ;D
-
Wow, nice job! It's by far the best sprite editor I've seen in Basic.
Here are my three suggestions:
1: Make the cursor wrap around the screen. If you're at (0,0) and press up I'd like it to go to (0,Max_Y). :)
2: Make the current location gray. This can be done like this:
:Repeat Ans
:Pt-Change(X,Y)
:getKey->K
:Pt-Change(X,Y)
3: Change the end to this:
:ClrHome
:RecallGDB 1
:DelVarGDB1sub(Ans,2,length(Ans)-1->Str1
This makes it display a string that you can scroll through and will not display Done. I'm not sure if it works like this on OS 2.53 MP, but it's just as good as what you had before. :)
Wonderful job! ;D
Thanks ;D
As for the changes I will try to get those implemented today. The only reason I didn't put the cursor wrap into it was just to make it as small as possible. But I'll get it in there :)
Edit:
Made the changes and put the newest version on the original post. I don't really feel like making new screenshots though unless people want me to update those too.
-
One suggestion I got would maybe be to clarify what does the 56 at the beginning when inputting stuff means, because I have yet to figure that out, even thought I somehow got your program to work fine.
-
Do you mean when it says "56≥SIZE≥1?"
-
yea
-
Oh, that's the size restriction. Greater-than-or-equa-to one pixel but also has to be less-than-or-equal-to fifty-six pixels.
-
Aaah ok, thanks, although it might be good to clarify what those means in the program or in the first post.
-
Done.
-
Nice job! I like the way it looks and all the features. Excellent program! ;D
-
Thanks.
-
Update:
Nothing really that big. Just shaved off four bytes.
-
Cool, optimizations of all sort are always welcome :)
-
Ya, and now I'm working on getting this thing to support any size sprite (sorta) :)
-
You mean any width x 5 and 7 pixels of height?
-
Ya. So say you are working on a 5*7 sprite and decide you want to rotate it. It will turn it into a 7*5 sprite.
-
wow nice o.o
-
Ya. I've got everything working, to my knowledge (I don't know if there are any bugs I haven't come across), and now just trying to tweak the output routine.
-
Well this one is just the sprite to hexadecimal program ;) But thanks. I've just tried some editors before and thought that they were all missing things that would be handy. I've also seen people complain about features not being in programs and such. So I'm just trying to do my best :)
I was replying to a message DJ said but I guess he said it in the wrong place or something because it's gone now. So if someone could please delete this post it'd be appreciated :)
-
Oh yeah I know I noticed later as I got consused by both topics x.x. I removed my post lol. However I think it is nice that this one got rotating and stuff too.
-
Ah ok. Ya, that's what I figured. Well I got all the programs working now ;D I'll upload them but I won't be able to get screenshots updated until tomorrow because I'm lazy like that :P
-
No problem, I'll look forward for them :)
-
Update:
So this is finally updated with a few new things. Well not really but the new features is just working with pre-existing ones correctly now :P The only new feature is that it now supports any sprite size! I finally got the rotating to work correctly with them which is what was holding it back. Everything should work but if there are any bugs please, PLEASE, let me know.
The only thing really is that you must have a sprite with a width lower than fifty-six or sixty-three (depending which one you're using) but that shouldn't really be that big of a deal I don't think.
-
Cool to see more updates :)
Sadly I don't know if I'll be able to try it soon, though, as there were many downloadable stuff released lately and I also have some stuff to do, but hopefully I may be able to give it a try at one point.