Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - calvinhtml

Pages: [1]
1
Axe / Axe Greyscale
« on: December 08, 2014, 06:26:31 pm »
Hi there, today I will be discussing how to program in greyscale! Yes. But not just three level, but also four. So before we start, let's answer this question. What is greyscale? Greyscale is the contrast between the front and back buffers, respectively. It creates a flickering lighter or darker image on the calculator. With that in mind, let's take a look at three and four level greyscale.
Three level greyscale is white, absolute LCD, grey, back buffer, and black, complete pixel turned on. To demonstrate this, let's write a sample program. The will display a box in three level greyscale.
Code: [Select]
.Threegre
[F00000000000000F]->Pic1
[0FFFFFFFFFFFFFF0]->Pic2
Repeat getkey(15)
Pt-on(25,25,Pic1
Pt-on(25,25,Pic2)r
DispGraphr
End

This is the superscript r, found in 2nd, Angle, 3. IF YOU DO NOT PUT THIS YOUR GREYSCALE WILL MESS UP!
Different in a way, but much the same is four level greyscale. Four level greyscale consists of 3 level greyscale with light grey, but also adds dark grey. This is what is turned on in the main buffer, but not the back. Let's see what a program with this would look like. Remember that this is the superscript r, not the letter r.
Code: [Select]
.Fourgrey
[FF818181818181FF->Pic1
[4242424242424242->Pic2
[6868686868686868->Pic3
Repeat getkey(15)
Pt-on(25,25,Pic1
Pt-on(25,25,Pic2)r
Pt-on(25,25,Pic3)r
Pt-on(25,25,Pic3
DispGraphrr
End

In this sample program, two superscript r's are need instead of one. Why? This is because you want to trigger both the main buffer, AND back buffer, instead of just the back buffer with one superscript r, and the main buffer with no superscript r. Kind of confusing? Well, let's look at an application you actually might use in a program. This will take a while.  ;)

Code: [Select]
.Link
10->A
47->B
.Back Buffer
[0F1F100004000018->Pic1
[C0E0200000000020->Pic2
[0001000100010000->Pic3
[70F0601070C00000->Pic4
.Main Buffer
[000040406B6B3F0C->Pic1A
[000008085858F040->Pic2A
[0320722222027C00->Pic3A
[8808000000000000->Pic4A
.Both Buffers
[00000F1F10140003->Pic1B
[0000C0E020A00898->Pic2B
[7CDE8DDCDCEC0000->Pic3B
[000090E08020E0E0->Pic4B
Repeat getkey(15)
Pt-on(A,B,Pic1)r
Pt-on(A,B,Pic1B)r
Pt-on(A,B,Pic1B
Pt-on(A,B,Pic1A
Pt-on(A+8,B,Pic2)r
Pt-on(A+8,B,Pic2B)r
Pt-on(A+8,B,Pic2B
Pt-on(A+8,B,Pic2A
Pt-on(A,B+8,Pic3)r
Pt-on(A,B+8,Pic3B)r
Pt-on(A,B+8,Pic3B
Pt-on(A,B+8,Pic3A
Pt-on(A+8,B+8,Pic4)r
Pt-on(A+8,B+8,Pic4B)r
Pt-on(A+8,B+8,Pic4B
Pt-on(A+8,B+8,Pic4A
Line(0,63,95,63
DispGraphClrDrawrr
47->B
If A<1:A++
End
If A>82:A--
End
If B<8:B+7->B
End
If B>47:B--
End
If getkey(4)
B-7->B
End
If getkey(2):A--
End
If getkey(3):A++
End
If getkey(15)
Return
End
End

Ok, I know that this is a very long code for one simple 16x16 sprite, but this should come out to be the Nintendo hit character, Link, holding a shield with a dark cross on it.
Feel free to use this in programs you make, but please give me at least 10% credit for drawing the sprites.
I realize that this might be hard to understand, so here is the post for greyscale where I learned how to do it: http://www.omnimaga.org/axe-language/axe-greyscale-tutorial/
Or, if you want to use a simpler method, you can go here: http://clrhome.org/pix/ for an online greyscale sprite editor with presets.
Sorry about the shown superscript code. I will fix it later. My phone is at three percent.

2
Other Calc-Related Projects and Ideas / Programming Ideas
« on: November 04, 2014, 07:13:01 pm »
OK, many people, including myself, are at a loss of what to program. It's quite a common thing after all.
I think we should dedicate this topic to ideas of what to program, and a difficulty level, if you have one in mind.

Start listing ideas please!  :w00t:

Pages: [1]