Author Topic: Sprite Maker  (Read 14498 times)

0 Members and 1 Guest are viewing this topic.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Sprite Maker
« Reply #15 on: August 16, 2010, 01:42:32 pm »
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.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Sprite Maker
« Reply #16 on: August 16, 2010, 02:04:30 pm »
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. :)

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Sprite Maker
« Reply #17 on: August 16, 2010, 02:25:45 pm »
Oh ok, I thought that was just the small text that had the buffer row.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Sprite Maker
« Reply #18 on: August 17, 2010, 09:52:28 am »
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)
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Sprite Maker
« Reply #19 on: August 17, 2010, 07:20:50 pm »
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.
« Last Edit: August 18, 2010, 03:24:51 am by meishe91 »
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Sprite Maker
« Reply #20 on: August 18, 2010, 12:24:31 pm »
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?
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Sprite Maker
« Reply #21 on: August 18, 2010, 12:56:46 pm »
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:
Code: [Select]
:StoreGDB 1
:AxesOff
Change window settings
....Code here....
:RecallGDB 1
:DelVar GDB1

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Sprite Maker
« Reply #22 on: August 18, 2010, 02:22:53 pm »
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.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Sprite Maker
« Reply #23 on: August 18, 2010, 02:30:09 pm »
GDB keeps the graph zoom/window/axe settings? I thought it only kept the equations and the like.
It keeps both. :)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Sprite Maker
« Reply #24 on: August 18, 2010, 02:34:27 pm »
Nice ^^

I guess this is probably why some BASIC games leaves a GDB1 or GDB0 behind. FFTOM did that
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Sprite Maker
« Reply #25 on: August 18, 2010, 02:43:49 pm »
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:

Code: [Select]
██████ This 6*6 sprite will be exported like...
██████
██████
██████
██████
██████

██████__ this. A 8*6 sprite.
██████__ So the resulting hexadecimal code is FCFCFCFCFCFC
██████__
██████__
██████__
██████__

Does that make sense?
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Sprite Maker
« Reply #26 on: August 18, 2010, 03:20:01 pm »
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). :)

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Sprite Maker
« Reply #27 on: August 18, 2010, 03:21:07 pm »
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.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Sprite Maker
« Reply #28 on: August 18, 2010, 03:49:45 pm »
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:

Code: [Select]
██████ 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. ^^
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Sprite Maker
« Reply #29 on: August 18, 2010, 03:51:04 pm »
Ya, would it be easier on people to pad it on both sides? And do people want multiples of eight or four?
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)