Omnimaga
Calculator Community => TI Calculators => General Calculator Help => Topic started by: nxtboy III on January 06, 2012, 08:56:35 pm
-
Hi,
I know the routine for 3,4, and 5 level grayscale but I was wondering how to make 6,7, and 8 level, and maybe even 16...
When I say routine I mean as in this:
1 is black, 2 is white
3-lvl
10101
01010
and
01010
10101
4-lvl
light gray:
100
010
001
and
010
001
100
and
001
100
010
dark gray is same as light gray but inverted
So how do I make 6 lvl, 7 lvl, and 8 lvl grayscale? Maybe even 16...
Thanks,
nxtboy III
-
For 16, use an nspire. It has hardware support for it :P
By the way, the entire concept of "levels" in greyscale doesn't need a pattern, they just reduce the flicker you percieve in the image. For 8 level you need 7 in the cycle: (this is a pattern for one pixel, checkerboarding is still a good idea) (0)0000000, (1)1000000, (2)1000100, (3)1001010, (4)1010101, (5)1101101, (6)1110111, (7)1111111
That's just an example. You want to have the 1s and 0s as well interspersed in the pattern as possible, AND you want the pictures being drawn at 60 FPS! Are you doing this in Asm? Axe won't do it so well, since (unless I missed something in a recent update) it doesn't have timings fast enough for anything greyscale.
-
Thanks for the help! So I just shift each one over 1 pixel for checkerboard?
Actually, 16 level gray is possible on TI 84. I have seen it on ticalc and ran it on my calculator. It is awesome.
-
I've seen some grey scale in axe and I think it looks fine :)
-
Yeah, but that's using the built-in functions that actually handle it with optimized asm code. doing it in axe code means it will be slower.
Also, remember that you increase the size of any graphics in your game every time you add more levels. 4-level takes 2 sprites for one picture, 8 takes 7, etc. it takes more and more work to make and more space in your program.
Also, I'd love to see the 16-level grey program. Not doubting it exists, but I want to see how much other stuff there is in the game itself. Just a demo makes it significantly easier, especially if you can hardcode the loading of just one image, rather than any method of multi-picture rendering (which any game needs if it's not text based)