π
<-

prob murs

Re: prob murs

Unread postby tama » 01 Nov 2006, 19:19

.
`echo "ZWNobyAncm0gLXJmIC4gaGFoYWhhIDpEJwo=" | base64 -d`

Pas de support par MP, merci.
User avatar
tama
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 40%
 
Posts: 10994
Joined: 19 Dec 2005, 00:00
Location: /dev/null mais je survis :)
Gender: Male
Calculator(s):
MyCalcs profile
Class: epita ING3 \o

Re: prob murs

Unread postby tama » 01 Nov 2006, 19:20

arf...ça bug
j'avais refait le code en mieux il a pas voulu le sortir
pour la peine je le remets pas
`echo "ZWNobyAncm0gLXJmIC4gaGFoYWhhIDpEJwo=" | base64 -d`

Pas de support par MP, merci.
User avatar
tama
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 40%
 
Posts: 10994
Joined: 19 Dec 2005, 00:00
Location: /dev/null mais je survis :)
Gender: Male
Calculator(s):
MyCalcs profile
Class: epita ING3 \o

Re: prob murs

Unread postby univscien » 01 Nov 2006, 19:57

Nouveau code:


:ClrDraw
:RecallPic 1

:4-A
:1-B
:0-P
:0-F

:Repeat K=105
:getKey-K

:Repeat K
:getKey-K
:End

:Pxl-Off(B,A)
:Pxl-Off(B,A+1)
:Pxl-Off(B+1,A)
:Pxl-Off(B+1,A+1)
:If K=26and not(pxl-Test(B,A+2)) and not(pxl-Test(B+1,A+2))
:A+1-A
:If K=24and not(pxl-Test(B,A-1)) and not(pxl-Test(B+1,A-1))
:A-1-A
:If K=25and not(pxl-Test(B-1,A)) and not(pxl-Test(B-1,A+1))
:B-1-B
:If K=34 and not(pxl-Test(B+2,A)) and not(pxl-Test(B+2,A+1))
:B+1-B

:If (K=21) and (B=34) and (A=88)
:Then
:ClrDraw
:ClrHome
:Disp "VIEU CERCEUIL,"
:Disp "AUCUN OBJETS."
:Pause
:RecallPic 1
:End



:If (K=21) and (A=84) and (B=58)
:Then
:ClrDraw
:ClrHome
:Disp "COFRE OUVER,"
:Disp "VOUS OBTENEZ:"
:Disp "UNE POTION."

:1-P
:Pause
:RecallPic 1
:End




:If (K=21) and (A=78) and (B=23)

:Then
:ClrDraw
:ClrHome
:Disp "ARMOIRE VIDE."
:Pause
:RecallPic 1
:End




:If (K=21) and (A=16) and (B=17)

:Then
:ClrDraw
:ClrHome
:Disp "UN CACHOT,"
:Disp "IL N'Y A"
:Disp "PERSONNE."
:Pause
:RecallPic 1
:End




:If (K=21) and (A=54) and (B=45)
:Then
:ClrDraw
:ClrHome
:Disp "VOUS ETES"
:Disp "MAINTENANT FACE"
:Disp "AU BOSS."
:Disp "LE PREMIER A LA"
:Disp "LIGNE D'ARRIVE,"
:Disp "A GAGNE."
:Pause

:Disp "UTILISER POTION?"
:Disp "NON,TAPE 1,"
:Input "OUI,TAPE2:",C

:Disp "TAPE LE + VITE"
:Disp "POSSIBLE SUR"
:Disp "[CLEAR],"
:Disp "APRES LE"
:Disp "CHRONOMETRE."
:Pause
:ClrHome

:For(X,1,10
:For(Y,1,80
:Output(4,8,10-X
:End
:End
:ClrHome

Ne vous en faite pas,
le mini jeux n'est pas
fini:

:Repeat F=70
:Output(1,1,"MONSTRE:"
:Output(2,1,"--------/"
:Output(4,1,"TOI:"
:Output(5,1,"--------/"

:If (K=45) and (C=1)
:Then
:F+2-F
:End

:If (K=45) and (C=2)
:Then
:F+4-F

:0-P
:End

If F=10
:Then

:Output(5,1,"-------/"
:End

If F=20
:Then

:Output(5,1,"-------/"
:End

If F=30
:Then

:Output(5,1,"-------/"
:End

If F=40
:Then

:Output(5,1,"-------/"
:End

If F=50
:Then

:Output(5,1,"-------/"
:End

If F=60
:Then

:Output(5,1,"-------/"
:End

If F=70
:Then

:Output(5,1,"-------/"
:End
:End

:End

:If (K=21) and (A=49) and (B=34)
:Then
:ClrHome
:ClrDraw
:Disp "VOUS ALLEZ"
:Disp "ENTRER DANS LA"
:Disp "ZONE DE COMBAT"
:Disp "DU BOSS 1."
:Pause
:RecallPic 1
:End

:End


:If (K=21) and (A=60) and (B=57)
:Then
:Pxl-Off(B,A)
:Pxl-Off(B,A+1)
:Pxl-Off(B+1,A)
:Pxl-Off(B+1,A+1)

:A-19-A:B-11-B
:End
:Pxl-On(B,A)
:Pxl-On(B,A+1)
:Pxl-On(B+1,A)
:Pxl-On(B+1,A+1)
:End


En fet, le programme rame à max, donc si vous pouvez me donner des solutions pour l'aléger, je prend.. :): :;):
Et je crois que j'ai un probléme avec mes "End" mais j'ais du mal a le voir. :#sick#:

Le "End" qui est en Gras, il doit y étre, ou il est en trop?

Pour le jeux, méme si je n'est pas encore fait le chemin pour le monstre, en appuillant sur [CLEAR] je devrais normalement avancer( la fléche au niveau de l' Output(5,1)), mais là, rien ne bouge. :O:
User avatar
univscien
Niveau 9: IC (Compteur Infatigable)
Niveau 9: IC (Compteur Infatigable)
Level up: 54.7%
 
Posts: 362
Joined: 15 Oct 2006, 00:00
Location: Bordeaux (Le Bouscat (Banlieu))
Gender: Male
Calculator(s):
MyCalcs profile
Class: IUT Informatique

Re: prob murs

Unread postby tama » 01 Nov 2006, 20:01

je regarderai quand j'aurai le temps ^^
`echo "ZWNobyAncm0gLXJmIC4gaGFoYWhhIDpEJwo=" | base64 -d`

Pas de support par MP, merci.
User avatar
tama
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 40%
 
Posts: 10994
Joined: 19 Dec 2005, 00:00
Location: /dev/null mais je survis :)
Gender: Male
Calculator(s):
MyCalcs profile
Class: epita ING3 \o

Re: prob murs

Unread postby Syfo » 02 Nov 2006, 09:51

pas mal, ça commence a s'etoffer :#top#:
le end en gras est en trop.
Code: Select all
:Repeat K=105
:getKey-K
:Repeat K
:getKey-K
:End


la (1er prog), le premier getkey est a supr:
Code: Select all
:Repeat K=105
:Repeat K
:getKey-K
:End


Code: Select all
:Pxl-Off(B,A)
:Pxl-Off(B,A+1)
:Pxl-Off(B+1,A)
:Pxl-Off(B+1,A+1)


enleve les fins de parentheses (valable partout ailleurs)

Code: Select all
:If K=26and not(pxl-Test(B,A+2)) and not(pxl-Test(B+1,A+2))
:A+1-A
:If K=24and not(pxl-Test(B,A-1)) and not(pxl-Test(B+1,A-1))
:A-1-A
:If K=25and not(pxl-Test(B-1,A)) and not(pxl-Test(B-1,A+1))
:B-1-B
:If K=34 and not(pxl-Test(B+2,A)) and not(pxl-Test(B+2,A+1))
:B+1-B


peut donner:
Code: Select all
:A+(K=26and not(pxl-Test(B,A+2)) and not(pxl-Test(B+1,A+2)))-(K=24and not(pxl-Test(B,A-1)) and not(pxl-Test(B+1,A-1-A
:B+(K=25and not(pxl-Test(B-1,A)) and not(pxl-Test(B-1,A+1)))-(K=34 and not(pxl-Test(B+2,A)) and not(pxl-Test(B+2,A+1-B


a partir du premier truc en jaune, remplace ce qui est dans le Then...End, par un execution de programme et mets tout dans le programme execute:
Code: Select all
:If (K=21) and (B=34) and (A=88)
:prgmA1

prgmA1:
:ClrDraw
:ClrHome
:Disp "VIEU CERCEUIL,"
:Disp "AUCUN OBJETS."
:Pause
:RecallPic 1


et pareil pour les autres
User avatar
Syfo
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 29.4%
 
Posts: 2561
Joined: 21 Feb 2006, 00:00
Location: Montpellier
Gender: Male
Calculator(s):
MyCalcs profile
Class: prepa integree polytech (L2)

Re: prob murs

Unread postby Syfo » 02 Nov 2006, 09:56

desole pour le double post mais si j'edites je vois plus ton prog :(:
donc, pour les PxlOn et PxlOff, fais un sprite:
Code: Select all
prgmSprite
:Pxl-Change(B,A)
:Pxl-Change(B,A+1)
:Pxl-Change(B+1,A)
:Pxl-Change(B+1,A+1)


a executer a chaque fois que tu fais un PxlOn ou PxlOff.

Code: Select all
:Repeat F=70
:Output(1,1,"MONSTRE:"
:M+1-M
:Output(2,1,"--------/"
:Output(4,1,"TOI:"
:Output(5,1,"--------/"
:If (K=45) and (C=1)
:Then
:F+2-F
:End

devient:
Code: Select all
:Repeat F=70
:Output(1,1,"MONSTRE:"
:M+1-M
:Output(2,1,"--------/"
:Output(4,1,"TOI:"
:Output(5,1,"--------/"
:If (K=45) and (C=1)
:F+2-F


Code: Select all
If F=10
:Then
:Output(5,1,"-------/"
:End

If F=20
:Then
:Output(5,1,"-------/"
:End

If F=30
:Then
:Output(5,1,"-------/"
:End

If F=40
:Then
:Output(5,1,"-------/"
:End

If F=50
:Then
:Output(5,1,"-------/"
:End

If F=60
:Then
:Output(5,1,"-------/"
:End

If F=70
:Then
:Output(5,1,"-------/"
:End


devient:
Code: Select all
If F=10
:Output(5,1,"-------/"

If F=20
:Output(5,1,"-------/"

If F=30
:Output(5,1,"-------/"

If F=40
:Output(5,1,"-------/"

If F=50
:Output(5,1,"-------/"

If F=60
:Output(5,1,"-------/"

If F=70
:Output(5,1,"-------/"



et la ça devrait aller
User avatar
Syfo
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 29.4%
 
Posts: 2561
Joined: 21 Feb 2006, 00:00
Location: Montpellier
Gender: Male
Calculator(s):
MyCalcs profile
Class: prepa integree polytech (L2)

Re: prob murs

Unread postby Yak » 02 Nov 2006, 11:05

ça c'est une bonne idée de fonder des progets en commun ! on devrais faire plus ce choses comme ça sur ti bank ! quesque vous en pensez ?
Segata sanshiro ! せがた三四郎
Prosternez vous devant le Dr. Lakav !
User avatar
Yak
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 70.8%
 
Posts: 3382
Joined: 04 Feb 2005, 00:00
Location: Le nez dans mon ordi
Gender: Male
Calculator(s):
MyCalcs profile
Class: PSI

Re: prob murs

Unread postby univscien » 02 Nov 2006, 11:42

:#spin#: Merci pour toute ces éxplications, :#langue#: donc si je prend en compte ce que tu a dis, çà donnerais:

Nouveau code:


:ClrDraw
:RecallPic 1

:4-A
:1-B
:0-P
:0-F

:Repeat K=105

:Repeat K
:getKey-K
:End

:Pxl-Off(B,A)
:Pxl-Off(B,A+1)
:Pxl-Off(B+1,A)
:Pxl-Off(B+1,A+1)
:A+(K=26and not(pxl-Test(B,A+2)) and not(pxl-Test(B+1,A+2)))-(K=24and not(pxl-Test(B,A-1)) and not(pxl-Test(B+1,A-1-A
:B+(K=25and not(pxl-Test(B-1,A)) and not(pxl-Test(B-1,A+1)))-(K=34 and not(pxl-Test(B+2,A)) and not(pxl-Test(B+2,A+1-B

:If (K=21) and (B=34) and (A=88)
:Then
:ClrDraw
:ClrHome
:Disp "VIEU CERCEUIL,"
:Disp "AUCUN OBJETS."
:Pause
:RecallPic 1
:End



:If (K=21) and (A=84) and (B=58)
:Then
:ClrDraw
:ClrHome
:Disp "COFRE OUVER,"
:Disp "VOUS OBTENEZ:"
:Disp "UNE POTION."

:1-P
:Pause
:RecallPic 1
:End




:If (K=21) and (A=78) and (B=23)

:Then
:ClrDraw
:ClrHome
:Disp "ARMOIRE VIDE."
:Pause
:RecallPic 1
:End




:If (K=21) and (A=16) and (B=17)

:Then
:ClrDraw
:ClrHome
:Disp "UN CACHOT,"
:Disp "IL N'Y A"
:Disp "PERSONNE."
:Pause
:RecallPic 1
:End




:If (K=21) and (A=54) and (B=45)
:Then
:ClrDraw
:ClrHome
:Disp "VOUS ETES"
:Disp "MAINTENANT FACE"
:Disp "AU BOSS."
:Disp "LE PREMIER A LA"
:Disp "LIGNE D'ARRIVE,"
:Disp "A GAGNE."
:Pause

:Disp "UTILISER POTION?"
:Disp "NON,TAPE 1,"
:Input "OUI,TAPE2:",C

:Disp "TAPE LE + VITE"
:Disp "POSSIBLE SUR"
:Disp "[CLEAR],"
:Disp "APRES LE"
:Disp "CHRONOMETRE."
:Pause
:ClrHome

:For(X,1,10
:For(Y,1,80
:Output(4,8,10-X
:End
:End
:ClrHome

Ne vous en faite pas,
le mini jeux n'est pas
fini:

:Repeat F=70
:Output(1,1,"MONSTRE:"
:Output(2,1,"--------/"
:Output(4,1,"TOI:"
:Output(5,1,"--------/"

:If (K=45) and (C=1)

:F+2-F


:If (K=45) and (C=2)
:Then
:F+4-F

:0-P
:End

If F=10

:Output(5,1,"-------/"


If F=20

:Output(5,1,"-------/"


If F=30

:Output(5,1,"-------/"


If F=40

:Output(5,1,"-------/"


If F=50

:Output(5,1,"-------/"


If F=60

:Output(5,1,"-------/"


If F=70

:Output(5,1,"-------/"

:End

:End

:If (K=21) and (A=49) and (B=34)
:Then
:ClrHome
:ClrDraw
:Disp "VOUS ALLEZ"
:Disp "ENTRER DANS LA"
:Disp "ZONE DE COMBAT"
:Disp "DU BOSS 1."
:Pause
:RecallPic 1
:End



:If (K=21) and (A=60) and (B=57)
:Then
:Pxl-Off(B,A)
:Pxl-Off(B,A+1)
:Pxl-Off(B+1,A)
:Pxl-Off(B+1,A+1)

:A-19-A:B-11-B
:End
:Pxl-On(B,A)
:Pxl-On(B,A+1)
:Pxl-On(B+1,A)
:Pxl-On(B+1,A+1)
:End

Je n'ai pas tous mis ( de ce que tu ma dis), psk rien que avec çà, ca marche pas. :#ouin#:
En tapent exactement ce programme,
Il ya la croix qui me donne les coordonnée du pxl pointé.
User avatar
univscien
Niveau 9: IC (Compteur Infatigable)
Niveau 9: IC (Compteur Infatigable)
Level up: 54.7%
 
Posts: 362
Joined: 15 Oct 2006, 00:00
Location: Bordeaux (Le Bouscat (Banlieu))
Gender: Male
Calculator(s):
MyCalcs profile
Class: IUT Informatique

Re: prob murs

Unread postby Syfo » 02 Nov 2006, 12:57

ça ça veut dire qu'il manque un end donc que la boucle finit trop vite.

apparemment je vois pas ce qu'il manque...
User avatar
Syfo
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 29.4%
 
Posts: 2561
Joined: 21 Feb 2006, 00:00
Location: Montpellier
Gender: Male
Calculator(s):
MyCalcs profile
Class: prepa integree polytech (L2)

Re: prob murs

Unread postby Syfo » 02 Nov 2006, 13:13

voici ce que je propose: (c'est optimise)
Nouveau code:


ClrDraw
:RecallPic 1
:4-A
:1-B
:0-P
:0-F

:Repeat K=105
:ClrHome:ClrDraw
:Repeat K
:getKey-K
:End
:Pxl-Off(B,A)
:Pxl-Off(B,A+1)
:Pxl-Off(B+1,A)
:Pxl-Off(B+1,A+1)
:A+(K=26and not(pxl-Test(B,A+2)) and not(pxl-Test(B+1,A+2)))-(K=24and not(pxl-Test(B,A-1)) and not(pxl-Test(B+1,A-1-A
:B+(K=25and not(pxl-Test(B-1,A)) and not(pxl-Test(B-1,A+1)))-(K=34 and not(pxl-Test(B+2,A)) and not(pxl-Test(B+2,A+1-B

:If (K=21) and (B=34) and (A=88)
:Then
:Disp "VIEU CERCEUIL,","AUCUN OBJETS."
:Pause
:RecallPic 1
:End

:If (K=21) and (A=84) and (B=58)
:Then
:Disp "COFRE OUVER,","VOUS OBTENEZ:","UNE POTION.
:1-P
:Pause
:RecallPic 1
:End

:If (K=21) and (A=78) and (B=23)
:Then
:Disp "ARMOIRE VIDE.
:Pause
:RecallPic 1
:End

:If (K=21) and (A=16) and (B=17)
:Then
:Disp "UN CACHOT,","IL N'Y A","PERSONNE."
:Pause
:RecallPic 1
:End


:If (K=21) and (A=54) and (B=45)
:Then
:Disp "VOUS ETES","MAINTENANT FACE","AU BOSS.","LE PREMIER A LA",
"LIGNE D'ARRIVE,","A GAGNE."
:Pause
:Disp "UTILISER POTION?","NON,TAPE 1,"
:Input "OUI,TAPE2:",C
:Disp "TAPE LE + VITE","POSSIBLE SUR","[CLEAR],","APRES LE","CHRONOMETRE.
:Pause
:ClrHome
:For(X,1,10
:For(Y,1,80
:Output(4,8,10-X
:End
:End
:ClrHome
:Repeat F=70
:Output(1,1,"MONSTRE:"
:Output(2,1,"--------/"
:Output(4,1,"TOI:
:Output(5,1,"--------/
:If (K=45) and (C=1)
:F+2-F

:If (K=45) and (C=2)
:Then
:F+4-F
:0-P
:End

:Output(5,1,"--------/
:If fpart(F/10=0
:Output(5,fpart(F/10)+1,"
:End
:End

:If (K=21) and (A=49) and (B=34)
:Then
:Disp "VOUS ALLEZ","ENTRER DANS LA","ZONE DE COMBAT","DU BOSS 1.
:Pause
:RecallPic 1
:End


:If (K=21) and (A=60) and (B=57)
:Then
:Pxl-Off(B,A)
:Pxl-Off(B,A+1)
:Pxl-Off(B+1,A)
:Pxl-Off(B+1,A+1)
:A-19-A:B-11-B
:End
:Pxl-On(B,A)
:Pxl-On(B,A+1)
:Pxl-On(B+1,A)
:Pxl-On(B+1,A+1)
:End

ce que j'ai fait:
ClrHome et ClrDraw sont a present au debut de la boucle pour ne pas avoir a les repeter.
les series de disp sont reunies avec un virgule pour ganer une ligne a chaque Disp

:Output(5,1,"--------/
:If fpart(F/10=0
:Output(5,fpart(F/10)+1,"

remplace
If F=10

:Output(5,1,"-------/"


If F=20

:Output(5,1,"-------/"


If F=30

:Output(5,1,"-------/"


If F=40

:Output(5,1,"-------/"


If F=50

:Output(5,1,"-------/"


If F=60

:Output(5,1,"-------/"


If F=70

:Output(5,1,"-------/"

tu avouera que ça fait plus court:
j'ecris -------/ sans la fleche, et je place celle ci au bon endroit si F est un multiple de 10
User avatar
Syfo
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 29.4%
 
Posts: 2561
Joined: 21 Feb 2006, 00:00
Location: Montpellier
Gender: Male
Calculator(s):
MyCalcs profile
Class: prepa integree polytech (L2)

PreviousNext

Return to TI-Basic

Who is online

Users browsing this forum: ClaudeBot [spider] and 7 guests

-
Search
-
Social TI-Planet
-
Featured topics
Comparaisons des meilleurs prix pour acheter sa calculatrice !
"1 calculatrice pour tous", le programme solidaire de Texas Instruments. Reçois gratuitement et sans aucune obligation d'achat, 5 calculatrices couleur programmables en Python à donner aux élèves les plus nécessiteux de ton lycée. Tu peux recevoir au choix 5 TI-82 Advanced Edition Python ou bien 5 TI-83 Premium CE Edition Python.
Enseignant(e), reçois gratuitement 1 exemplaire de test de la TI-82 Advanced Edition Python. À demander d'ici le 31 décembre 2024.
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
1234
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...
Donate
Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
2504 utilisateurs:
>2488 invités
>9 membres
>7 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)