Calculator Community > The Axe Parser Project

Axe Parser Grayscale

(1/3) > >>

Nathonion:
So I want to make a game in grayscale. I found a tutorial for it: https://www.omnimaga.org/axe-language/axe-greyscale-tutorial/, but when I tried it, it came out as black, light gray with dots in it, and white. I think dark gray came out as light gray (as mentioned before), and light gray came out as black. Could someone please tell me what I'm doing wrong?

Runer112:
Could you upload the program and provide a link, or paste the relevant part?

Making a guess, though, the second issue you described could be a combination of two individual issues: drawing the two parts of each sprite to the wrong (inverted) buffers, and calling DispGraphr (meant for 3-level grayscale) instead of DispGraphrr (meant for 4-level grayscale).

As for the first issue, if the "dots" aren't horrendously prominent, then that's probably just a side effect of updating the screen out of sync with its refresh rate. The closer it is to about 60Hz, which is very roughly the refresh rate of the calculator screen, generally the better the grayscale looks. You can achieve (nearly) perfect grayscale with GrayLib, but that may be overly complex if you're still just becoming familiar with the language.

Nathonion:
Here's the source code for it:
:
--- Code: ---.TEST
:
:[FFFFFFFF00000000]→Pic1
:[F0F0F0F0F0F0F0F0]→Pic2
:
:Repeat getKey(15)
:Pt-On(0,0,Pic1)r
:Pt-On(0,0,Pic2)
:DispGraphrr
:ClrDraw
:ClrDrawr
:End
--- End code ---

It was just meant to be a test to see how it worked. It was just suppose to draw a black square, a dark gray square, and a light gray square. The funny thing is, I got it to work a long time ago, but I forgot how I did it and the code got deleted.

As for GrayLib, I think I'll check it out.

E37:

--- Quote from: Nathonion on January 02, 2017, 04:06:45 pm ---Here's the source code for it:
:
--- Code: ---.TEST
:
:[FFFFFFFF00000000]→Pic1
:[F0F0F0F0F0F0F0F0]→Pic2
:
:Repeat getKey(15)
:Pt-On(0,0,Pic1)r
:Pt-On(0,0,Pic2)
:DispGraphrr
:ClrDraw
:ClrDrawr
:End
--- End code ---

It was just meant to be a test to see how it worked. It was just suppose to draw a black square, a dark gray square, and a light gray square. The funny thing is, I got it to work a long time ago, but I forgot how I did it and the code got deleted.

As for GrayLib, I think I'll check it out.

--- End quote ---
I switched pic1 and pic2 and it worked fine for me.
You can replace DispGraphrr:ClrDrawr:ClrDraw with :DispGraphClrDrawrr
ClrDrawrr also works

Nathonion:

--- Quote ---I switched pic1 and pic2 and it worked fine for me.
You can replace DispGraphrr:ClrDrawr:ClrDraw with :DispGraphClrDrawrr
--- End quote ---
Thanks for the advice E37! That fixed the colors in the wrong places. However, I noticed that the dark gray wasn't well defined from the black, so I did some screwing around and found that if you do :DispGraphClrDrawrr after pic1 and after pic2, It's perfect! Problem solved. I'm sure to implement this into some game down the line. Thanks for the help!  ;D

Navigation

[0] Message Index

[#] Next page

Go to full version