This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic => TI-BASIC
United-TI Archives -> TI-Basic
 
    » Goto page Previous  1, 2, 3, 4 ... 20, 21, 22  Next
» View previous topic :: View next topic  
Author Message
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 13 Nov 2003 05:25:49 pm    Post subject:

Can somebody come up with chess (pawn, knight, bishop, rook, king, queen) sprites? 8x8 because the screen isn't large enough for bigger pieces - really they would need to be smaller so 2 pieces don't look connected.

Last edited by Guest on 14 Nov 2003 04:09:40 pm; edited 1 time in total
Back to top
JacobdeHaan


Member


Joined: 10 Jul 2003
Posts: 165

Posted: 20 Nov 2003 01:02:04 am    Post subject:

Wow, cool thread you got going here Arcane Wizard. If I'd known that this was around I wouldn't have posted my other wish for sprites in the program release section.
Anyways, all I'm looking for is a good 8x8 sprite of the poopsmith (http://www.homestarrunner.com/vcr_poop.html) for the game I've completed but want better graphics for.
Back to top
JacobdeHaan


Member


Joined: 10 Jul 2003
Posts: 165

Posted: 20 Nov 2003 01:36:02 am    Post subject:

Sir Robin, here you go:


Code:
; Chess pieces
; these pieces are adapted from Sargon II (a chess-playing
; program written in the 70's for the Z80 microprocessor).

   .db   %11111111; pawn AND
   .db   %11111111
   .db   %11100111
   .db   %11000011
   .db   %11000011
   .db   %11100111
   .db   %11000011
   .db   %11111111

   .db   %11111111; rook/castle AND
   .db   %10100101
   .db   %10000001
   .db   %11000011
   .db   %11000011
   .db   %11000011
   .db   %10000001
   .db   %11111111

   .db   %11111111; knight AND
   .db   %11100011
   .db   %11000001
   .db   %10000001
   .db   %11100001
   .db   %11000001
   .db   %10000011
   .db   %11111111

   .db   %11111111; bishop AND
   .db   %11110111
   .db   %11100011
   .db   %11000011
   .db   %11000011
   .db   %11100111
   .db   %11000011
   .db   %11111111

   .db   %11111111; king AND
   .db   %11100111
   .db   %10000001
   .db   %10000001
   .db   %10000001
   .db   %11000011
   .db   %10000001
   .db   %11111111

   .db   %11111111; queen AND
   .db   %10111101
   .db   %10000001
   .db   %10000001
   .db   %11000011
   .db   %11100111
   .db   %10000001
   .db   %11111111

   .db   %00000000; black pawn XOR
   .db   %00000000
   .db   %00000000
   .db   %00011000
   .db   %00011000
   .db   %00000000
   .db   %00000000
   .db   %00000000

   .db   %00000000; black rook/castle XOR
   .db   %00000000
   .db   %00000000
   .db   %00011000
   .db   %00011000
   .db   %00011000
   .db   %00000000
   .db   %00000000

   .db   %00000000; black knight XOR
   .db   %00000000
   .db   %00011100
   .db   %00011100
   .db   %00001100
   .db   %00011000
   .db   %00000000
   .db   %00000000

   .db   %00000000; black bishop XOR
   .db   %00000000
   .db   %00001000
   .db   %00011000
   .db   %00011000
   .db   %00000000
   .db   %00000000
   .db   %00000000

   .db   %00000000; black king XOR
   .db   %00000000
   .db   %00011000
   .db   %00100100
   .db   %00111100
   .db   %00011000
   .db   %00000000
   .db   %00000000

   .db   %00000000; black queen XOR
   .db   %00000000
   .db   %00000000
   .db   %00111100
   .db   %00011000
   .db   %00000000
   .db   %00000000
   .db   %00000000

Not made by me. Comes from Chris Williams
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 20 Nov 2003 09:20:45 am    Post subject:

JacobdeHaan wrote:
Anyways, all I'm looking for is a good 8x8 sprite of the poopsmith (http://www.homestarrunner.com/vcr_poop.html) for the game I've completed but want better graphics for.

This is the best I can come up with.


Code:
00001100
00011100
00101010
01111101
10101000
10111000
00101000
00111100


Swordsman:

Code:
00000000
01100100
10110100
10010100
01100100
10100100
11010100
11011110
11000110
10111100
10001000
11111000
10010000
11110000
10001000
11111000


Last edited by Guest on 20 Nov 2003 09:30:27 am; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 20 Nov 2003 05:06:01 pm    Post subject:

Thanks, JacobDeHaan. So, to put a black pawn I would need to AND the pawn sprite, then XOR the black pawn sprite in the same place, right?
Back to top
JacobdeHaan


Member


Joined: 10 Jul 2003
Posts: 165

Posted: 20 Nov 2003 07:19:26 pm    Post subject:

Umm, I don't have a clue. I just copied the from the file linked to earlier.

Arcane Wizard, thanks for the sprite of the poopsmith, it's definently better than what I can manage, not a lot of detail can go into an 8x8 sprite.
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 21 Nov 2003 02:32:37 am    Post subject:

No, 8*8 is quite limiting, but the good thing is that the actual drawing of the sprite doesn't take much time.

I think I'll write a C++ program that'll store every possible combination of pixels in 8*8 and then filter out everything that looks crappy manually. Probably not this weekend though.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 21 Nov 2003 05:20:21 pm    Post subject:

Every possible combination? There are 2^64 = 18446744073709551616 combinations!
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 21 Nov 2003 05:26:34 pm    Post subject:

True, I'll probably stick with the program part and never do the manually filtering part. Maybe look at the results a bit, I just want to program something in a real programming language and don't have time to read 'Windows Game Programming In 24 Hours'.

I wonder how long it'll take to execute and how big the file will be.
Back to top
Basjuh


Advanced Newbie


Joined: 19 Nov 2003
Posts: 56

Posted: 21 Nov 2003 08:54:30 pm    Post subject:

you'll get 2^64 sprites which is 1,84 * 10^19, almost impossible to sort that out...
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 22 Nov 2003 07:41:32 am    Post subject:

Meh, it'll take at least 8589934592 Terrabytes. Wacko
Back to top
X1011
10100111001


Active Member


Joined: 14 Nov 2003
Posts: 657

Posted: 22 Nov 2003 12:07:43 pm    Post subject:

nah, i figured only about 134,217,728 TB Very Happy

Last edited by Guest on 22 Nov 2003 12:23:55 pm; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 22 Nov 2003 02:14:48 pm    Post subject:

Exactly that amount: 2^64 * 2^3 / 2^10 / 2^10 / 2^10 / 2^10 = 2^27 TB. Then you divide by 2 each time for vertical, horizontal, left to right diagonal, and right to left diagonal reflections. That will be 'only' 8388608 TB.

Last edited by Guest on 22 Nov 2003 02:15:07 pm; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 22 Nov 2003 02:29:52 pm    Post subject:

I figured out how to use the chess sprites if anyone wants to know. For the black pieces, take the inversion of the 'piece AND' sprite. For white pieces, take the inversion of the 'black piece XOR' on top of the 'piece AND' sprite. They are decent, except the king looks like a pumpkin and the queen like a grail.
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 23 Nov 2003 01:58:50 pm    Post subject:

18446744073709551616 combinations:
each combination: 8*8 characters
each character: 8 bytes

combinations * characters * 8 / 1024^4 = 18446744073709551616 * 8^3 / 1024^4 = 8589934592

Hence, 8589934592 TB


Last edited by Guest on 23 Nov 2003 01:59:16 pm; edited 1 time in total
Back to top
Spyderbyte


Advanced Member


Joined: 29 May 2003
Posts: 372

Posted: 23 Nov 2003 06:37:35 pm    Post subject:

Arcane Wizard wrote:
I think I'll write a C++ program that'll store every possible combination of pixels in 8*8 and then filter out everything that looks crappy manually. Probably not this weekend though.

How come I could never find anything on C++ graphics when I was experimenting with the language??? Mad I ended up ditching it and experimenting with java instead. (Which I also lost interest in. Rolling Eyes )

Spyderbyte
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 24 Nov 2003 07:10:25 am    Post subject:

Pure C++ can't do graphics, you'll need a Graphics API like Win32, DirectX, or OpenGL. Or you'll need assembly.

The funny thing is, learning to use these takes much more time than learning C++, which is quite easy.

Still, pure C++ can mess with arrays, hence there's no need to output any graphics (just data to a text file) in the program I wanted to do.


Last edited by Guest on 24 Nov 2003 07:11:52 am; edited 1 time in total
Back to top
Jedd
1980 Pong World Champion


Elite


Joined: 18 Nov 2003
Posts: 823

Posted: 24 Nov 2003 02:33:01 pm    Post subject:

Here's a sprite i might use in pocket tanks:

00000010
00000100
00001000
00111100
00111100
11111111
11111111
01111110

Of course, I'll use a different turret, the one used in the sprite above is just so you can see what it would look like at a 45 degree angle.
Back to top
sgm


Calc Guru


Joined: 04 Sep 2003
Posts: 1265

Posted: 24 Nov 2003 02:59:17 pm    Post subject:

Arcane Wizard wrote:
Pure C++ can't do graphics, you'll need a Graphics API like Win32, DirectX, or OpenGL. Or you'll need assembly.

Or just execute an interrupt (I think 0x10) and dump crap at A000:0000 to get crappy VGA graphix!


Code:
/*
  * Works on a 16-bit compiler, 32-bit compilers need special functions to
  * poke at a segmented address.
  *
  */

#include <dos.h>
#include <conio.h>
(unsigned char far *)v_buffer = 0xA0000000L;

void main()
{
     int   i = 0;
     union REGS   inregs, outregs;

     inregs.h.ah = 0;
     inregs.h.al = 0x13;
     int86( 0x10, &inregs, &outregs );

     for(; i < 100; i++ )
          *(v_buffer + i) = i;

     getch();

     inregs.h.ah = 0;
     inregs.h.al = 0x03;
     int86( 0x10, &inregs, &outregs );
}


Then again, maybe better to learn an API, but that's how they did it in the days of yore (1994). Smile
Back to top
Babyboy


Advanced Member


Joined: 11 Jun 2003
Posts: 499

Posted: 29 Nov 2003 11:59:18 am    Post subject:

ok guys, i love the sprites, but how do i make them move fairly quickly?

Here is what i have


Code:
Pt-On(47.5,32
Pt-On(48.51,30.96
Pt-On(46.48,30.96
Pt-On(47.5,29.93
Pt-On(46.48,28.9
Pt-On(48.51,28.9
Pt-On(47.5,27.87
Pt-On(48.51,26.83
Pt-On(46.48,26.83

47.5üL(1)
32üL(2)
48.51üL(3)
30.96üL(4)
46.48üL(5)
30.96üL(6)
47.5üL(7)
29.93üL(8)
46.48üL(9)
28.9üL(10)
48.51üL(11)
28.9üL(12)
47.5üL(13)
27.87üL(14)
48.51üL(15)
26.83üL(16)
46.48üL(17)
26.83üL(18)


Lbl SP
getKeyüK
Pt-On(L(1),L(2)
Pt-On(L(3),L(4)
Pt-On(L(5),L(6)
Pt-On(L(7),L(8)
Pt-On(L(9),L(10)
Pt-On(L(11),L(12)
Pt-On(L(13),L(14)
Pt-On(L(15),L(16)
Pt-On(L(17),L(18)
If K=26
Then
ClrDraw
L(1)+2üL(1)
L(3)+2üL(3)
L(5)+2üL(5)
L(7)+2üL(7)
L(9)+2üL(9)
L(11)+2üL(11)
L(13)+2üL(13)
L(15)+2üL(15)
L(17)+2üL(17)
End
Goto SP



Its incredibly slow and unoptimised, a FOR WHILE loop wouldnt work for some reason, also, I tried changing CLRDRAW with Text(L1(1),L1(2)," " to delete the afterimage but it gives me a domain error when i move, NOTE- i start in the middle of the screen. This is the smallest sprite i could make without it looking weird (9 dots). I know that you have probly answered this a million times and that basic cant handle the code and make it fast, but anything would help



TI-OS changes the BASIC code to binary one line at a time, couldn't it turn the WHOLE FREAKIN PROGRAM into binary\machine code BEFORE the program ran?!? (HINT TO TI!!!)
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page Previous  1, 2, 3, 4 ... 20, 21, 22  Next
» View previous topic :: View next topic  
Page 3 of 22 » All times are UTC - 5 Hours

 

Advertisement