Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: squidgetx on September 19, 2011, 11:25:07 pm
-
So buttsfredkin suggested I write a tutorial on this subject, so I guess I might as well. This tutorial is going to be a little less structured than usual; I'm just going to list off a series of bullet point tips for you guys. Enjoy!
Note; For clarity purposes I've left the code relatively unoptimized.
- You can make menus sparkle a little with some animations. The most common one I like to use is a wipe-in effect. This can be accomplished with the use of acceleration and velocity to control the piece of text. Place the text in an array with ptr, xpos, ypos, xvel, and yvel. Sometimes, if you are having the text come in horizontally or vertically, you can save some time by omitting the appropriate values. For more information on acceleration, check out the specific tutorials thread for some simple explanations in the physics tutorials. The key here is that you want to start the text object with some starting velocity, and then have it decelerate so that it will slow and then stop. This can actually apply to many things, not just text; some examples can be menu cursors, borders, map tiles, and more.
"Text"->Str1
0->X
40->V
While V //While it has some velocity
Text(X/8,Y,Str1) //We'll use *8 precision
V-1->V+X->X //Decrease velocity by 1 and add it to the position
End
- Borders-You want to make a 'window border' for your menu, but you don't want a plain old box.... Well, there are many things you can do. Here are some of the menu variations I use:
Rect(x,y,w,h)
RectI(x+1,y+1,w-2,h-2)
Rect(x,y,w,h)^^r
RectI(x+2,y+2,w-4,h-4
Rect(x,y,w,h)
RectI(x+2,y+2,w-4,h-4)
Pxl-off(x,y)
Pxl-off(x+w,y)
Pxl-off(x,y+h)
Pxl-off(x+w,y+h)
Use your imagination!
- Custom Fonts- They are cool. I don't know if there's been a tutorial on this before, but it's pretty straightforward.
.Let's pretend that the fontset is stored in Pic1
Lbl W //write routine, arguments are x, y and pointer to text
For(E,0,length(r3)-1) //For the length of the word
Pt-On(E*8+r1,r2,{r3+E}-$41*8+Pic1) //Take value of text character and use it to draw the letter.
End
- Random aesthetic things: I've run out of things for now, so I'll just talk about random things. Circles and lines look good behind text. Check out Space Dash title screen for an example (link in sig). Grayscale layering effects are also very nice: copy L6 to L3, clear L6 and DispGraph^^r; again, you can see this in Space Dash (And Gravity Guy). Something that I haven't done before but also looks very nice is menu highlighting;akin to mouseovers, except on the calc. Oh, and make sure everything is always centered; that always makes everything look better.
Well I'm done for now, I might add some more stuff if I can think of it in the morning.
-
Wow, nice tutorial, squidgetx.
The only thing I don't understand is the dollar sign in the Pt-On()-Function in the last example. Is this new to axe in 1.0.x, in which menu can I get it, or is it just a typing mistake?
-
Yay for squigetx!! This will be useful information. Also, by the dollar sign in Pt-On, did you mean hexadecimal notation?
-
Wow, nice tutorial, squidgetx.
The only thing I don't understand is the dollar sign in the Pt-On()-Function in the last example. Is this new to axe in 1.0.x, in which menu can I get it, or is it just a typing mistake?
$ means the Hexadecimal notation symbol, not sure of what it is in Axe ;)
Nice tutorial squidgetx!