Jump to content
IGNORED

Animation and Special Effect Contest


matthew180

Recommended Posts

This one takes characters 40 thru 47 and roll the character patterns up. And prepare yourself for a nice little surprise.

100 CALL INIT::CALL LOAD("DSK1.BARREL")
110 PRINT : : : : "( ) * + , - . /" : : : : "PRESS SPACE TO CONTINUE"
120 CALL LINK("MOVE")::CALL CLEAR::L$=RPT$("()*+,-./",5)
130 FOR A=0 TO 31::DISPLAY AT(A+1,1):SEG$(L$,(A AND 7)+1,28); ::NEXT A
140 DISPLAY AT(7,3):" ";
150 DISPLAY AT(8,3):" SPECIAL EFFECT CONTEST ";
160 DISPLAY AT(9,3):" ";
170 FOR A=0 TO 7::READ B,C$::CALL CHAR(40+A,RPT$("0",B)&C$)::NEXT A
180 CALL COLOR(2,16,1,5,14,1,6,14,1,7,14,1,8,14,1)
190 CALL SCREEN(2)::CALL LINK("MOVE")
200 DATA 0,1,2,4,6,8,10,4,12,1,11,4,7,2,3,4

 

icon_smile.gif

Edited by sometimes99er
Link to comment
Share on other sites

This one makes use of 28 sprites.

 

100 REM "* CHARACTER UNDEFINED" OR "YOU GOT TO MOVE ON"
110 CALL CLEAR::CALL SCREEN(5)::CALL COLOR(1,6,1,2,16,1)
120 CALL CHAR(32,"000004000000000040E04")
130 CALL CHAR(40,"040E1F0404040C0404041C0404040C0404041F0404")
140 CALL CHAR(43,"0000FF44040000000406FF4604")
150 CALL HCHAR(1,1,40)::CALL VCHAR(2,1,41,22)::CALL HCHAR(24,1,42)
160 CALL HCHAR(24,2,43,30)::CALL HCHAR(24,32,44)
170 FOR X=1 TO 28::CALL SOUND(400,110,30)
180 CALL SPRITE(#X,33,16,186,130+SIN(Y)*80+COS(Z)*26,-4,0)
190 Y=Y+.11::Z=Z+.39::NEXT X::GOTO 170

:)

Link to comment
Share on other sites

  • 4 weeks later...

I can't compete with you Assembly gurus but here is a little XB routine that I developed to use with a game I am developing at the moment (on and off anyway....). For the purpose of this thread I named it XB-SCROLL. This is my best attempt at "high res" smooth scrolling in BASIC.

 

1 ! XB-SCROLL

100 CALL CLEAR :: DISPLAY AT(2,11):"XB-SCROLL" :: CALL CHAR(128,RPT$("F",16),129,"00C0E0FEC778")

110 FOR I=96 TO 127 STEP 4 :: READ A$ :: CALL CHAR(I,A$) :: A=A+1 :: FOR D=0 TO 3 :: B$(A)=B$(A)&CHR$(I+D) :: NEXT D :: NEXT I

120 DISPLAY AT(16,1):RPT$(B$(1),7);RPT$(CHR$(128),224) :: CALL SPRITE(#1,129,16,100,30)

130 FOR I=1 TO 8 :: DISPLAY AT(16,1):RPT$(B$(I),7) :: B$(I)=SEG$(B$(I),2,3)&SEG$(B$(I),1,1) :: NEXT I :: GOTO 130

140 DATA 0000001D3F7FFFFF002078FDFFFFFFFF000E3FFFFFFFFFFF0000C0E0F0FEFFFF,0000003B7FFFFFFF0040F0FBFFFFFFFF001C7FFFFFFFFFFF000080C0E0FCFFFF

150 DATA 00000177FFFFFFFF0080E0F7FFFFFFFF0038FFFFFFFFFFFF00000080C0F9FFFF,000103EFFFFFFFFF0000C1EFFFFFFFFF0070FEFFFFFFFFFF0000000081F3FFFF

160 DATA 000207DFFFFFFFFF000083DFFFFFFFFF00E0FCFEFFFFFFFF0000000103E7FFFF,00040FBFFFFFFFFF000107BFFFFFFFFF00C0F8FCFEFFFFFF0000000307CFFFFF

170 DATA 00081E7FFFFFFFFF00030F7FFFFFFFFF0080F0F8FCFFFFFF000000070F9FFFFF,00103CFEFFFFFFFF00071FFFFFFFFFFF0000E0F0F8FFFFFF0000000E1F3FFFFF

 

wow! Why didn't I try this earlier? Very impressive considering that is done in extended basic :o

Link to comment
Share on other sites

This one takes characters 40 thru 47 and roll the character patterns up. And prepare yourself for a nice little surprise.

 

100 CALL INIT::CALL LOAD("DSK1.BARREL")
110 PRINT : : : : "( ) * + , - . /" : : : : "PRESS SPACE TO CONTINUE"
120 CALL LINK("MOVE")::CALL CLEAR::L$=RPT$("()*+,-./",5)
130 FOR A=0 TO 31::DISPLAY AT(A+1,1):SEG$(L$,(A AND 7)+1,28); ::NEXT A
140 DISPLAY AT(7,3):"                        ";
150 DISPLAY AT(8,3):" SPECIAL EFFECT CONTEST ";
160 DISPLAY AT(9,3):"                        ";
170 FOR A=0 TO 7::READ B,C$::CALL CHAR(40+A,RPT$("0",B)&C$)::NEXT A
180 CALL COLOR(2,16,1,5,14,1,6,14,1,7,14,1,8,14,1)
190 CALL SCREEN(2)::CALL LINK("MOVE")
200 DATA 0,1,2,4,6,8,10,4,12,1,11,4,7,2,3,4

:)

 

Attached zip contains disk for MESS, disk for Win994a and files for Classic99.

This is amazing!

Link to comment
Share on other sites

I can't compete with you Assembly gurus but here is a little XB routine that I developed to use with a game I am developing at the moment (on and off anyway....). For the purpose of this thread I named it XB-SCROLL. This is my best attempt at "high res" smooth scrolling in BASIC.

 

1 ! XB-SCROLL

100 CALL CLEAR :: DISPLAY AT(2,11):"XB-SCROLL" :: CALL CHAR(128,RPT$("F",16),129,"00C0E0FEC778")

110 FOR I=96 TO 127 STEP 4 :: READ A$ :: CALL CHAR(I,A$) :: A=A+1 :: FOR D=0 TO 3 :: B$(A)=B$(A)&CHR$(I+D) :: NEXT D :: NEXT I

120 DISPLAY AT(16,1):RPT$(B$(1),7);RPT$(CHR$(128),224) :: CALL SPRITE(#1,129,16,100,30)

130 FOR I=1 TO 8 :: DISPLAY AT(16,1):RPT$(B$(I),7) :: B$(I)=SEG$(B$(I),2,3)&SEG$(B$(I),1,1) :: NEXT I :: GOTO 130

140 DATA 0000001D3F7FFFFF002078FDFFFFFFFF000E3FFFFFFFFFFF0000C0E0F0FEFFFF,0000003B7FFFFFFF0040F0FBFFFFFFFF001C7FFFFFFFFFFF000080C0E0FCFFFF

150 DATA 00000177FFFFFFFF0080E0F7FFFFFFFF0038FFFFFFFFFFFF00000080C0F9FFFF,000103EFFFFFFFFF0000C1EFFFFFFFFF0070FEFFFFFFFFFF0000000081F3FFFF

160 DATA 000207DFFFFFFFFF000083DFFFFFFFFF00E0FCFEFFFFFFFF0000000103E7FFFF,00040FBFFFFFFFFF000107BFFFFFFFFF00C0F8FCFEFFFFFF0000000307CFFFFF

170 DATA 00081E7FFFFFFFFF00030F7FFFFFFFFF0080F0F8FCFFFFFF000000070F9FFFFF,00103CFEFFFFFFFF00071FFFFFFFFFFF0000E0F0F8FFFFFF0000000E1F3FFFFF

 

wow! Why didn't I try this earlier? Very impressive considering that is done in extended basic :o

 

Yeah - DISPLAY AT is probably the most underrated command available. So powerful... And relatively fast.

Link to comment
Share on other sites

I agree, DISPLAY AT rocks. RXB has something similar called HPUT but it allows you to use the additional 4 screen characters that XB DISPLAY AT doesn't. Even better, RXB HGET & VGET (similar to GCHAR but can fetch 255 characters in a single command), combined with HPUT & VPUT really opens the doors for some creative BASIC programming.

 

I totally dig RXB and wish this was TI's version of XB. There are only a handful of additional commands in RXB but is makes so much difference to what you are able to do with BASIC programming.

 

Oooops... Off topic. :cool:

Link to comment
Share on other sites

Well, I guess this contest deadline has passed. I think it basically became a showcase for Sometimes99er's work, which I have been admiring for a long time and is very impressive.

 

There were a few early submissions by others, and I'm good for the prizes if anyone cares to be judged and receive them? But I won't have time to look at all the entries until after the Faire. So does anyone want to help with the judging to make it happen faster?

 

Matthew

Link to comment
Share on other sites

Scrolling lines in TI-Basic.

Very sloppy coding, copy and pasting in notepad make for bad programming style!

I code wrap all the scrolling into a few routines and gosub to them and reduce the size of the file by alot, but I wasn't concerned about size and this was simple to write with copy and paste code repeats.

lines.zip

Link to comment
Share on other sites

This draws a single pixel in a single char value. Then will modify that char value according to the joystick movement.

It is painfully slow and is just something I was playing around with on modifying character codes in basic. use overdrive in classic99. This will work in plain TI-Basic and is broke down in single line commands for that.

 

5 DIM C$(
10 c$(1)="80"
11 c$(2)="40"
12 c$(3)="20"
13 c$(4)="10"
14 c$(5)="08"
15 c$(6)="04"
16 c$(7)="02"
17 c$(="01"
20 X=100
21 Y=100
30 SX=INT(X/8)
31 SY=INT(Y/8)
32 PX=X-SX*8+1
33 PY=Y-SY*8+1
34 CT$=""
35 FOR L=1 TO PY-1
36 CT$=CT$&"00"
37 NEXT L
40 CH$=CT$&C$(PX)
45 CALL CHAR(33,CH$)
50 CALL HCHAR(SY,SX,33,1)
51 CALL HCHAR(SY-1,SX-1,32,3)
52 CALL HCHAR(SY,SX-1,32,1)
53 CALL HCHAR(SY,SX+1,32,1)
54 CALL HCHAR(SY+1,SX-1,32,3)
60 CALL JOYST(1,JX,JY)
70 X=X+(JX/4)
71 Y=Y-(JY/4)
80 GOTO 30

 

It doesn't remember the current char but recalculates it each frame.

 

How it works is simple, I stored the 8 possible column positions of the pixel in the array c$(8).

Then find the screen character location using, SX=INT(X/8) and SY=INT(Y/8) where x and y are pixel coords.

Then find the pixels location in the character, PX=X-SX*8+1 and PY=Y-SY*8+1

Basic doesn't have the XB RPT$ command so I had to make a loop for it but this is the same thing CH$=RPT$("00",PY-1)&C$(PX), which adds the correct number of 0's in front of the pixels column value to place it in the right row.

With that info just CALL HCHAR(SY,SX,char number,1)

 

I did cheat and didn't use any overflow checking, so when the pixel moves out of the current character, when px,py is <1 or >8, you erase the previous screen location, I just erased all 8 squares around the pixel.

 

same code in XB format

5 DIM C$(
10 c$(1)="80"::c$(2)="40"::c$(3)="20"::c$(4)="10"::c$(5)="08"::c$(6)="04"::c$(7)="02"::c$(="01"
20 X=100::Y=100
30 SX=INT(X/8)::SY=INT(Y/8)
32 PX=X-SX*8+1::PY=Y-SY*8+1
40 CH$=RPT$("00",PY-1)&C$(PX)
45 CALL CHAR(33,CH$)
50 CALL HCHAR(SY,SX,33,1)
51 CALL HCHAR(SY-1,SX-1,32,3)
52 CALL HCHAR(SY,SX-1,32,1)
53 CALL HCHAR(SY,SX+1,32,1)
54 CALL HCHAR(SY+1,SX-1,32,3)
60 CALL JOYST(1,JX,JY)
70 X=X+(JX/4)::Y=Y-(JY/4)
80 GOTO 30

Link to comment
Share on other sites

Thanks to Owen for remembering my old "dude looks like a lady" XB animation. Was supposed to be a dragon.

 

This one is called FAT, and it takes whatever character patterns are available (in VDP memory) and make them "fat". Basically I'm using two instructions, SRL and SOC.

 

SRL = Shift Right Logical. It moves all pixels one position to the right.

 

SOC = Set Ones Corresponding. It takes the pixels moved right and combines them with the original pixels. A "fat" effect ...

 

fat.gif

 

:)

 

Attached zip contains source, disk for MESS, disk for Win994a and files for Classic99.

 

 

This is a very interesting effect. If you take away the VDP read/write stuff, it boils down to just 3 assembly instructions:

 

movb	r1,r3		; modify
srl	r3,>1
soc	r3,r1

 

Do you mind sharing how or where from you got the idea ? Very cool!

Link to comment
Share on other sites

This is a very interesting effect. If you take away the VDP read/write stuff, it boils down to just 3 assembly instructions:

 

movb	r1,r3		; modify
srl	r3,>1
soc	r3,r1

Do you mind sharing how or where from you got the idea ? Very cool!

Thanks for taking a look and giving feedback.

 

Back in the day, mainly with TI-99/4A and later C64, I generally wanted my games to have a black background to probably emulate high quality arcade look and feel. Since I was using televisions, text would be much more readable, if they were "wide" horizontally. At the time I mostly used custom fonts. I'm pretty sure I later experimented with making letters fat semi-automatically using Deluxe Paint on the Amiga.

 

I played around with V9T9 in 2003, and got into the business again, when discovering MESS, TIasm and the ability to produce my own cartridges. Well, only cartridges in emulation, but it was just way too cool. I quickly applied for a subsite at 99er.net to present my small cartridges. That was early July 2004, and my 3rd project was to be a game called Starfield. On the second day, July 23rd, I got the idea for making the font "fat". I think I was just going thru the individual assembler instructions, and then SOC apparently was so obvious for such an effect. There you go.

 

:)

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...