Forum

Catégorie : Programmes
Forum : Les programmes des internautes
Vues : 260502
Réponses : 1209
Type : discussion
Etat : réponses autorisées

Snake - Page 1 / 25

benjamin le 10/10/2006 à 16:40
Je voulais savoir si qq connaissé un jeu de snake (qui fonctionne) et dont on peut connaitre le code svp.

merci d'avance ! glasses.gif
ratuss le 12/10/2006 à 06:53
Salut, perso je suis en train d'en faire un, et que je trouve plutot reussi pour le moment glasses.gif ... l'avantage c'est qu'il est rapide et ne prend que très peu de place bigmouth.gif (400 octets) .

Je le poste dés que j'ai fini...
benjamin le 12/10/2006 à 15:42
ok c'est cool ça ! bigmouth.gif
merci d'avance ! glasses.gif
Sangohan38 le 13/10/2006 à 20:55
J'en ai fait un, je te le poste dès que je le recopie: il prend 522 octets.
ratuss le 14/10/2006 à 08:21
Un comment ? avec le graph ?
benjamin le 14/10/2006 à 09:46
ok merci beaucoup, mais esqu'il sera compatible avec ma ti 82 stats ou c'est un snake que pour les ti 82 (pas stats) ?

a+ glasses.gif
ratuss le 14/10/2006 à 10:20
Entierement compatbible ti 82 - ti 82 stat clown.gif
Sangohan38 le 14/10/2006 à 11:39
Entièrement compatible avec 82 STATS et 82 je l'ai recopier sur les 2 et ça marche.

Et oui, il utilise le graph.
ratuss le 17/10/2006 à 06:54
Voici le code (pour les stat en francais)

Image manquante


Version 0.5 (600 octets)

Code
EffDessin
0=>Xmin
94=>Xmax
(-)62=>Ymin
0=>Ymax
AxesNAff
FonctNAff
6=>A:8=>B:44=>C:77=>D:1=>E:2=>N:0=>O
1=>dim(Liste6
If .7349=partDéc(Liste6(1:Liste6(1=>O
EffListe Liste4
EffListe Liste5
99=>dim(Liste4
99=>dim(Liste5
For(ø,1,6,1.4
Ligne(88,(-)ent(ø),6,(-)ent(ø)
End
Ligne(6,(-)57,88,(-)57
Ligne(88,(-)56,88,(-)6
Ligne(6,(-)6,6,(-)56
Texte(0,13," SCORE : 3
Texte(0,53," HIGH : ",ent(O
Lbl 5
(-)8-5ent(NbrAléat10=>I
8+5ent(NbrAléat16=>J
If pxl-Test((-)I,J:Goto 5
Ligne(J,I,J+2,I-2
Ligne(J,I-2,J+2,I
Goto 3
Lbl 2
6+50partDéc((A+C)/50=>A
8+80partDéc((B+D)/80=>B
If pxl-Test(A+2,B:Goto 4
Texte(A,B,"º
Lbl 3
arrondi(1+NpartDéc(E/N),0=>E
Texte(Liste4(E),Liste5(E),"[4 espaces]
A=>Liste4(E:B=>Liste5(E
codeTouch(=>K
If K=0:Goto 2
If D=72:Then
If K=24:67=>D
If K=26:77=>D
If 1=abs(K-25:44=>C
Goto 2:End
If C[pas égal à]44:Goto 2
If K=25:39=>C
If K=34:49=>C
If K=25 ou K=34:72=>D
Goto 2
Lbl 4
Texte(A,B,"º
Ligne(B+1,(-)A-3,B+2,(-)A-2
If (-)I[pas égal à]A+2 ou J[pas égal à]B ou N=99:Goto Q
N+1=>N
Texte(0,38,N+1
Goto 5
Lbl Q
If N+1>O:N+1.7349=>Liste6(1
Texte(27,31,"GAME OVER
Pause
EffEcr
Output(2,5,"SNAKE NN
Output(3,3,"VERSION  1.0
Output(5,5,"NOUFNOUF
Output(6,5,"06/10/06




Version 1.0 (1200 octets) : avec des niveaux en +

Code
EffDessin
0=>Xmin
94=>Xmax
(-)62=>Ymin
0=>Ymax
AxesNAff
FonctNAff
16=>A:18=>B:44=>C:77=>D:1=>E:2=>N:0=>O
7=>dim(Liste6
1=>P
Goto S
Lbl R
EffEcr:Disp "BLOQUE
Pause
Lbl S
Menu("NIVEAU","",A,"",B,"",C,"",D,"",E,"",F,"",G
Lbl E
If 39>Liste6(4:Goto R
5=>P:38=>B
For(ø,23,68,5
For(Z,13,16
Ligne(ø,Z-ø,ø+3,Z-ø
End
End
Goto A
Lbl F
If 39>Liste6(5:Goto R
26=>A:6=>P
For(ø,42,45
Ligne(8,20-ø,86,20-ø
Ligne(8,(-)ø,27,(-)ø
Ligne(67,(-)ø,86,(-)ø
Ligne(ø-14,(-)7,ø-14,(-)21
Ligne(ø-14,(-)32,ø-14,(-)57
Ligne(ø+21,(-)32,ø+21,(-)57
Ligne(ø+21,(-)7,ø+21,(-)10
End
Goto A
Lbl G
If 39>Liste6(6:Goto R
6=>A:7=>P
For(ø,1,15
13+5ent(NbrAléat14=>I
5ent(NbrAléat8+3=>J
For(Z,0,3
Ligne(I,Z-J,I+3,Z-J
End
End
Goto A
Lbl C
3=>P
Lbl D
If 39>Liste6(3-ent(P/3:Goto R
For(ø,7,10
For(Z,0,45,45
Ligne(8,(-)ø-Z,41,(-)ø-Z
Ligne(53,(-)ø-Z,86,(-)ø-Z
End
For(Z,1,76,75
Ligne(ø+Z,(-)11,ø+Z,(-)25
Ligne(ø+Z,(-)37,ø+Z,(-)51
End:End
If P=3:Goto A
3=>P
Lbl B
If 39>Liste6(P:Goto S
For(ø,27,35
Ligne(28,(-)ø,66,(-)ø
End
Ligne(32,(-)31,62,(-)31,0
P+1=>P
Lbl A
If .7349=partDéc(Liste6(P:Liste6(P=>O
EffListe Liste4
EffListe Liste5
99=>dim(Liste4
99=>dim(Liste5
For(ø,1,6,1.4
Ligne(88,(-)ent(ø),6,(-)ent(ø)
End
Ligne(6,(-)57,88,(-)57
Ligne(88,(-)56,88,(-)6
Ligne(6,(-)6,6,(-)56
Texte(0,13," SCORE : 3
Texte(0,53," HIGH : ",ent(O
Lbl 5
(-)8-5ent(NbrAléat10=>I
8+5ent(NbrAléat16=>J
If pxl-Test((-)I,J:Goto 5
Ligne(J,I,J+2,I-2
Ligne(J,I-2,J+2,I
Goto 3
Lbl 2
6+50partDéc((A+C)/50=>A
8+80partDéc((B+D)/80=>B
If pxl-Test(A+2,B:Goto 4
Texte(A,B,"º
Lbl 3
arrondi(1+NpartDéc(E/N),0=>E
Texte(Liste4(E),Liste5(E),"[4 espaces]
A=>Liste4(E:B=>Liste5(E
codeTouch(=>K
If K=0:Goto 2
If D=72:Then
If K=24:67=>D
If K=26:77=>D
If 1=abs(K-25:44=>C
Goto 2:End
If C[pas égal à]44:Goto 2
If K=25:39=>C
If K=34:49=>C
If K=25 ou K=34:72=>D
Goto 2
Lbl 4
Texte(A,B,"º
Ligne(B+1,(-)A-3,B+2,(-)A-2
If (-)I[pas égal à]A+2 ou J[pas égal à]B ou N=99:Goto Q
N+1=>N
Texte(0,38,N+1
Goto 5
Lbl Q
If N+1>O:N+1.7349=>Liste6(P
Texte(27,31,"GAME OVER
Pause
EffEcr
Output(2,5,"SNAKE NN
Output(3,3,"VERSION  1.0
Output(5,5,"NOUFNOUF
Output(6,5,"06/10/06


Ps : ø = alpha+3

@+

--- Edit 17 mars 2014 par Linkakro ---

Méfiez-vous du "ent(0", c'est bien la lettre O, pas le nombre zéro 0.

Il faut corriger le Goto S suivant en Goto R. (voir pages 53 et 54) Sinon le second niveau renvoi au menu.
Code
Lbl B
If 39>Liste6(P:Goto S    /// If 39>Liste6(P:Goto R

Il faut ajouter un guillemet sur TI82 (ni stats ni plus) en fin de Text pour que le Lbl 3 puisse fonctionner. (voir pages 55 et 56)
Code
Texte(A,B,"º"  //// guillemet final indispensable sur TI82 non-stat
Lbl 3

EDIT 10/09/2014 : Xmin est dans le menu var+1. J'en ai assez de le répéter dans la fin du sujet.
craminou le 17/10/2006 à 19:08
merci !! bigmouth.gif
benjamin le 17/10/2006 à 20:55
Il a l'air bien mais esque tu peux faire les modifs (français - anglais) pour les ti 82 stats (pas fr bien sûr).
merci d'avance ! glasses.gif
a+
ratuss le 18/10/2006 à 06:41
Oui bien sur beer.gif
titeufbig le 18/10/2006 à 11:22
Pour quand la version anglaisE?
ratuss le 18/10/2006 à 17:19
Euh ben je sais pas, on va dire vendredi si tout se passe bien eyeonly.gif
Sangohan38 le 20/10/2006 à 21:29
C'est vendredi et toujour rien.
PS: Vraiment bien fait ton snake.

@+ Sangohan38 beer.gif
ratuss le 22/10/2006 à 12:53
j'ai pas precisé quel vendredi minied.gif
Sangohan38 le 22/10/2006 à 13:52
Pff tricheur.
T'aurait pu dire quand t'aurais l temps.

Sangohan38
benjamin le 22/10/2006 à 19:44
hum....
nujik le 22/10/2006 à 20:09
heu ... au fait, comment tu sias si un prog de 82 est compatible avec la 83 ou si un un prog de 83 est compatible avec une 82
ratuss le 22/10/2006 à 20:32
Citation
hum....


minied.gif minied.gif minied.gif minied.gif minied.gif

Citation
heu ... au fait, comment tu sias si un prog de 82 est compatible avec la 83 ou si un un prog de 83 est compatible avec une 82


Il y a 2 3 fonctions supplementaires sur une ti 83 : par exemple tu peux utiliser 2 lettres dans un lbl, y a la commande RandInt, les "(" ajoutées à pas mal de fonctions etc etc...

Ps : en general, un programme compatible ti 82 est compatible 83
nujik le 22/10/2006 à 20:38
ok, merci ... a au fait, j'ai retrouver mon cable qui va avec ma calculatrice, tu pourrait me faire un ptit topo sur le p.82 et comment je fais pour pas avoir a recopier les prog a la main (ou si tu as un lien ou c'est expliquer un peu pres bien ? godgrace.gif )
ratuss le 22/10/2006 à 20:42
T'as quoi comme genre de cable et comme genre de calcu ?
nujik le 22/10/2006 à 23:21
Ben la calcu c'est une ti 83+ et le cable, j'en ai aucune idée, tous se que je sais c'est qu'il va dans la culcu et dans l'ordi ^^ ...
ratuss le 23/10/2006 à 06:55
C'est celui ci ??

Image manquante
Sangohan38 le 25/10/2006 à 19:47
OOOOh mon cable !

Tu télécharge Ti connect, tu branche ton cable a ta calcu et ton ordi, tu te débrouille sur Ti connect, tu recherche tes progs qui serons en .83p
Avec Ti graph link 83+ ANGLAIS, tu copie le prog sur Ti graph link 82.
Tu fait sauvegarder et si ça met une erreue tu cherche.

Sangohan38
ratuss le 26/10/2006 à 08:42
Et Nujik, ce serait sympa que tu me dise quel cable t'as, parce que sache qu'avoir un cable ti pc c'est vraiment un precieux avantage (surtout au niveau des jeux).

Si ces modestes sreenshot peuvent te convaincre clown.gif





@+
titeufbig le 29/10/2006 à 12:16
toujours pas de version anglaise
ratuss le 30/10/2006 à 08:49
Lol, bon puisque vous insistez promis je le fais aujourd'hui... minied.gif
ratuss le 30/10/2006 à 16:44
Voila bigmouth.gif (vous avez vu j'ai pas menti clown.gif )

TOUT est la dedans :
http://www.new-uploader.com/?d=CC0066AC




Code
Pour ti 82 stat - 83 et 83+

Version 0.5 (600 octets)

:ClrDraw
:0=>Xmin
:94=>Xmax
:(-)62=>Ymin
:0=>Ymax
:AxesOff
:FnOff
:6=>A:8=>B:44=>C:77=>D:1=>E:2=>N:0=>O
:1=>dim(Liste6
:If .7349=fPart(Liste6(1:Liste6(1=>O
:ClrList Liste4
:ClrList Liste5
:99=>dim(Liste4
:99=>dim(Liste5
:For(ø,1,6,1.4
:Line(88,(-)iPart(ø),6,(-)iPart(ø)
:End
:Line(6,(-)57,88,(-)57
:Line(88,(-)56,88,(-)6
:Line(6,(-)6,6,(-)56
:Text(0,13," SCORE : 3
:Text(0,53," HIGH : ",iPart(O
:Lbl 5
:(-)8-5iPart(rand10=>I
:8+5iPart(rand16=>J
:If pxl-Test((-)I,J:Goto 5
:Line(J,I,J+2,I-2
:Line(J,I-2,J+2,I
:Goto 3
:Lbl 2
:6+50fPart((A+C)/50=>A
:8+80fPart((B+D)/80=>B
:If pxl-Test(A+2,B:Goto 4
:Text(A,B,"º
:Lbl 3
:round(1+NfPart(E/N),0=>E
:Text(Liste4(E),Liste5(E),"[4 espaces]
:A=>Liste4(E:B=>Liste5(E
:getKey=>K
:If K=0:Goto 2
:If D=72:Then
:If K=24:67=>D
:If K=26:77=>D
:If 1=abs(K-25:44=>C
:Goto 2:End
:If C[pas égal à]44:Goto 2
:If K=25:39=>C
:If K=34:49=>C
:If K=25 or K=34:72=>D
:Goto 2
:Lbl 4
:Text(A,B,"º
:Line(B+1,(-)A-3,B+2,(-)A-2
:If (-)I[pas égal à]A+2 or J[pas égal à]B or N=99:Goto Q
:N+1=>N
:Text(0,38,N+1
:Goto 5
:Lbl Q
:If N+1>O:N+1.7349=>Liste6(1
:Text(27,31,"GAME OVER
:Pause
:ClrHome
:Output(2,5,"SNAKE NN
:Output(3,3,"VERSION  0.5
:Output(5,5,"NOUFNOUF
:Output(6,5,"06/10/06



Version 1.0 (1200 octets)

:ClrDraw
:0=>Xmin
:94=>Xmax
:(-)62=>Ymin
:0=>Ymax
:AxesOff
:FnOff
:16=>A:18=>B:44=>C:77=>D:1=>E:2=>N:0=>O:.7349=>V
:7=>dim(Liste6
:1=>P
:Goto S
:Lbl R
:ClrHome:Disp "BLOQUE
:Pause
:Lbl S
:Menu("NIVEAU","",A,"",B,"",C,"",D,"",E,"",F,"",G
:Lbl E
:If 39>Liste6(4) or VøfPart(Liste6(4:Goto R
:5=>P:38=>B
:For(ø,23,68,5
:For(Z,13,16
:Line(ø,Z-ø,ø+3,Z-ø
:End
:End
:Goto A
:Lbl F
:If 39>Liste6(5) or VøfPart(Liste6(5:Goto R
:26=>A:6=>P
:For(ø,42,45
:Line(8,20-ø,86,20-ø
:Line(8,(-)ø,27,(-)ø
:Line(67,(-)ø,86,(-)ø
:Line(ø-14,(-)7,ø-14,(-)21
:Line(ø-14,(-)32,ø-14,(-)57
:Line(ø+21,(-)32,ø+21,(-)57
:Line(ø+21,(-)7,ø+21,(-)10
:End
:Goto A
:Lbl G
:If 39>Liste6(6) or VøfPart(Liste6(6:Goto R
:6=>A:7=>P
:For(ø,1,15
:13+5iPart(rand14=>I
:5iPart(rand8+3=>J
:For(Z,0,3
:Line(I,Z-J,I+3,Z-J
:End
:End
:Goto A
:Lbl C
:3=>P
:Lbl D
:If 39>Liste6(3-iPart(P/3)) ou VøfPart(Liste6(3-iPart(P/3:Goto R
:For(ø,7,10
:For(Z,0,45,45
:Line(8,(-)ø-Z,41,(-)ø-Z
:Line(53,(-)ø-Z,86,(-)ø-Z
:End
:For(Z,1,76,75
:Line(ø+Z,(-)11,ø+Z,(-)25
:Line(ø+Z,(-)37,ø+Z,(-)51
:End:End
:If P=3:Goto A
:3=>P
:Lbl B
:If 39>Liste6(P) or VøfPart(Liste6(P:Goto R
:For(ø,27,35
:Line(28,(-)ø,66,(-)ø
:End
:Line(32,(-)31,62,(-)31,0
:P+1=>P
:Lbl A
:If V=fPart(Liste6(P:Liste6(P=>O
:ClrList Liste4
:ClrList Liste5
:99=>dim(Liste4
:99=>dim(Liste5
:For(ø,1,6,1.4
:Line(88,(-)iPart(ø),6,(-)iPart(ø)
:End
:Line(6,(-)57,88,(-)57
:Line(88,(-)56,88,(-)6
:Line(6,(-)6,6,(-)56
:Text(0,13," SCORE : 3
:Text(0,53," HIGH : ",iPart(O
:Lbl 5
:(-)8-5iPart(rand10=>I
:8+5iPart(rand16=>J
:If pxl-Test((-)I,J:Goto 5
:Line(J,I,J+2,I-2
:Line(J,I-2,J+2,I
:Goto 3
:Lbl 2
:6+50fPart((A+C)/50=>A
:8+80fPart((B+D)/80=>B
:If pxl-Test(A+2,B:Goto 4
:Text(A,B,"º
:Lbl 3
:round(1+NfPart(E/N),0=>E
:Text(Liste4(E),Liste5(E),"[4 espaces]
:A=>Liste4(E:B=>Liste5(E
:getKey=>K
:If K=0:Goto 2
:If D=72:Then
:If K=24:67=>D
:If K=26:77=>D
:If 1=abs(K-25:44=>C
:Goto 2:End
:If C[pas égal à]44:Goto 2
:If K=25:39=>C
:If K=34:49=>C
:If K=25 or K=34:72=>D
:Goto 2
:Lbl 4
:Text(A,B,"º
:Line(B+1,(-)A-3,B+2,(-)A-2
:If (-)I[pas égal à]A+2 or J[pas égal à]B or N=99:Goto Q
:N+1=>N
:Text(0,38,N+1
:Goto 5
:Lbl Q
:If N+1>O:N+1+V=>Liste6(P
:Text(27,31,"GAME OVER
:Pause
:ClrHome
:Output(2,5,"SNAKE NN
:Output(3,3,"VERSION  1.0
:Output(5,5,"NOUFNOUF
:Output(6,5,"06/10/06


Code
Pour les 82 :

Version 0.5 (600 octets)

:ClrDraw
:0=>Xmin
:94=>Xmax
:(-)62=>Ymin
:0=>Ymax
:AxesOff
:FnOff
:6=>A:8=>B:44=>C:77=>D:1=>E:2=>N:0=>O
:1=>dim Liste6
:If .7349=fPart Liste6(1:Liste6(1=>O
:ClrList Liste4
:ClrList Liste5
:99=>dim Liste4
:99=>dim Liste5
:For(ø,1,6,1.4
:Line(88,(-)iPart ø,6,(-)iPart ø
:End
:Line(6,(-)57,88,(-)57
:Line(88,(-)56,88,(-)6
:Line(6,(-)6,6,(-)56
:Text(0,13," SCORE : 3
:Text(0,53," HIGH : ",iPart O
:Lbl 5
:(-)8-5iPart rand10=>I
:8+5iPart rand16=>J
:If pxl-Test((-)I,J:Goto 5
:Line(J,I,J+2,I-2
:Line(J,I-2,J+2,I
:Goto 3
:Lbl 2
:6+50fPart ((A+C)/50=>A
:8+80fPart ((B+D)/80=>B
:If pxl-Test(A+2,B:Goto 4
:Text(A,B,"º
:
:Lbl 3
:round(1+NfPart (E/N),0=>E
:Text(Liste4(E),Liste5(E),"[4 espaces]
:A=>Liste4(E:B=>Liste5(E
:getKey=>K
:If K=0:Goto 2
:If D=72:Then
:If K=24:67=>D
:If K=26:77=>D
:If 1=abs (K-25:44=>C
:Goto 2:End
:If C[pas égal à]44:Goto 2
:If K=25:39=>C
:If K=34:49=>C
:If K=25 or K=34:72=>D
:Goto 2
:Lbl 4
:Text(A,B,"º
:Line(B+1,(-)A-3,B+2,(-)A-2
:If (-)I[pas égal à]A+2 or J[pas égal à]B or N=99:Goto Q
:N+1=>N
:Text(0,38,N+1
:Goto 5
:Lbl Q
:If N+1>O:N+1.7349=>Liste61
:Text(27,31,"GAME OVER
:Pause
:ClrHome
:Output(2,5,"SNAKE NN
:Output(3,3,"VERSION  0.5
:Output(5,5,"NOUFNOUF
:Output(6,5,"06/10/06



Version 1.0 (1200 octets)

:ClrDraw
:0=>Xmin
:94=>Xmax
:(-)62=>Ymin
:0=>Ymax
:AxesOff
:FnOff
:16=>A:18=>B:44=>C:77=>D:1=>E:2=>N:0=>O:.7349=>V
:7=>dim Liste6
:1=>P
:Goto S
:Lbl R
:ClrHome:Disp "BLOQUE
:Pause
:Lbl S
:Menu("NIVEAU","",A,"",B,"",C,"",D,"",E,"",F,"",G
:Lbl E
:If 39>Liste6(4) or VøfPart Liste6(4:Goto R
:5=>P:38=>B
:For(ø,23,68,5
:For(Z,13,16
:Line(ø,Z-ø,ø+3,Z-ø
:End
:End
:Goto A
:Lbl F
:If 39>Liste6(5) or VøfPart Liste6(5:Goto R
:26=>A:6=>P
:For(ø,42,45
:Line(8,20-ø,86,20-ø
:Line(8,(-)ø,27,(-)ø
:Line(67,(-)ø,86,(-)ø
:Line(ø-14,(-)7,ø-14,(-)21
:Line(ø-14,(-)32,ø-14,(-)57
:Line(ø+21,(-)32,ø+21,(-)57
:Line(ø+21,(-)7,ø+21,(-)10
:End
:Goto A
:Lbl G
:If 39>Liste6(6) or VøfPart Liste6(6:Goto R
:6=>A:7=>P
:For(ø,1,15
:13+5iPart rand14=>I
:5iPart rand8+3=>J
:For(Z,0,3
:Line(I,Z-J,I+3,Z-J
:End
:End
:Goto A
:Lbl C
:3=>P
:Lbl D
:If 39>Liste6(3-iPart (P/3)) or VøfPart (Liste6(3-iPart (P/3:Goto R
:For(ø,7,10
:For(Z,0,45,45
:Line(8,(-)ø-Z,41,(-)ø-Z
:Line(53,(-)ø-Z,86,(-)ø-Z
:End
:For(Z,1,76,75
:Line(ø+Z,(-)11,ø+Z,(-)25
:Line(ø+Z,(-)37,ø+Z,(-)51
:End:End
:If P=3:Goto A
:3=>P
:Lbl B
:If 39>Liste6(P) or VøfPart Liste6(P:Goto R
:For(ø,27,35
:Line(28,(-)ø,66,(-)ø
:End
:Line(32,(-)31,62,(-)31,0
:P+1=>P
:Lbl A
:If V=fPart Liste6(P:Liste6(P=>O
:ClrList Liste4
:ClrList Liste5
:99=>dim Liste4
:99=>dim Liste5
:For(ø,1,6,1.4
:Line(88,(-)iPart ø,6,(-)iPart ø
:End
:Line(6,(-)57,88,(-)57
:Line(88,(-)56,88,(-)6
:Line(6,(-)6,6,(-)56
:Text(0,13," SCORE : 3
:Text(0,53," HIGH : ",iPart O
:Lbl 5
:(-)8-5iPart rand10=>I
:8+5iPart rand16=>J
:If pxl-Test((-)I,J:Goto 5
:Line(J,I,J+2,I-2
:Line(J,I-2,J+2,I
:Goto 3
:Lbl 2
:6+50fPart ((A+C)/50=>A
:8+80fPart ((B+D)/80=>B
:If pxl-Test(A+2,B:Goto 4
:Text(A,B,"º
:
:Lbl 3
:round(1+NfPart (E/N),0=>E
:Text(Liste4(E),Liste5(E),"[4 espaces]
:A=>Liste4(E:B=>Liste5(E
:getKey=>K
:If K=0:Goto 2
:If D=72:Then
:If K=24:67=>D
:If K=26:77=>D
:If 1=abs (K-25:44=>C
:Goto 2:End
:If C[pas égal à]44:Goto 2
:If K=25:39=>C
:If K=34:49=>C
:If K=25 or K=34:72=>D
:Goto 2
:Lbl 4
:Text(A,B,"º
:Line(B+1,(-)A-3,B+2,(-)A-2
:If (-)I[pas égal à]A+2 or J[pas égal à]B or N=99:Goto Q
:N+1=>N
:Text(0,38,N+1
:Goto 5
:Lbl Q
:If N+1>O:N+1+V=>Liste6(P
:Text(27,31,"GAME OVER
:Pause
:ClrHome
:Output(2,5,"SNAKE NN
:Output(3,3,"VERSION  1.0
:Output(5,5,"NOUFNOUF
:Output(6,5,"06/10/06
Wolves le 30/10/2006 à 19:37
Bon moi je vais essayé de faire un snake avec 100 niveau c'est un defi que on sait lancé au lycée alors si quelqu'un peu m'aider se serai sympa par contre question memoire je pense que sa va etre chaut
ratuss le 31/10/2006 à 10:10
Citation
par contre question memoire je pense que sa va etre chaut


A priori non, faut juste avoir bcp d'imagination lol...
morstelder le 02/11/2006 à 17:31
Beua code mais le probleme c'est que le snake ne se supprime pas (il s'alongit mais se deplace pas)
Pour les 100 niveau avec de la memoire (sisi) fait le sur le graph , fait un dessin (stylo et ptchange) et met dans ton prog des rappelimg avec une variable qui prend le score en compte :
Code

niveau=>1
while 1
if score>100
then
niveau+1=>niveau
/*+++ tres gros if avec pour chaque valeur de niveau un rappel image*/

Donc bcp de niveau==bcp de ram godgrace.gif
Sangohan38 le 02/11/2006 à 19:35
Rien compris. godgrace.gif
Si tu veu pas qu'il s'efface, j'ai déja fait ce snake.

Sangohan38
ratuss le 03/11/2006 à 11:36
1 image =700 octet
100 image = 70 ko


vaut mieux faire avec des ligne( si tu veux mon avis ...
Sangohan38 le 03/11/2006 à 14:27
De plus, la 82 ne peut avoir que 6 images.

Sangohan38
ratuss le 03/11/2006 à 15:19
oui et la ti 82 stat n'en possede 10 en stock alors les 100 levels merci bien lol crazy.gif
Wolves le 03/11/2006 à 16:27
je n'en sais rien moi
Sangohan38 le 03/11/2006 à 16:32
Ba cherche, le brouillon est un bon ami...

Sangohan38
ratuss le 05/11/2006 à 20:05
Tu fais avec des ligne( c'est le + simple logiquement...

@+
FulliZing le 09/11/2006 à 15:18
désolé mais pour le code snake, la calculette me dit "erreur:domaine" à la ligne

Code
EffDessin
0=>Xmin
94=>Xmax
(-)62=>Ymin
0=>Ymax
AxesNAff
FonctNAff
6=>A:8=>B:44=>C:77=>D:1=>E:2=>N:0=>O
1=>dim(Liste6
If .7349=partDéc(Liste6(1:Liste6(1=>O
EffListe Liste4
EffListe Liste5
99=>dim(Liste4
99=>dim(Liste5
For(ø,1,6,1.4
Ligne(88,(-)ent(ø),6,(-)ent(ø)
End
Ligne(6,(-)57,88,(-)57
Ligne(88,(-)56,88,(-)6
Ligne(6,(-)6,6,(-)56
Texte(0,13," SCORE : 3
Texte(0,53," HIGH : ",ent(O
Lbl 5
(-)8-5ent(NbrAléat10=>I
8+5ent(NbrAléat16=>J
If pxl-Test((-)I,J:Goto 5
Ligne(J,I,J+2,I-2
Ligne(J,I-2,J+2,I
Goto 3
Lbl 2
6+50partDéc((A+C)/50=>A
8+80partDéc((B+D)/80=>B
[couleur=#FF0000]If pxl-Test(A+2,B[là]:Goto 4 [b]<=== ICI [/b][/couleur]
Texte(A,B,"º
Lbl 3
arrondi(1+NpartDéc(E/N),0=>E
Texte(Liste4(E),Liste5(E),"
A=>Liste4(E:B=>Liste5(E
codeTouch(=>K
If K=0:Goto 2
If D=72:Then
If K=24:67=>D
If K=26:77=>D
If 1=abs(K-25:44=>C
Goto 2:End
If C[pas égal à]44:Goto 2
If K=25:39=>C
If K=34:49=>C
If K=25 ou K=34:72=>D
Goto 2
Lbl 4
Texte(A,B,"º
Ligne(B+1,(-)A-3,B+2,(-)A-2
If (-)I[pas égal à]A+2 ou J[pas égal à]B ou N=99:Goto Q
N+1=>N
Texte(0,38,N+1
Goto 5
Lbl Q
If N+1>O:N+1.7349=>Liste6(1
Texte(27,31,"GAME OVER
Pause
EffEcr
Output(2,5,"SNAKE NN
Output(3,3,"VERSION  1.0
Output(5,5,"NOUFNOUF
Output(6,5,"06/10/06
ratuss le 10/11/2006 à 06:36
Oups, t'as raison j'ai peu etre fait une erreure, faudra que je verifie, en attendant pour ta ligne c'est :
If pxl-Test(A+2),B:Goto 4
FulliZing le 10/11/2006 à 15:59
bin maintenant il me dit "erreur:argument" sur la parenthèse que j'ai rajouté cry.gif
ratuss le 10/11/2006 à 17:17
Sucze moi je dis n'importe quoi, en fait c'étais bien
If pxl-Test(A+2,B:Goto 4

T'as sans doute du faire une faute qq part eyeonly.gif minied.gif
Sangohan38 le 10/11/2006 à 20:01
Ton Pxl-Test, tu le met pas dans une variable?
Parceque sinon, ça as pas de sens:

Code
Si on teste le point en (A+2,B) on va au Goto 4


Ceci est la traduction de ce que tu met.

Sangohan38
ratuss le 10/11/2006 à 21:06
erreur domaine => c'est la valeur de A ou B qui cloche

Et puis sache que :

If 0 => NON
et
If 1 => OUI happy.gif

ca marche, essayes tu vas voir

@+
FulliZing le 11/11/2006 à 16:47
bon je vais aller verifier le code, qui est très long...
FulliZing le 11/11/2006 à 17:01
une autre question :
Code
EffDessin
0=>Xmin
94=>Xmax
(-)62=>Ymin
0=>Ymax
AxesNAff
FonctNAff
6=>A:8=>B:44=>C:77=>D:1=>E:2=>N:0=>O
1=>dim(Liste6
If .7349=partDéc(Liste6(1:Liste6(1=>O
EffListe Liste4
EffListe Liste5
99=>dim(Liste4
99=>dim(Liste5
For(ø,1,6,1.4
Ligne(88,(-)ent(ø),6,(-)ent(ø)
End
Ligne(6,(-)57,88,(-)57
Ligne(88,(-)56,88,(-)6
Ligne(6,(-)6,6,(-)56
Texte(0,13," SCORE :[là] 3 <== il faut mettre "Goto 3" ou c'est bon là?
Texte(0,53," HIGH : ",ent(O
Lbl 5
(-)8-5ent(NbrAléat10=>I
8+5ent(NbrAléat16=>J
If pxl-Test((-)I,J:Goto 5
Ligne(J,I,J+2,I-2
Ligne(J,I-2,J+2,I
Goto 3
Lbl 2
6+50partDéc((A+C)/50=>A
8+80partDéc((B+D)/80=>B
If pxl-Test(A+2,B[là]:Goto 4
Texte(A,B,"º
Lbl 3
arrondi(1+NpartDéc(E/N),0=>E
Texte(Liste4(E),Liste5(E),"
A=>Liste4(E:B=>Liste5(E
codeTouch(=>K
If K=0:Goto 2
If D=72:Then
If K=24:67=>D
If K=26:77=>D
If 1=abs(K-25:44=>C
Goto 2:End
If C[pas égal à]44:Goto 2
If K=25:39=>C
If K=34:49=>C
If K=25 ou K=34:72=>D
Goto 2
Lbl 4
Texte(A,B,"º
Ligne(B+1,(-)A-3,B+2,(-)A-2
If (-)I[pas égal à]A+2 ou J[pas égal à]B ou N=99:Goto Q
N+1=>N
Texte(0,38,N+1
Goto 5
Lbl Q
If N+1>O:N+1.7349=>Liste6(1
Texte(27,31,"GAME OVER
Pause
EffEcr
Output(2,5,"SNAKE NN
Output(3,3,"VERSION  1.0
Output(5,5,"NOUFNOUF
Output(6,5,"06/10/06

EDIT : Le jeu fonctionne mais dès que j'ai pris 2 "souris", cela affiche "GAME OVER" crazy.gif
ratuss le 12/11/2006 à 08:44
Code
Lbl 5
(-)8-5ent(NbrAléat10=>I
8+5ent(NbrAléat16=>J
If pxl-Test((-)I,J:Goto 5
Ligne(J,I,J+2,I-2
Ligne(J,I-2,J+2,I
Goto 3
...
Lbl 4
Texte(A,B,"º
Ligne(B+1,(-)A-3,B+2,(-)A-2
If (-)I[pas égal à]A+2 ou J[pas égal à]B ou N=99:Goto Q
N+1=>N
Texte(0,38,N+1
Goto 5


Verifie ca pour voir kiss.gif minied.gif
FulliZing le 15/11/2006 à 05:41
c'est bon le jeu fonctione mais le serpent ne disparait pas crazy.gif
et je ne sait comment on fait pour le faire disparaitre au fur et a mesure
please help me
merci
unknow le 15/11/2006 à 16:15
moi aussi sur le programme de sango, le serpend ne s'efface pas apres son passage.
en plus, il faut que je maintienne la touche du bas appuyée pour qu'il descende sinon ca m'affiche: Game Over