Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: alberthrocks on January 01, 2011, 07:41:04 pm

Title: Axe drawing questions
Post by: alberthrocks on January 01, 2011, 07:41:04 pm
Hello!

Some questions regarding Axe:
1) Can anyone explain to me how tunnel side drawing/generation works? And if possible, could I get an example to play with?
2) How big can sprites be?
3) Where/how are sprites drawn? Like text?
4) For "special" big font, are they just sprites?
5) Is there a good sprite drawing tool I could use? (Both calculator and PC)
Title: Re: Axe drawing questions
Post by: nemo on January 01, 2011, 08:29:20 pm
Hello!

Some questions regarding Axe:
1) Can anyone explain to me how tunnel side drawing/generation works? And if possible, could I get an example to play with?
2) How big can sprites be?
3) Where/how are sprites drawn? Like text?
4) For "special" big font, are they just sprites?
5) Is there a good sprite drawing tool I could use? (Both calculator and PC)

1) do you mean like a tunnel game?
2) 8x8 is the biggest the Pt-Change/On/Off routines will draw. Bitmap( will draw as large as you want, but it is a slow TIOS routine. you can join together multiple 8x8 routines to draw bigger sprites.
3)they're drawn onto the buffer, and then DispGraph copies the buffer to the screen.
4) see the Fix command in the commands list to change the font size.
5)Runer112 made a good one awhile back, i forget where it is. somewhere in the forum. PC there are no specific ones i can think of.
Title: Re: Axe drawing questions
Post by: Munchor on January 01, 2011, 08:30:22 pm
Hello!

Some questions regarding Axe:
1) Can anyone explain to me how tunnel side drawing/generation works? And if possible, could I get an example to play with?
2) How big can sprites be?
3) Where/how are sprites drawn? Like text?
4) For "special" big font, are they just sprites?
5) Is there a good sprite drawing tool I could use? (Both calculator and PC)

For the 5th, use Tokens :)
Title: Re: Axe drawing questions
Post by: Deep Toaster on January 01, 2011, 08:37:51 pm
On-calc, there are lots of spriters to choose from. Mine's at http://ourl.ca/8276/152459 (http://ourl.ca/8276/152459), and squidgetx's is at http://www.omnimaga.org/index.php?action=downloads;sa=view;down=587 (http://www.omnimaga.org/index.php?action=downloads;sa=view;down=587). There are a lot more around the forums, though. I liked Runer112's, but I can't seem to find it...
Title: Re: Axe drawing questions
Post by: Michael_Lee on January 02, 2011, 02:29:48 am
Careful with bitmaps -- if you try to draw them outside of the boundaries of the screen, you get RAM clears.  With sprites, you can draw them wherever you want -- it`s safe.
For number 5, I usually just use Microsoft Paint.  Tokens also has a good one, although I don`t know if it can handle gray.
Title: Re: Axe drawing questions
Post by: Deep Toaster on January 02, 2011, 10:29:56 am
Careful with bitmaps -- if you try to draw them outside of the boundaries of the screen, you get RAM clears.

Just for clarification, vertically :) Same thing happens with text, both Output( and Text(.
Title: Re: Axe drawing questions
Post by: aeTIos on January 02, 2011, 10:32:30 am
how do you draw bitmaps and whats the syntax??
Title: Re: Axe drawing questions
Post by: squidgetx on January 02, 2011, 10:51:57 am
First byte, height. Second byte, width. then the bitmap. So if you wanted to draw an 8x8 black square...
Code: [Select]
Bitmap(X,Y,[0808FFFFFFFFFFFFFFFF])
Title: Re: Axe drawing questions
Post by: Deep Toaster on January 02, 2011, 10:52:46 am
Bitmaps are stored 8 pixels per byte (like sprites), byte by byte in the row rounded up to the nearest 8 pixels, then row by row. Two bytes are added before the data for height, then width. So if you had a 14x6 block, it'd look something like this:

Code: (Axe data) [Select]
:[060E]→Pic0
:[FFFC]
:[FFFC]
:[FFFC]
:[FFFC]
:[FFFC]
:[FFFC]

The last two bits of each row are out of the 14-pixel width, so they don't get drawn, so I left them zero (hence the Cs).

To draw that, use

Code: (Axe) [Select]
:Bitmap(X,Y,Pic0)

It's a very slow TI-OS routine, so use it only for titles and stuff like that.
Title: Re: Axe drawing questions
Post by: aeTIos on January 02, 2011, 10:53:48 am
ah okay so you can easy draw big sprites with this i didnt know this
Title: Re: Axe drawing questions
Post by: Munchor on January 02, 2011, 11:00:38 am
I had no idea about this, in spite of having seen code with this. Thanks Deep!
Title: Re: Axe drawing questions
Post by: alberthrocks on January 02, 2011, 01:49:16 pm
1) do you mean like a tunnel game?
2) 8x8 is the biggest the Pt-Change/On/Off routines will draw. Bitmap( will draw as large as you want, but it is a slow TIOS routine. you can join together multiple 8x8 routines to draw bigger sprites.
3)they're drawn onto the buffer, and then DispGraph copies the buffer to the screen.
4) see the Fix command in the commands list to change the font size.
5)Runer112 made a good one awhile back, i forget where it is. somewhere in the forum. PC there are no specific ones i can think of.

1) yup, the tunnel game, but just the sides. I'm aiming for something similar to some program called 7G/G7.
2) I'll probably do that.. although I'm wondering if there's any programs that will autosplit it. (Yeah, I'm lazy with gfx :P)
3) Gotcha. But you still didn't answer my question - to be clearer, I'm referring to cursor position drawing. Is it like the Text( command where the top right corner of the text starts at the coor. specified?
4) No no, I've used Axe long enough to know that. :) I'm talking about custom font... big ones.
5) I'll have to look for it, unless someone can find it for me :)

Thanks for the links and help everyone! :D

Some more questions:
1) Does Text( really cause issues? I've done (a little) out of boundary drawing, and as far as I know it doesn't hurt it.
2) Is there transparency in sprites? If so, how?
3) Is there a program that can auto-split sprites, or is that something I'll have to do myself?
Title: Re: Axe drawing questions
Post by: Deep Toaster on January 02, 2011, 02:22:06 pm
1. Only when it's shifted vertically off the screen after Fix 5 (saving the text to the buffer).
2. Yes, Pt-On( draws with OR logic, so white pixels are "transparent" in that they leave what was originally there untouched.
3. Nope. What do you mean by that, though? Converting it to hex? Most spriters do that.
Title: Re: Axe drawing questions
Post by: FinaleTI on January 02, 2011, 05:01:57 pm
As for the tunnel thing, you could look at Blur's source code. It was my contest entry.
Linky. (http://www.omnimaga.org/index.php?action=dlattach;topic=4479.0;attach=3310)