Author Topic: Axe 8-level (ish :P) Greyscale (With Code Example!!!!)  (Read 21368 times)

0 Members and 1 Guest are viewing this topic.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe 8-level (ish :P) Greyscale (With Code Example!!!!)
« Reply #30 on: December 10, 2010, 11:51:59 pm »
A main reason why not much more than 4-level grayscale has been done before is because the screen driver is so slow. Even if a program theoretically uses a high level of grayscale, the screen and driver are physically incapable of producing much more than a somewhat solid-looking 8-level grayscale.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Axe 8-level (ish :P) Greyscale (With Code Example!!!!)
« Reply #31 on: December 11, 2010, 12:50:23 am »
True. This is also why we need to interlace grayscale like this (the scanlines). Without the scanlines, it would blink like mad, even in 3 or 4 level grayscale. That's how crappy the LCD driver is. I tried xLIB 3 level grayscale once and even though it involves BASIC code, I still had to slow the grayscale updating down to keep it somewhat synced with the LCD and preventing it from looking horrible.

Offline kindermoumoute

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 836
  • Rating: +54/-3
    • View Profile
Re: Axe 8-level (ish :P) Greyscale (With Code Example!!!!)
« Reply #32 on: December 11, 2010, 07:53:30 am »
Other funny stuff : random grayscales.
Projects :

Worms armageddon z80 :
- smoothscrolling Pixelmapping : 100%
- Map editor : 80%
- Game System : 0%

Tutoriel français sur l'Axe Parser
- 1ère partie : en ligne.
- 2ème partie : en ligne.
- 3ème partie : en ligne.
- 4ème partie : 10%
- Annexe : 100%

Ashbad

  • Guest
Re: Axe 8-level (ish :P) Greyscale (With Code Example!!!!)
« Reply #33 on: December 11, 2010, 07:57:55 am »
^ that would be a beastly special effect in a game.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Axe 8-level (ish :P) Greyscale (With Code Example!!!!)
« Reply #34 on: December 11, 2010, 08:00:00 am »
That looks very good kinder!

Offline kindermoumoute

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 836
  • Rating: +54/-3
    • View Profile
Re: Axe 8-level (ish :P) Greyscale (With Code Example!!!!)
« Reply #35 on: December 11, 2010, 07:13:55 pm »
I have revised my calcul: in fact all the screens shown above was displaying no more than 7 levels of gray!

In Axe Parser, the screen can display 4 grayscale from 0% (white), 33%, 66% and 100% (black).
When we alternate on the screen 2 imaginary memory screens, we obtain 7 levels of gray : 0%+0%=0%, 0%+33%=16,5%, etc.

That is exactly what we find here :

(the 3rd and 6th tile are identical)

Then when we add a third screen in memory, we get 10 levels of gray : 0%+0%+0%=0%, 0%+0%+33%=11%, etc.
That's what we have here :

(hard to discern, but they are all here)

So on : with a 4th screen we get 13 levels of color. Briefly, it is far from the 144 levels of gray.

From 10 grayscale screen flashes.

For your eyes I've made a screen composed of 13 levels of gray, I don't see them all, but they are there.. :D
Projects :

Worms armageddon z80 :
- smoothscrolling Pixelmapping : 100%
- Map editor : 80%
- Game System : 0%

Tutoriel français sur l'Axe Parser
- 1ère partie : en ligne.
- 2ème partie : en ligne.
- 3ème partie : en ligne.
- 4ème partie : 10%
- Annexe : 100%

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Axe 8-level (ish :P) Greyscale (With Code Example!!!!)
« Reply #36 on: December 13, 2010, 12:19:26 am »
I have revised my calcul: in fact all the screens shown above was displaying no more than 7 levels of gray!

In Axe Parser, the screen can display 4 grayscale from 0% (white), 33%, 66% and 100% (black).
When we alternate on the screen 2 imaginary memory screens, we obtain 7 levels of gray : 0%+0%=0%, 0%+33%=16,5%, etc.

That is exactly what we find here :

(the 3rd and 6th tile are identical)

Then when we add a third screen in memory, we get 10 levels of gray : 0%+0%+0%=0%, 0%+0%+33%=11%, etc.
That's what we have here :

(hard to discern, but they are all here)

So on : with a 4th screen we get 13 levels of color. Briefly, it is far from the 144 levels of gray.

From 10 grayscale screen flashes.

For your eyes I've made a screen composed of 13 levels of gray, I don't see them all, but they are there.. :D

Great stuff!

I wish on-calc 8 level grayscale flickered less than WabbitEmu, because it would be epic to have in game. :D
Other funny stuff : random grayscales.

That looks great too, but when you create animated screenshots, when you start gif capture, you should wait at least 8 hours before running the program into the screenshot. :P

http://ourl.ca/6245
« Last Edit: December 13, 2010, 12:19:40 am by DJ Omnimaga »

Offline kindermoumoute

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 836
  • Rating: +54/-3
    • View Profile
Re: Axe 8-level (ish :P) Greyscale (With Code Example!!!!)
« Reply #37 on: December 13, 2010, 05:00:02 pm »
Sorry, first time I do it. :D
Projects :

Worms armageddon z80 :
- smoothscrolling Pixelmapping : 100%
- Map editor : 80%
- Game System : 0%

Tutoriel français sur l'Axe Parser
- 1ère partie : en ligne.
- 2ème partie : en ligne.
- 3ème partie : en ligne.
- 4ème partie : 10%
- Annexe : 100%

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Axe 8-level (ish :P) Greyscale (With Code Example!!!!)
« Reply #38 on: December 13, 2010, 05:08:13 pm »
No problem, I was being sarcastic in reference to how, 6 months ago, people waited extremly long in their screenshot to actually start the program then people had to wait 2-3 minutes before something cool happens. :P

Offline c.sprinkle

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 221
  • Rating: +23/-1
  • There ain't no rest for the wicked? True indeed.
    • View Profile
    • The Corread on NationStates.
Re: Axe 8-level (ish :P) Greyscale (With Code Example!!!!)
« Reply #39 on: December 13, 2010, 05:14:18 pm »
That is pretty cool. I wish you could speed the calc up so this would be useable.

Ashbad

  • Guest
Re: Axe 8-level (ish :P) Greyscale (With Code Example!!!!)
« Reply #40 on: December 13, 2010, 05:16:01 pm »
well, when sped up, it is still pretty flickery -- while it is not the fastest way to do 8 level (a faster way is possible in asm where you create scan lines and send the result directly to the lcd)

^that method I just mentioned can be almost flickerless, ALMOST.  But 4 level can be pretty perfect if you do it right :)

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: Axe 8-level (ish :P) Greyscale (With Code Example!!!!)
« Reply #41 on: December 13, 2010, 06:06:26 pm »
Looks nice Kinder. :)

I wonder if calc84 would write an 8 level greyscale Axiom...  ;D

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Axe 8-level (ish :P) Greyscale (With Code Example!!!!)
« Reply #42 on: December 14, 2010, 03:28:55 am »
^ That would rule. I don't know if I would use it much, though, because on the regular 83+ you can only see about 6 shades of gray. :( (contrast is too sparse)

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Axe 8-level (ish :P) Greyscale (With Code Example!!!!)
« Reply #43 on: December 14, 2010, 05:57:46 am »
^What DJ said. 8 is doable, but some of the shades are not very distinguishable from one another on calc. =(

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Axe 8-level (ish :P) Greyscale (With Code Example!!!!)
« Reply #44 on: December 14, 2010, 09:41:04 am »
Well, 7 is just about what I could get on my nspire, with the code I posted at the top. kindermoute, how did you get it to run that fast with the screen full of sprites?  O.O