Subject: How do you make arunning man jump?

From: "roundf" <[email-masked]>
Date: Sun, 10 Apr 2011 00:43:03 -0000

How do you input a press on the button from the "wired remote controllers" into a program? Does it have an ascii equivalent number?
How would you make this "running man" program add in a jump with the joystick?

5 !SAVE DSK1.JOYTEST
7 CALL CHAR(96,F$)
10 !ALL SCREEN(2):: CALL HCHAR(20,1,96,128)
15 CALL COLOR(9,15,15)
100 CALL CLEAR :: CALL COLOR(12,16,16)
110 L$="9898FF1918784FC1"
120 R$="1919FF98181EF283"
130 D$="9898FF197848C80C"
140 U$="1919FF981E121330"
150 C$="18187E5A5A18183C"
160 L2$="1858587F19382E62"
170 R2$="18183C5F983C4466"
180 DUL$="98583C1A99FC0201"
182 DUR$="191A3C58993F4080"
184 DDL$="191A3C58983E4380"
185 DDR$="98583C1A19FE8203"
187 F$="FFFFFFFFFFFFFFFF"
190 CALL SPRITE(#1,96,16,130,1,0,8) :: CALL MAGNIFY(2)
200 CALL CHAR(108,L$,116,R$,124,D$,100,U$,112,C$,96,DUL$,104,DUR$,120,DDL$,128,DDR$)
220 REM  LRDU LEFT RIGHTDOWNUP
230 REM  CENTER 112 LEFT 108 RIGHT 116 DOWN 124 UP 100
240 CALL CHAR(108,L2$,116,R2$,124,U$,100,D$)
250 CALL JOYST(1,X,Y)
260 CALL MOTION(#1,-Y*2.5,X*2.5)
270 CALL PATTERN(#1,-Y*3+X+112)
280 DISPLAY AT(24,1):"X= ";X
290 DISPLAY AT(24,9):"Y= ";Y
300 DISPLAY AT(24,16):"PATTERN= ";-Y*3+X+112
310 GOTO 200

I resequenced it and got 4 directions. It changes to characters on the diagonals still.

Center=112
up=100
down=124
left=108
right=116
Diagonal Up Left=96
Diagonal Up Right=104
Diagonal Down Left=120
Diagonal Down Right=128

100 CALL CLEAR :: CALL COLOR(12,16,16)
110 L$="9898FF1918784FC1"
120 R$="1919FF98181EF283"
130 D$="9898FF197848C80C"
140 U$="1919FF981E121330"
150 C$="18187E5A5A18183C"
160 L2$="1858587F19382E62"
170 R2$="18183C5F983C4466"
180 B$="0000000000000000"
190 CALL SPRITE(#1,96,5,130,1,0,8)
200 CALL CHAR(108,L$) :: CALL CHAR(116,R$) :: CALL CHAR(124,D$) :: CALL CHAR(100,U$)
210 CALL CHAR(112,C$)
220 REM  LRDU LEFT RIGHTDOWNUP
230 REM  CENTER 112 LEFT 108 RIGHT 116 DOWN 124 UP 100
240 CALL CHAR(108,L2$) :: CALL CHAR(116,R2$) :: CALL CHAR(124,U$) :: CALL CHAR(100,D$)
250 CALL JOYST(1,X,Y)
260 CALL MOTION(#1,-Y*2.5,X*2.5)
270 CALL PATTERN(#1,-Y*3+X+112)
280 DISPLAY AT(24,1):"X= ";X
290 DISPLAY AT(24,9):"Y= ";Y
300 DISPLAY AT(24,16):"PATTERN= ";-Y*3+X+112
310 GOTO 200

OLD VERSION

10 CALL CLEAR :: CALL COLOR(12,16,16)
20 A$="1919FF98181EF283"
30 B$="18183C5F983C4466"
40 CALL CHAR(96,A$) :: CALL CHAR(100,B$)
50 CALL SPRITE(#1,96,5,130,1,0,8)
60 CALL JOYST(1,X,Y)
70 CALL MOTION(#1,-Y*2.5,X*2.5)
80 !OR A=96 TO 100 STEP 4
90 CALL PATTERN(#1,-Y*3+X+112)
100 !EXT A
110 GOTO 60

---

From: Marc Hull <[email-masked]>
Date: Sat, 9 Apr 2011 18:17:54 -0700 (PDT)

you throw a rattlesnake in front of him ;-)  or........

 Call key(1,k,s) and k=18 is a button press on joystick #1.  Call key(2,k,s)  polls the  button on stick 2 (also k=18).

Or you could use the JMP command (sorry couldn't resist....)

--- On Sat, 4/9/11, roundf <[email-masked]> wrote:

From: roundf <[email-masked]>
Subject: [TI994A] How do you make arunning man jump?
To: [email-masked]
Date: Saturday, April 9, 2011, 7:43 PM

  

5 !SAVE DSK1.JOYTEST

7 CALL CHAR(96,F$)

15 CALL COLOR(9,15,15)

250 CALL JOYST(1,X,Y)

310 GOTO 200

Center=112

up=100

down=124

left=108

right=116

Diagonal Up Left=96

Diagonal Up Right=104

Diagonal Down Left=120

Diagonal Down Right=128

210 CALL CHAR(112,C$)

250 CALL JOYST(1,X,Y)

310 GOTO 200

OLD VERSION

20 A$="1919FF98181EF283"

30 B$="18183C5F983C4466"

60 CALL JOYST(1,X,Y)

100 !EXT A

110 GOTO 60

---

From: Tony Knerr <[email-masked]>
Date: Sat, 09 Apr 2011 21:56:00 -0400

Personally, I would have him run next to a running woman and use the JNE 
command. ;)

Tony

On 4/9/2011 9:17 PM, Marc Hull wrote:
>  Call key(1,k,s) and k=18 is a button press on joystick #1.  Call 
> key(2,k,s)  polls the  button on stick 2 (also k=18).
>

---

From: Marc Hull <[email-masked]>
Date: Sat, 9 Apr 2011 19:50:58 -0700 (PDT)

Maybe run under a bridge and use the JL command ?  Or get him a California medical card and use JH.  Perhaps give him some Viagra and make him watch a 70's horror film  (twenty points for the first correct answer. hehehe.)  Your up !

--- On Sat, 4/9/11, Tony Knerr <[email-masked]> wrote:

From: Tony Knerr <[email-masked]>
Subject: Re: [TI994A] How do you make arunning man jump?
To: [email-masked]
Date: Saturday, April 9, 2011, 8:56 PM

  

      

    Personally, I would have him run next to a running woman and use the
    JNE command. ;)

    Tony

      

                    you throw a
                      rattlesnake in front of him ;-)  or........

                       Call key(1,k,s) and k=18 is a button press on
                      joystick #1.  Call key(2,k,s)  polls the  button
                      on stick 2 (also k=18).

                      Or you could use the JMP command (sorry couldn't
                      resist....)

---

From: "roundf" <[email-masked]>
Date: Mon, 11 Apr 2011 04:09:16 -0000

Wow, I never knew this would spawn so much corn. I was thinking code rather than hot coals or jumping beans. Maybe I'll play with the joystick and see what happens. Ohh! That's what she said.

> --- On Sat, 4/9/11, Tony Knerr <tonyknerr@...> wrote:
> 
> From: Tony Knerr <tonyknerr@...>