Vous n'êtes pas identifié.
DÉVELOPPEMENT TERMINÉ !
SCREENSHOTS
PROG ET SOURCES
http://www.casiocalc.org/?to=fsdisplay. … hip-battle
Dernière modification par phcorp (14 Jul 2007 14:12:40)
Hors ligne
Salut,
Ca fait plaisir de voir un nouveau programme pour G100.
Le principe du jeu est bon, mais je pense que la jouabilitée peux être amélioré en optimisant ton code.
Ca serait bien que tu mettes en ligne tes sources afin de voir ce qui peut être amélioré.
Il ne faut pas avoir peur des critiques elles peuvent être que bénéfiques pour toi. C’est important de partir sur de bonnes bases.
D’autre part, maintenant que tu as compris les « grandes lignes » de la G100, il faut comprendre certaines astuces de programmation (qui sont simples mais incontournable) :
Si t’est en vacances, tu peux faire un autre programme du même principe en utiliser la lib 5 couleurs avec Sprite maker (pour faire des sprites) et la lib mem_zone pour mettre ces sprites dans une autre zone de la RAM que le code exécutable a fin d’alléger ton fichier exe.
Une fois que tu auras fait ça, je pense que pas grand chose ne pourra t’arrêter sur la G100.
Hors ligne
oki
bon mes sources sont dégueulasses ^^
alors déjà :
le splashscreen est assez impressionnant ( codé par une page php qui a transformé l'image en sprite );
le code est mal foutu, mea culpa, énorme bordel
je n'ai utilisé que des fonctions basiques mais ça fonctionne...
allez hop, voilà le code :
#include <casio2.h> #include <mkeys.h> char splashscreen[][63][127] = { 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 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1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0 } }; //fonction splashscreen------------------------------------ void drawsplashscreen(unsigned char inix, unsigned char iniy, unsigned char nb){ int X, Y; for(Y=0;Y<63;Y++){ for(X=0;X<127;X++){ if(splashscreen[nb][Y][X]==1) setPix(inix + X, iniy + Y, 0, 1); }} } //--------------------------------------------------------- //fonction mouvement de la mer----------------------------- void drawsea(int i){ int c; int X, Y; for(c=0;c<128;c=c+4){ for(Y=0;Y<4;Y++){ for(X=0;X<4;X++){ if(sea[i][Y][X]==1) setPix(X+c, Y+30, 0, 1); }}} } //--------------------------------------------------------- //fonction mouvement du bateau----------------------------- void drawship(unsigned char inix, unsigned char nb){ int X, Y; for(Y=0;Y<6;Y++){ for(X=0;X<16;X++){ if(ship[nb][Y][X]==1) setPix(inix + X, Y+28, 0, 1); if(ship[nb][Y][X]==0) setPix(inix + X, Y+28, 0, 0); }} } //--------------------------------------------------------- //fonction mouvement des avions---------------------------- void drawjet(unsigned char inix, unsigned char iniy, unsigned char nb){ int X, Y; for(Y=0;Y<6;Y++){ for(X=0;X<16;X++){ if(jet[nb][Y][X]==1) setPix(inix + X, iniy + Y, 0, 1); if(jet[nb][Y][X]==0) setPix(inix + X, iniy + Y, 0, 0); }} } //--------------------------------------------------------- //fonction mouvement des sous-marins----------------------- void drawsub(unsigned char inix, unsigned char iniy, unsigned char nb){ int X, Y; for(Y=0;Y<6;Y++){ for(X=0;X<16;X++){ if(submarine[nb][Y][X]==1) setPix(inix + X, iniy + Y, 0, 1); if(submarine[nb][Y][X]==0) setPix(inix + X, iniy + Y, 0, 0); }} } //--------------------------------------------------------- //fonction jeuxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx int game(void){ //score int score = 0; //vitesse int vitesse = 20; //variable qui sert pour le mouvement de la mer (bahh numéro du sprite ) int countsea = 0; //variable qui sert pour la boucle principale du jeu int boucle = 0; //la position du bateau et son orientation int posx = 55, cote = 0; //la position du projectile mer/air et sa direction int ballx = 200, bally = 200, coteball; //la position du projectile mer/abysse int dropx = 200, dropy = 200; //la position des ennemis int sub1x, sub1y, sub2x, sub2y, jet1x, jet1y, jet2x, jet2y; //orientation des ennemis int sub1pos, sub2pos, jet1pos, jet2pos; //affichege ou non int sub1disp, sub2disp, jet1disp, jet2disp; //projectiles ennemis int ball1x = 200, ball1y = 200, ball2x = 200, ball2y = 200, ball3x = 200, ball3y = 200, ball4x = 200, ball4y = 200; sub1pos = 1; sub1x = 128 + 8; sub1y = 35 + 8; sub1disp = 1; sub2pos = 0; sub2x = 0 - 22; sub2y = 35 + 16; sub2disp = 1; jet1pos = 1; jet1x = 128 + 22; jet1y = 14; jet1disp = 1; jet2pos = 0; jet2x = 0 - 8; jet2y = 7; jet2disp = 1; while(boucle!=1){ clrscr(); // efface l’ecran //mouvement de la mer-------------------------------------- drawsea(countsea); countsea++; if(countsea>3){ countsea = 0; } //--------------------------------------------------------- //mouvement des ennemis------------------------------------ if(sub1pos==0){ sub1x++; if(sub1x>128){ sub1pos = 1; sub1x = 128 + 8; sub1disp = 1; } }else{ sub1x--; if(sub1x<-8){ sub1pos = 0; sub1x = 0 - 8; sub1disp = 1; } } if(sub2pos==0){ sub2x++; if(sub2x>128){ sub2pos = 1; sub2x = 128 + 22; sub2disp = 1; } }else{ sub2x--; if(sub2x<-8){ sub2pos = 0; sub2x = 0 - 22; sub2disp = 1; } } if(jet1pos==0){ jet1x++; if(jet1x>128){ jet1pos = 1; jet1x = 128 + 22; jet1disp = 1; } }else{ jet1x--; if(jet1x<-8){ jet1pos = 0; jet1x = 0 - 22; jet1disp = 1; } } if(jet2pos==0){ jet2x++; if(jet2x>128){ jet2pos = 1; jet2x = 128 + 8; jet2disp = 1; } }else{ jet2x--; if(jet2x<-8){ jet2pos = 0; jet2x = 0 - 8; jet2disp = 1; } } if (jet1disp==1) drawjet(jet1x, jet1y, jet1pos); if (jet2disp==1) drawjet(jet2x, jet2y, jet2pos); if (sub1disp==1) drawsub(sub1x, sub1y, sub1pos); if (sub2disp==1) drawsub(sub2x, sub2y, sub2pos); //colision projectile/avion................................ if((ballx>=jet1x) && (ballx<(jet1x+16)) && (bally>=jet1y) && (bally<(jet1y+6))){ jet1disp=0; score++; ballx=200; bally=200; } if((ballx>=jet2x) && (ballx<(jet2x+16)) && (bally>=jet2y) && (bally<(jet2y+6))){ jet2disp=0; score++; ballx=200; bally=200; } if((jet1x==posx) && (ball1x==200) && (jet1disp==1)){ball1x=jet1x+8;ball1y=jet1y+4;} if((jet2x==posx) && (ball2x==200) && (jet2disp==1)){ball2x=jet2x+8;ball2y=jet2y+4;} if((sub1x==posx) && (ball3x==200) && (sub1disp==1)){ball3x=sub1x+8;ball3y=sub1y+4;} if((sub2x==posx) && (ball4x==200) && (sub2disp==1)){ball4x=sub2x+8;ball4y=sub2y+4;} ball1y++; ball2y++; ball3y--; ball4y--; if(ball1y>64){ball1x=200;} if(ball2y>64){ball2x=200;} if(ball3y<0){ball3x=200;} if(ball4y<0){ball4x=200;} setPix(ball1x, ball1y, 0, 1); setPix(ball1x+1, ball1y, 0, 1); setPix(ball1x, ball1y+1, 0, 1); setPix(ball1x+1, ball1y+1, 0, 1); setPix(ball2x, ball2y, 0, 1); setPix(ball2x+1, ball2y, 0, 1); setPix(ball2x, ball2y+1, 0, 1); setPix(ball2x+1, ball2y+1, 0, 1); setPix(ball3x, ball3y, 0, 1); setPix(ball3x+1, ball3y, 0, 1); setPix(ball3x, ball3y+1, 0, 1); setPix(ball3x+1, ball3y+1, 0, 1); setPix(ball4x, ball4y, 0, 1); setPix(ball4x+1, ball4y, 0, 1); setPix(ball4x, ball4y+1, 0, 1); setPix(ball4x+1, ball4y+1, 0, 1); if((ball1x>=posx) && (ball1x<(posx+16)) && (ball1y>=28) && (ball1y<(28+6))){ boucle=1; } if((ball2x>=posx) && (ball2x<(posx+16)) && (ball2y>=28) && (ball2y<(28+6))){ boucle=1; } if((ball3x>=posx) && (ball3x<(posx+16)) && (ball3y>=28) && (ball3y<(28+6))){ boucle=1; } if((ball4x>=posx) && (ball4x<(posx+16)) && (ball4y>=28) && (ball4y<(28+6))){ boucle=1; } //......................................................... //colision projectile/sousmarin............................ if((dropx>=sub1x) && (dropx<(sub1x+16)) && (dropy>=sub1y) && (dropy<(sub1y+6))){ sub1disp=0; score++; dropx=200; dropy=200; } if((dropx>=sub2x) && (dropx<(sub2x+16)) && (dropy>=sub2y) && (dropy<(sub2y+6))){ sub2disp=0; score++; dropx=200; dropy=200; } //......................................................... //--------------------------------------------------------- //mouvement du bateau-------------------------------------- drawship(posx,cote); if(thetouche(9,1)==1){ posx--; cote = 1; } if(thetouche(9,4)==1){ posx++; cote = 0; } if(thetouche(7,4)==1){ boucle=1; } //--------------------------------------------------------- //mouvement du projectile mer/air-------------------------- if(coteball==0) ballx++; if(coteball==1) ballx--; bally--; if( (thetouche(1,5)==1) && (ballx>128) ){ ballx = posx+8; bally = 28; if(cote==0) coteball=0; if(cote==1) coteball=1; } if(bally<0){ coteball=0; ballx=200; } if(bally>64){ coteball=0; ballx=200; } //affichage setPix(ballx, bally, 0, 1); setPix(ballx+1, bally, 0, 1); setPix(ballx, bally+1, 0, 1); setPix(ballx+1, bally+1, 0, 1); //--------------------------------------------------------- //mouvement du projectile mer/abysse----------------------- dropy++; if( (thetouche(1,4)==1) && (dropy>64) ){ dropy = 33; dropx = posx+8; } if(dropy>64) dropx = 200; //affichage setPix(dropx, dropy, 0, 1); setPix(dropx+1, dropy, 0, 1); setPix(dropx, dropy+1, 0, 1); setPix(dropx+1, dropy+1, 0, 1); //--------------------------------------------------------- //réglage de la vitesse------------------------------------ if(thetouche(2,4)==1) vitesse--; if(thetouche(2,5)==1) vitesse++; if(vitesse<1) vitesse=1; if(vitesse>50) vitesse=50; //--------------------------------------------------------- wait(vitesse); } return(score); } //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx int main(void){ int score = 0; clrscr(); // efface l’ecran drawsplashscreen(0,0,0); // affiche le splashscreen selon les coordonnées getch(); // attend la pression de n’importe quelle touche clrscr(); // efface l’ecran score = game(); clrscr(); // efface l’ecran gotoxy(1,2); printf("Score:"); gotoxy(1,3); printf("%d", score); wait(200); getch(); // attend la pression de n’importe quelle touche return(0) ;} // quitte le programme, retour au menu de la calculatrice
je vais encore l'améliorer en ajoutant des effets d'explosion et peut-être autre chose suivants vos conseils. bon je sais ce code est pourri mais arrêter de regarder ce message avec cette tête là ! lol
phcorp
Dernière modification par phcorp (26 Jun 2007 07:19:34)
Hors ligne
quelques bugs remarqués :
les projectiles ne disparaissent pas bien
il faudrait commencer par afficher avant les calculs
source modifiée :
#include <casio2.h> #include <mkeys.h> char splashscreen[][63][127] = { 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 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, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0 } }; char submarine[2][6][16] = { { 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0 } }; //fonction splashscreen------------------------------------ void drawsplashscreen(unsigned char inix, unsigned char iniy, unsigned char nb){ int X, Y; for(Y=0;Y<63;Y++){ for(X=0;X<127;X++){ if(splashscreen[nb][Y][X]==1) setPix(inix + X, iniy + Y, 0, 1); }} } //--------------------------------------------------------- //fonction mouvement de la mer----------------------------- void drawsea(int i){ int c; int X, Y; for(c=0;c<128;c=c+4){ for(Y=0;Y<4;Y++){ for(X=0;X<4;X++){ if(sea[i][Y][X]==1) setPix(X+c, Y+30, 0, 1); }}} } //--------------------------------------------------------- //fonction mouvement du bateau----------------------------- void drawship(unsigned char inix, unsigned char nb){ int X, Y; for(Y=0;Y<6;Y++){ for(X=0;X<16;X++){ if(ship[nb][Y][X]==1) setPix(inix + X, Y+28, 0, 1); if(ship[nb][Y][X]==0) setPix(inix + X, Y+28, 0, 0); }} } //--------------------------------------------------------- //fonction mouvement des avions---------------------------- void drawjet(unsigned char inix, unsigned char iniy, unsigned char nb){ int X, Y; for(Y=0;Y<6;Y++){ for(X=0;X<16;X++){ if(jet[nb][Y][X]==1) setPix(inix + X, iniy + Y, 0, 1); if(jet[nb][Y][X]==0) setPix(inix + X, iniy + Y, 0, 0); }} } //--------------------------------------------------------- //fonction mouvement des sous-marins----------------------- void drawsub(unsigned char inix, unsigned char iniy, unsigned char nb){ int X, Y; for(Y=0;Y<6;Y++){ for(X=0;X<16;X++){ if(submarine[nb][Y][X]==1) setPix(inix + X, iniy + Y, 0, 1); if(submarine[nb][Y][X]==0) setPix(inix + X, iniy + Y, 0, 0); }} } //--------------------------------------------------------- //fonction jeuxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx int game(void){ //score int score = 0; //vitesse int vitesse = 20; //variable qui sert pour le mouvement de la mer int countsea = 0; //variable qui sert pour la boucle principale du jeu int boucle = 0; //la position du bateau et son orientation int posx = 55, cote = 0; //la position du projectile mer/air et sa direction int ballx = 200, bally = 200, coteball; //la position du projectile mer/abysse int dropx = 200, dropy = 200; //la position des ennemis int sub1x, sub1y, sub2x, sub2y, jet1x, jet1y, jet2x, jet2y; //orientation des ennemis int sub1pos, sub2pos, jet1pos, jet2pos; //affichege ou non int sub1disp, sub2disp, jet1disp, jet2disp; //projectiles ennemis int ball1x = 200, ball1y = 200, ball2x = 200, ball2y = 200, ball3x = 200, ball3y = 200, ball4x = 200, ball4y = 200; sub1pos = 1; sub1x = 128 + 8; sub1y = 35 + 8; sub1disp = 1; sub2pos = 0; sub2x = 0 - 22; sub2y = 35 + 16; sub2disp = 1; jet1pos = 1; jet1x = 128 + 22; jet1y = 14; jet1disp = 1; jet2pos = 0; jet2x = 0 - 8; jet2y = 7; jet2disp = 1; while(boucle!=1){ clrscr(); // efface l’ecran //mouvement de la mer-------------------------------------- drawsea(countsea); countsea++; if(countsea>3){ countsea = 0; } //--------------------------------------------------------- //affichage global----------------------------------------- if (jet1disp==1) drawjet(jet1x, jet1y, jet1pos); if (jet2disp==1) drawjet(jet2x, jet2y, jet2pos); if (sub1disp==1) drawsub(sub1x, sub1y, sub1pos); if (sub2disp==1) drawsub(sub2x, sub2y, sub2pos); setPix(ball1x, ball1y, 0, 1); setPix(ball1x+1, ball1y, 0, 1); setPix(ball1x, ball1y+1, 0, 1); setPix(ball1x+1, ball1y+1, 0, 1); setPix(ball2x, ball2y, 0, 1); setPix(ball2x+1, ball2y, 0, 1); setPix(ball2x, ball2y+1, 0, 1); setPix(ball2x+1, ball2y+1, 0, 1); setPix(ball3x, ball3y, 0, 1); setPix(ball3x+1, ball3y, 0, 1); setPix(ball3x, ball3y+1, 0, 1); setPix(ball3x+1, ball3y+1, 0, 1); setPix(ball4x, ball4y, 0, 1); setPix(ball4x+1, ball4y, 0, 1); setPix(ball4x, ball4y+1, 0, 1); setPix(ball4x+1, ball4y+1, 0, 1); setPix(ballx, bally, 0, 1); setPix(ballx+1, bally, 0, 1); setPix(ballx, bally+1, 0, 1); setPix(ballx+1, bally+1, 0, 1); drawship(posx,cote); //--------------------------------------------------------- //mouvement des ennemis------------------------------------ if(sub1pos==0){ sub1x++; if(sub1x>128){ sub1pos = 1; sub1x = 128 + 8; sub1disp = 1; } }else{ sub1x--; if(sub1x<-8){ sub1pos = 0; sub1x = 0 - 8; sub1disp = 1; } } if(sub2pos==0){ sub2x++; if(sub2x>128){ sub2pos = 1; sub2x = 128 + 22; sub2disp = 1; } }else{ sub2x--; if(sub2x<-8){ sub2pos = 0; sub2x = 0 - 22; sub2disp = 1; } } if(jet1pos==0){ jet1x++; if(jet1x>128){ jet1pos = 1; jet1x = 128 + 22; jet1disp = 1; } }else{ jet1x--; if(jet1x<-8){ jet1pos = 0; jet1x = 0 - 22; jet1disp = 1; } } if(jet2pos==0){ jet2x++; if(jet2x>128){ jet2pos = 1; jet2x = 128 + 8; jet2disp = 1; } }else{ jet2x--; if(jet2x<-8){ jet2pos = 0; jet2x = 0 - 8; jet2disp = 1; } } //colision projectile/avion................................ if((ballx>=jet1x) && (ballx<(jet1x+16)) && (bally>=jet1y) && (bally<(jet1y+6))){ jet1disp=0; score++; ballx=200; bally=200; } if((ballx>=jet2x) && (ballx<(jet2x+16)) && (bally>=jet2y) && (bally<(jet2y+6))){ jet2disp=0; score++; ballx=200; bally=200; } if((jet1x==posx) && (ball1x==200) && (jet1disp==1)){ball1x=jet1x+8;ball1y=jet1y+4;} if((jet2x==posx) && (ball2x==200) && (jet2disp==1)){ball2x=jet2x+8;ball2y=jet2y+4;} if((sub1x==posx) && (ball3x==200) && (sub1disp==1)){ball3x=sub1x+8;ball3y=sub1y+4;} if((sub2x==posx) && (ball4x==200) && (sub2disp==1)){ball4x=sub2x+8;ball4y=sub2y+4;} ball1y++; ball2y++; ball3y--; ball4y--; if(ball1y>64){ball1x=200;} if(ball2y>64){ball2x=200;} if(ball3y<0){ball3x=200;} if(ball4y<0){ball4x=200;} if((ball1x>=posx) && (ball1x<(posx+16)) && (ball1y>=28) && (ball1y<(28+6))){ boucle=1; } if((ball2x>=posx) && (ball2x<(posx+16)) && (ball2y>=28) && (ball2y<(28+6))){ boucle=1; } if((ball3x>=posx) && (ball3x<(posx+16)) && (ball3y>=28) && (ball3y<(28+6))){ boucle=1; } if((ball4x>=posx) && (ball4x<(posx+16)) && (ball4y>=28) && (ball4y<(28+6))){ boucle=1; } //......................................................... //colision projectile/sousmarin............................ if((dropx>=sub1x) && (dropx<(sub1x+16)) && (dropy>=sub1y) && (dropy<(sub1y+6))){ sub1disp=0; score++; dropx=200; dropy=200; } if((dropx>=sub2x) && (dropx<(sub2x+16)) && (dropy>=sub2y) && (dropy<(sub2y+6))){ sub2disp=0; score++; dropx=200; dropy=200; } //......................................................... //--------------------------------------------------------- //mouvement du bateau-------------------------------------- if(thetouche(9,1)==1){ posx--; cote = 1; } if(thetouche(9,4)==1){ posx++; cote = 0; } if(thetouche(7,4)==1){ boucle=1; } //--------------------------------------------------------- //mouvement du projectile mer/air-------------------------- if(coteball==0) ballx++; if(coteball==1) ballx--; bally--; if( (thetouche(1,5)==1) && (ballx>128) ){ ballx = posx+8; bally = 28; if(cote==0) coteball=0; if(cote==1) coteball=1; } if(bally<0){ coteball=0; ballx=200; } if(bally>64){ coteball=0; ballx=200; } //--------------------------------------------------------- //mouvement du projectile mer/abysse----------------------- dropy++; if( (thetouche(1,4)==1) && (dropy>64) ){ dropy = 33; dropx = posx+8; } if(dropy>64) dropx = 200; //affichage setPix(dropx, dropy, 0, 1); setPix(dropx+1, dropy, 0, 1); setPix(dropx, dropy+1, 0, 1); setPix(dropx+1, dropy+1, 0, 1); //--------------------------------------------------------- //réglage de la vitesse------------------------------------ if(thetouche(2,4)==1) vitesse--; if(thetouche(2,5)==1) vitesse++; if(vitesse<1) vitesse=1; if(vitesse>50) vitesse=50; //--------------------------------------------------------- wait(vitesse); } return(score); } //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx int main(void){ int score = 0; clrscr(); // efface l’ecran drawsplashscreen(0,0,0); // affiche le splashscreen selon les coordonnées getch(); // attend la pression de n’importe quelle touche clrscr(); // efface l’ecran score = game(); clrscr(); // efface l’ecran gotoxy(1,2); printf("Score:"); gotoxy(1,3); printf("%d", score); wait(200); getch(); // attend la pression de n’importe quelle touche return(0) ;} // quitte le programme, retour au menu de la calculatrice
Dernière modification par phcorp (26 Jun 2007 08:34:48)
Hors ligne
Bon déjà t’a pas utilisé de « gotos » et t’a eu le reflex de divisé ton programme en fonctions, ç’est bien.
Néanmoins, ça serait bien que tu le recode du début avec les outils de conception de la G100 plus récent, ne t’inquiète pas ça devrai être rapide.
*Concernant ton code :
Remarque 1 :
Pour faire un programme ou un jeux ç’est mieux de créer un projet.
Ainsi tu peux organiser tes sources en fichiers .c (qui comporte le code) et en .h (qui comporte les prototypes des fonctions, les constantes, les définitions de types…)
Donc commence par créer un projet avec les fichiers « main.c » et « main.h »
Remarque 2 :
Les indentations sont absentes (peut étre que tu las as faites mais elles ne sont pas resté sur le forum) Si tu les as pas mises alors prends l’habitude d’en mettre.
Remarque 3 :
Utilise plutôt cette méthode pour différencier les blocks ou les définitions des fonx (ça permet de voir si il y a autan d’accolades ouvrantes que fermantes) :
If (cuelque chose)
{ Instruction ;
Instruction ;
}//l’accolade fermante est juste au dessous de l’ouvrante
else
{ bla ;
bla ;
}// l’accolade fermante est juste au dessous de l’ouvrante
Remarque 4 :
La fonction « int game (void) » est trop grande et compliquée.
Une fonx fait UN truck et PAS PLUS.
Voici comment j’aurai fait, attention il y a pleins d’autres méthodes…
http://perso.orange.fr/vic.vic/ex.zip
Il ne agit que d’un « squelette » fait rapidement il peux y avoir des erreurs alors fait gaffe.
De plus il est réduit a sa plus simple expression...
*Concernant le codage sur G100
Remarque 1 :
Vas voir sur le Wiki la rubrique concernant Spritemaker (création de sprites).
Tu pourras faire des zoli sprites en couleur.
Remarque 2
Vas voir sur le Wiki GxLib. (Rubrique 5 niveaux de gris)
C’test une lib qui permet d’afficher tes sprites fait avec Spritemaker eu double buffer vidéo.
Ca évite le clignotements et ç’est très rapide.
Remarque 3 :
Vas voir sur le Wiki timerlib (rubrique gestion des timer)
Utilise ces timers plutôt que de faire dew wait(temp).
Pour les jeux les wait() sont a éviter.
Je ne critique pas ton travail, au contraire j’ai vu pire pour un début.
Mais ça serait enrichissant pour toi si t’améliorait certains défauts => ton code deviendrai plus efficace.
Bon appétit.
Hors ligne
wow trés beau boulot !
un peu de rigueur ne fera certainement pas de mal à mon code
le clignotement est assez génant, je vais regarder le wiki, c'est vrai que c'est pas la première chose à laquelle on pense...
ps : merci pour ton exemple, je vais essayer de refaire entièrement mon jeu en prenant en compte tes conseils
les questions viendront un peu plus tard
Dernière modification par phcorp (26 Jun 2007 14:04:26)
Hors ligne
voici mes questions :
. que faire du code généré par Sprite Maker -> comment l'utiliser ? ( paramètres vidéos, fonctions...)
. les sprites générés par Sprite Maker -> je les mets où ? ( #include fichier.h ou #include fichier.c )
. les pointeurs, listes chaînées... je ne comprends rien ! enfin bon je me documente ça a l'air vraiment intéressant voire indispensable !
je fais des essais en attendant les réponses pour sprite maker
merci encore pour ton aide
phcorp
Hors ligne
Les pointeurs et les méthodes de gestions des données sont en effet très importants.
Etudie dans l’ordre suivant les notions suivantes :
-Pointeurs
-Structures
-Gestion des données, ici les listes chaînées (il y a aussi les Piles, les Files, et les arbres que tu peux étudier ultérieurement)
Pour utiliser Gxlib il faut ajouter la lib au projet, as-tu réussit a créer un projet avec TC3 ?
Pour créer des sprites il y a la possibilité de le faire sprite par sprite ou bien de les faire en groupe : reporte toi a l’aide du logiciel. J’ai fait un ex pour les 2 méthodes.
Ces fonx marchent bien avec l’émulateur (winG100) alors utilise le, ça économisera la flash de ta G100.
Voici le contenu du fichier main.h :
///////////////////////////////////////////////////////////
//Sprites generé en groupe avec spritemaker
///////////////////////////////////////////////////////////
//Le tableaux de pointeur sur sprite est dans main () : Les sprites sont affiché par l'intermédiaire de ce tableau
unsigned char p_nord[] = {
0,0,16,16,0,0,255,255,255,255,0,0,0,1,0,1,
0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,
0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,
0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,
0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,
0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,
0,1,0,1,0 };
unsigned char p_est[] = {
0,0,16,16,0,0,1,0,1,0,0,0,1,0,1,0,
0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,
1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,
255,255,255,255,0,0,1,0,1,0,0,0,1,0,1,0,
0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,
1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,
1,0,1,0,0 };
unsigned char p_ouest[] = {
0,0,16,16,0,0,0,128,0,128,0,0,0,128,0,128,
0,0,0,128,0,128,0,0,0,128,0,128,0,0,0,128,
0,128,0,0,0,128,0,128,0,0,0,128,0,128,0,0,
255,255,255,255,0,0,0,128,0,128,0,0,0,128,0,128,
0,0,0,128,0,128,0,0,0,128,0,128,0,0,0,128,
0,128,0,0,0,128,0,128,0,0,0,128,0,128,0,0,
0,128,0,128,0 };
unsigned char p_sud[] = {
0,0,16,16,0,0,0,1,0,1,0,0,0,1,0,1,
0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,
0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,
0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,1,
0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,
0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,
255,255,255,255,0 };
///////////////////////////////////////////////////////////
//Sprite generé individuellement aves sprite maker
///////////////////////////////////////////////////////////
//Ici il l'y a pas de tableaux de pionteur : le sprite est affiché directement
unsigned char p_nouveau[] = {
0,0,16,16,0,8,16,9,0,8,16,65,48,73,16,65,
162,42,242,127,162,42,20,16,28,48,20,16,8,32,8,100,
8,36,0,64,232,92,224,92,96,136,156,212,248,156,4,8,
244,149,244,29,0,128,4,139,0,139,4,65,4,195,4,67,
0,32,28,96,24,32,0,16,120,48,112,16,8,0,200,19,
200,3,16,16,16,26,16,18,32,10,112,14,32,10,0,1,
128,1,0,1,0 };
Et le contenu de main.c :
#include <dos.h>
#include <stdlib.h>
#include "gxlib10.h"
#include "main.h"//contien les codes de sprites
void main ()
{
unsigned char index;
//table de pointeur sur sprite généré par spritemaker :
unsigned char* girouette[] = {
p_nord,
p_est,
p_ouest,
p_sud
};//attention : cette table doit étre dans la fonx ou elle est utilisé; ici le main()
gxSetMode(1); //activation du mode 5 couleurs
index = 0;
while (1)
{
gxClearBuff();//efface le buffer video
gxSpr_M_C (18,18,p_nouveau);//dessin "direct" d'un sprite
gxSpr_M_C (35,25,girouette[index]);//dessin "automatique" avec le tableau de pointeur sur sprite
gxRefresh();//rafraîchi l'encrent avec le buffer video
getch();
index++;//gestion de l'index
if (index==4) index=0;
}
}
Hors ligne
Les pointeurs et les méthodes de gestions des données sont en effet très importants.
Etudie dans l’ordre suivant les notions suivantes :
-Pointeurs
-Structures
-Gestion des données, ici les listes chaînées (il y a aussi les Piles, les Files, et les arbres que tu peux étudier ultérieurement)
c'est bon j'ai commancé dans cet ordre
Pour utiliser Gxlib il faut ajouter la lib au projet, as-tu réussit a créer un projet avec TC3 ?
oui !
Pour créer des sprites il y a la possibilité de le faire sprite par sprite ou bien de les faire en groupe : reporte toi a l’aide du logiciel. J’ai fait un ex pour les 2 méthodes.
oui j'avais remarqué aussi.
Ces fonx marchent bien avec l’émulateur (winG100) alors utilise le, ça économisera la flash de ta G100.
c'est ce que je fais
merci pour ton code, j'ai quelques questions :
. je ne comprends pas cette ligne :
gxSpr_M_C (18,18,p_nouveau);//dessin "direct" d'un sprite
quand tu dis dessin direct d'<<un>> sprite -> quel sprite ?
. en gros dans ton prog, cette ligne :
gxSpr_M_C (35,25,girouette[index]);]);//dessin "automatique" avec le tableau de pointeur sur sprite
c'est pour créer une image changeante au cour du temps ?
voili voilou sinon tout est clair c'est impeccable :
MERCI
ps : je teste le code pour en savoir plus
ps2 : problême avec ton code, ce genre de problême m'arrive souvent je ne sais pas comment le régler
info : j'ai utilisé le prog TC.EXE, prob de config ?
Dernière modification par phcorp (27 Jun 2007 15:44:39)
Hors ligne
J’ai oublié de te dire d’étudier les allocation dynamique de mémoire que tu peux voir après les pointeurs, rassure toi il n’y a que deux fonx (malloc(), free()) ça sera vite vu.
c'est pour créer une image changeante au cour du temps ?
Oui, tu peux aussi faire des effets de mouvement comme un bonhomme qui marche, en fin plein de trucks comme ça quoi.
gxSpr_M_C (18,18,p_nouveau);
Ce sprite est le dernier sprite du fichier main.h, Il représente une tête
Si tu l’essaye sur l’émulateur les niveaux de gris intermédiaire clignotent, ç’est normale sur la G100 ç’est bien des gris intermédiaire.
Mais je ne te conseille pas d’utiliser ce prog sur G100 car il n’y a pas de conditions d’arrêt.
Concernent ton pb de compilation :
La lib de Julien est codé avec l’asm des micros de classe 286, il est possible que ton projet sois paramétré pour compiler en 86 ou 186.
Dans ce cas les instructions asm de la lib qui n’existaient pas encor pour les 86 ou 186 ne passent pas à la compilation.
Voici la solution probable :
Option/Compiler/Advenced Code Generation/Instruction Set/80286
Vérifie aussi si t’a ajouter correctement la lib au projet :
Projet/Add Item
Concernant la config et l’utilisation de TC3 je ferait un article dans le Wiki avec toutes les étapes quant j’aurai un peu de temps.
Hors ligne
Mais je ne te conseille pas d’utiliser ce prog sur G100 car il n’y a pas de conditions d’arrêt.
oui j'ai vu le "while(1)"
Option/Compiler/Advenced Code Generation/Instruction Set/80286
je l'avais déjà paramétré ainsi
Vérifie aussi si t’a ajouter correctement la lib au projet :
Projet/Add Item
ahh oui bien vu, je n'ai pas crée de projet, comment puis-je faire pour en créer un ?
Dernière modification par phcorp (28 Jun 2007 12:36:08)
Hors ligne
- vérifie les chemins des .prj , des .exe, et des include dans option/directories
- Créer un nouveau répertoire, qui sera le celui du projet, dans le répertoire des projets (celle indiqué dans option/directoires)
- projet/open projet
- sélectionner le nouveaux répertoire du projet dans la boite de dialogue
- remplacer l’étoile par le nom du projet (ce nom sera celui de l’exécutable) et mettre l’extension .prj
- mettre tous les fichiers «.h » et «.c » des lib dans le répertoire du projet
- rajouter les fichiers «.c » au projet en utilisant la commande projet/Add item (Si cette commande est grisée clique sur le petit carré vert dans la fenêtre du bas, clique sur celle ci et réessaye)
- mettre les #include des fichiers « .h » correspondant aux fichiers « .c »
- dans l’explo Windows fait un clic droit sur le fichier .prj et sélectionne propriétés/ouvrir avec… et sélectionne dans le répertoire de TC3 bin/TC.exe.
Ainsi quand tu voudra ouvrir un projet il suffira de cliquer sur le fichier .prj avec l’explo Windows
-Utilise un éditeur a coloration syntaxique (voir dans le Wiki rubrique éditeurs) pour écrire et enregistrer ton code.
Voili,voilou.
Dernière modification par Vic (29 Jun 2007 04:58:20)
Hors ligne
oui c'est bon ! après moulte essai, j'y suis enfin arrivé ! merci
bon par contre, ça ne résout pas mon problème, sur le screen :
tu peux voir que les libs sont bien incluses mais aussi voir en bas que le peoblême est toujours présent :s
Dernière modification par phcorp (29 Jun 2007 12:47:30)
Hors ligne
mets ce repertoire dans C:/TC/flash
ouvre le avec TC3 et regardes la config.
http://perso.orange.fr/vic.vic/ph.zip
Il y a aussi l'exe
ps:
Je sais que Tonton1664 et Nykos visite le forum de temps en temps, et je suis le seul a aider phcrop !!
Hors ligne
Ah oui, dans le projet que je t’ai proposé, il y a une petite erreur de config : Il faut le faire compiler pour 286 comme je te l’avais dit. « Faites ce que je dis mais pas ce que je fais ».
Dans le code essaye de mettre la table de pointeur « girouette = {…} ; » juste en dessous des #includes, ça sera mieux ainsi.
Bonne prog.
Hors ligne
1/allez hop c'est reparti,
un petit bug vidéo cette fois;
j'ai utilisé ta méthode pour afficher les sprites et malheureusement ils ne s'affichent pas bien et même pas du tout.. par contre on voit quelques pixels...
j'ai lu dans un précédent poste qu'il fallait "initialiser les bons paramètres vidéo".
quelqu'un pourrait-il m'expliquer ?
2/voilà j'ai consulté le bon vieux wiki, quelques progrès mais c'est toujours pas ça :
SHPBATTL.H :
unsigned char splashscreen[] = { 0,0,63,127,255,255,0,0,255,255,156,1,255,255,222,3, 255,255,80,2,255,255,220,3,255,255,80,2,255,255,80,2, 255,255,80,2,255,255,0,0,255,255,0,0,255,255,0,0, 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, 255,255,0,0,255,255,0,0,255,255,224,255,255,255,240,255, 255,255,240,255,255,255,240,255,255,255,255,255,255,255,255,255, 255,255,109,252,255,255,33,252,255,255,179,253,255,255,119,252, 255,255,179,253,255,255,51,252,255,255,115,252,255,255,255,255, 16,255,255,0,0,255,255,238,145,255,255,207,144,255,255,200, 240,255,255,140,96,255,255,200,240,255,255,207,144,255,255,206, 144,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0, 0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0, 0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0, 0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0, 0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0, 0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0, 0,255,255,3,0,255,255,7,0,255,255,3,0,255,255,1, 0,255,255,1,0,255,255,1,0,255,255,15,0,255,255,6, 0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0, 0,255,255,62,0,255,255,182,0,255,255,0,28,255,255,0, 0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0, 0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,217, 198,255,255,208,210,255,255,22,210,255,255,23,198,255,255,214, 222,255,255,208,222,255,255,217,206,255,255,255,255,16,255,255, 0,0,255,255,71,50,255,255,197,123,255,255,197,75,255,255, 71,122,255,255,68,74,255,255,68,74,255,255,70,74,255,255, 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, 0,0,255,255,0,0,255,255,12,0,255,255,12,0,255,255, 12,0,255,255,8,0,255,255,12,0,255,255,255,7,255,255, 255,2,255,255,12,0,255,255,13,0,255,255,15,0,255,255, 15,0,255,255,15,0,255,255,15,0,255,255,31,0,255,255, 31,0,255,255,7,0,255,255,47,0,255,255,63,0,255,255, 63,254,255,255,175,255,255,255,131,159,255,255,27,128,255,255, 62,128,255,255,18,1,255,255,0,0,255,255,0,0,255,255, 0,6,255,255,0,14,255,255,0,63,255,255,128,127,255,255, 0,127,255,255,0,27,255,255,0,0,255,255,0,0,255,255, 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, 0,0,255,255,255,255,255,255,255,255,255,255,99,204,255,255, 41,133,255,255,41,181,255,255,99,180,255,255,111,181,255,255, 175,133,255,255,167,205,255,255,255,255,16,255,255,0,0,255, 255,206,56,255,255,235,173,255,255,43,173,255,255,43,57,255, 255,43,41,255,255,235,37,255,255,206,36,255,255,0,0,255, 255,0,0,255,255,8,0,255,255,24,0,255,255,24,0,255, 255,16,0,255,255,255,23,255,255,255,31,255,255,56,0,255, 255,56,0,255,255,48,0,255,255,50,112,255,255,127,224,255, 255,255,0,255,255,127,0,255,255,60,128,255,255,60,224,255, 255,127,0,255,255,127,192,255,255,31,128,255,255,103,128,255, 255,111,128,255,255,231,128,255,255,239,129,255,255,31,131,255, 255,127,128,255,255,15,128,255,255,31,64,255,255,223,11,255, 255,192,3,255,255,0,0,255,255,0,0,255,255,0,0,255, 255,0,0,255,255,4,0,255,255,144,0,255,255,159,0,255, 255,127,3,255,255,31,0,255,255,0,0,255,255,0,0,255, 255,0,0,255,255,0,0,255,255,0,0,255,255,15,0,255, 255,255,255,255,255,255,255,255,255,198,255,255,255,210,227,255, 255,210,213,255,255,198,205,255,255,222,213,255,255,222,227,255, 255,206,255,255,255,255,255,16,255,255,0,0,255,255,146,1, 255,255,210,51,255,255,30,50,255,255,158,1,255,255,82,48, 255,255,210,51,255,255,146,1,255,255,0,0,255,255,0,0, 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, 255,255,0,208,255,255,0,240,255,255,0,0,255,255,0,0, 255,255,0,0,255,255,0,0,255,255,0,64,255,255,0,192, 255,255,0,128,255,255,0,0,255,255,0,96,255,255,0,224, 255,255,0,192,255,255,0,192,255,255,0,128,255,255,0,128, 255,255,0,128,255,255,0,134,255,255,0,132,255,255,192,255, 255,255,192,255,255,255,192,255,255,255,224,255,255,255,240,0, 255,255,240,0,255,255,241,0,255,255,240,0,255,255,241,15, 255,255,255,31,255,255,255,95,255,255,254,255,255,255,240,255, 255,255,0,252,255,255,0,0,255,255,0,0,255,255,0,0, 255,255,0,0,255,255,0,0,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,115,222,255,255,33,220,255,255,173,29, 255,255,237,29,255,255,173,221,255,255,33,220,255,255,115,222, 255,255,255,255,16,255,255,0,0,255,255,14,247,255,255,143, 101,255,255,137,101,255,255,14,71,255,255,9,100,255,255,15, 100,255,255,14,246,255,255,0,0,255,255,0,0,255,255,0, 0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0, 0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0, 0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0, 0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0, 0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0, 0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0, 0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0, 0,255,255,0,0,255,255,126,0,255,255,240,255,255,255,0, 255,255,255,7,224,255,255,7,0,255,255,0,0,255,255,0, 0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,0, 0,255,255,1,0,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,230,24,255,255,66,74,255,255,90,74,255,255,218, 24,255,255,218,91,255,255,194,107,255,255,230,105,255,255,255, 255,16,255,255,0,0,255,255,222,51,255,255,140,121,255,255, 140,73,255,255,8,121,255,255,140,73,255,255,140,73,255,255, 140,73,255,255,0,0,255,255,0,0,255,255,0,0,255,255, 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, 0,12,255,255,0,8,255,255,0,8,255,255,0,24,255,255, 0,18,255,255,0,6,255,255,0,6,255,255,0,4,255,255, 255,31,255,255,255,127,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 132,57,255,255,204,144,255,255,204,150,255,255,221,48,255,255, 204,182,255,255,204,214,255,255,204,214,255,255,255,255,16,254, 255,0,0,254,255,0,199,254,255,128,199,254,255,0,196,254, 255,0,134,254,255,0,196,254,255,128,215,254,255,0,247,254, 255,0,0,254,255,0,0,254,255,0,0,254,255,0,0,254, 255,0,0,254,255,0,0,254,255,0,0,254,255,0,0,254, 255,0,0,254,255,0,0,254,255,0,0,254,255,0,0,254, 255,0,0,254,255,0,0,254,255,0,0,254,255,0,0,254, 255,0,0,254,255,0,0,254,255,0,0,254,255,0,0,254, 255,0,0,254,255,0,0,254,255,0,0,254,255,0,0,254, 255,0,0,254,255,0,0,254,255,0,0,254,255,0,0,254, 255,0,0,254,255,0,0,254,255,0,0,254,255,0,0,254, 255,0,0,254,255,0,0,254,255,0,0,254,255,0,0,254, 255,0,0,254,255,0,0,254,255,0,0,254,255,254,255,254, 255,254,255,254,255,254,255,254,255,254,255,254,255,254,255,254, 255,254,255,254,255,254,255,254,255,254,255,254,255,190,205,254, 255,190,133,254,255,190,180,254,255,62,180,254,255,62,181,254, 255,190,133,254,255,190,205,254,255,254,255,0,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205,205,205,205,205,205,205,205 }; unsigned char jet1[] = { 0,0,8,16,0,128,0,128,48,192,48,192,120,240,120,240, 254,255,254,255,255,255,255,255,254,127,254,127,192,31,192,31, 0,30,0,30,0,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205 }; unsigned char jet2[] = { 0,0,8,16,1,0,1,0,3,12,3,12,15,30,15,30, 255,127,255,127,255,255,255,255,254,127,254,127,248,3,248,3, 120,0,120,0,0,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205 }; unsigned char ship1[] = { 0,0,8,16,32,0,32,0,64,3,64,3,128,7,128,7, 128,7,128,7,159,223,159,223,255,255,255,255,254,255,254,255, 0,48,0,48,0,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205 }; unsigned char ship2[] = { 0,0,8,16,0,4,0,4,192,2,192,2,224,1,224,1, 224,1,224,1,251,249,251,249,255,255,255,255,255,127,255,127, 12,0,12,0,0,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205 }; unsigned char sub1[] = { 0,0,8,16,0,15,0,15,0,15,0,15,0,15,0,15, 254,127,254,127,255,255,255,255,255,255,255,255,254,255,254,255, 0,48,0,48,0,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205 }; unsigned char sub2[] = { 0,0,8,16,240,0,240,0,240,0,240,0,240,0,240,0, 254,127,254,127,255,255,255,255,255,255,255,255,255,127,255,127, 12,0,12,0,0,205,205,205,205,205,205,205,205,205,205,205, 205,205,205,205,205 }; unsigned char sea1[] = { 0,0,4,4,32,32,80,112,128,240,0,240,0,205,205,205, 205 }; unsigned char sea2[] = { 0,0,4,4,96,96,80,112,128,240,0,240,0,205,205,205, 205 }; unsigned char sea3[] = { 0,0,4,4,32,32,80,112,128,240,0,240,0,205,205,205, 205 }; unsigned char sea4[] = { 0,0,4,4,48,48,80,112,128,240,0,240,0,205,205,205, 205 }; unsigned char rocket[] = { 0,0,2,2,192,192,192,192,0,205,205 }; unsigned char* SHPBATTL[] = { splashscreen, jet1, jet2, ship1, ship2, sub1, sub2, sea1, sea2, sea3, sea4, rocket };
SHPBATTL.C :
#include <dos.h> #include <stdlib.h> #include <casio2.h> #include <mkeys.h> #include "gxlib10.h" #include "SHPBATTL.H" unsigned char* sea[] = { sea1, sea2, sea3, sea4 }; unsigned char* jet[] = { jet1, jet2 }; unsigned char* ship[] = { ship1, ship2 }; unsigned char* sub[] = { sub1, sub2 }; //fonction jeuxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx int game(void){ //score int score = 0; //vitesse int vitesse = 20; //variable qui sert pour le mouvement de la mer int countsea = 0; //variable qui sert pour la boucle principale du jeu int boucle = 0; //la position du bateau et son orientation int posx = 55, cote = 0; //la position du projectile mer/air et sa direction int ballx = 200, bally = 200, coteball; //la position du projectile mer/abysse int dropx = 200, dropy = 200; //la position des ennemis int sub1x, sub1y, sub2x, sub2y, jet1x, jet1y, jet2x, jet2y; //orientation des ennemis int sub1pos, sub2pos, jet1pos, jet2pos; //affichege ou non int sub1disp, sub2disp, jet1disp, jet2disp; //projectiles ennemis int ball1x = 200, ball1y = 200, ball2x = 200, ball2y = 200, ball3x = 200, ball3y = 200, ball4x = 200, ball4y = 200; //boucle dessin mer int c; sub1pos = 1; sub1x = 128 + 8; sub1y = 35 + 8; sub1disp = 1; sub2pos = 0; sub2x = 0 - 22; sub2y = 35 + 16; sub2disp = 1; jet1pos = 1; jet1x = 128 + 22; jet1y = 14; jet1disp = 1; jet2pos = 0; jet2x = 0 - 8; jet2y = 7; jet2disp = 1; while(boucle!=1){ //mouvement de la mer-------------------------------------- countsea++; if(countsea>3){ countsea = 0; } //--------------------------------------------------------- //affichage global----------------------------------------- gxClearBuff();//efface le buffer video for(c=0;c<128;c=c+4){ gxSpr_M_C (c,30,sea[countsea]); } if (jet1disp==1) gxSpr_M_C (jet1x, jet1y, jet[jet1pos]); if (jet2disp==1) gxSpr_M_C (jet2x, jet2y, jet[jet2pos]); if (sub1disp==1) gxSpr_M_C (sub1x, sub1y, sub[sub1pos]); if (sub2disp==1) gxSpr_M_C (sub2x, sub2y, sub[sub2pos]); gxSpr_M_C (posx, 28, ship[cote]); gxSpr_M_C (ballx, bally, rocket); gxSpr_M_C (ball1x, ball1y, rocket); gxSpr_M_C (ball2x, ball2y, rocket); gxSpr_M_C (ball3x, ball3y, rocket); gxSpr_M_C (ball4x, ball4y, rocket); gxRefresh();//raffraichi l'ecrent avec le buffer video //--------------------------------------------------------- //mouvement des ennemis------------------------------------ if(sub1pos==0){ sub1x++; if(sub1x>128){ sub1pos = 1; sub1x = 128 + 8; sub1disp = 1; } }else{ sub1x--; if(sub1x<-8){ sub1pos = 0; sub1x = 0 - 8; sub1disp = 1; } } if(sub2pos==0){ sub2x++; if(sub2x>128){ sub2pos = 1; sub2x = 128 + 22; sub2disp = 1; } }else{ sub2x--; if(sub2x<-8){ sub2pos = 0; sub2x = 0 - 22; sub2disp = 1; } } if(jet1pos==0){ jet1x++; if(jet1x>128){ jet1pos = 1; jet1x = 128 + 22; jet1disp = 1; } }else{ jet1x--; if(jet1x<-8){ jet1pos = 0; jet1x = 0 - 22; jet1disp = 1; } } if(jet2pos==0){ jet2x++; if(jet2x>128){ jet2pos = 1; jet2x = 128 + 8; jet2disp = 1; } }else{ jet2x--; if(jet2x<-8){ jet2pos = 0; jet2x = 0 - 8; jet2disp = 1; } } //colision projectile/avion................................ if((ballx>=jet1x) && (ballx<(jet1x+16)) && (bally>=jet1y) && (bally<(jet1y+6))){ jet1disp=0; score++; ballx=200; bally=200; } if((ballx>=jet2x) && (ballx<(jet2x+16)) && (bally>=jet2y) && (bally<(jet2y+6))){ jet2disp=0; score++; ballx=200; bally=200; } if((jet1x==posx) && (ball1x==200) && (jet1disp==1)){ball1x=jet1x+8;ball1y=jet1y+4;} if((jet2x==posx) && (ball2x==200) && (jet2disp==1)){ball2x=jet2x+8;ball2y=jet2y+4;} if((sub1x==posx) && (ball3x==200) && (sub1disp==1)){ball3x=sub1x+8;ball3y=sub1y+4;} if((sub2x==posx) && (ball4x==200) && (sub2disp==1)){ball4x=sub2x+8;ball4y=sub2y+4;} ball1y++; ball2y++; ball3y--; ball4y--; if(ball1y>64){ball1x=200;} if(ball2y>64){ball2x=200;} if(ball3y<0){ball3x=200;} if(ball4y<0){ball4x=200;} if((ball1x>=posx) && (ball1x<(posx+16)) && (ball1y>=28) && (ball1y<(28+6))){ boucle=1; } if((ball2x>=posx) && (ball2x<(posx+16)) && (ball2y>=28) && (ball2y<(28+6))){ boucle=1; } if((ball3x>=posx) && (ball3x<(posx+16)) && (ball3y>=28) && (ball3y<(28+6))){ boucle=1; } if((ball4x>=posx) && (ball4x<(posx+16)) && (ball4y>=28) && (ball4y<(28+6))){ boucle=1; } //......................................................... //colision projectile/sousmarin............................ if((dropx>=sub1x) && (dropx<(sub1x+16)) && (dropy>=sub1y) && (dropy<(sub1y+6))){ sub1disp=0; score++; dropx=200; dropy=200; } if((dropx>=sub2x) && (dropx<(sub2x+16)) && (dropy>=sub2y) && (dropy<(sub2y+6))){ sub2disp=0; score++; dropx=200; dropy=200; } //......................................................... //--------------------------------------------------------- //mouvement du bateau-------------------------------------- if(thetouche(9,1)==1){ posx--; cote = 1; } if(thetouche(9,4)==1){ posx++; cote = 0; } if(thetouche(7,4)==1){ boucle=1; } //--------------------------------------------------------- //mouvement du projectile mer/air-------------------------- if(coteball==0) ballx++; if(coteball==1) ballx--; bally--; if( (thetouche(1,5)==1) && (ballx>128) ){ ballx = posx+8; bally = 28; if(cote==0) coteball=0; if(cote==1) coteball=1; } if(bally<0){ coteball=0; ballx=200; } if(bally>64){ coteball=0; ballx=200; } //--------------------------------------------------------- //mouvement du projectile mer/abysse----------------------- dropy++; if( (thetouche(1,4)==1) && (dropy>64) ){ dropy = 33; dropx = posx+8; } if(dropy>64) dropx = 200; //affichage setPix(dropx, dropy, 0, 1); setPix(dropx+1, dropy, 0, 1); setPix(dropx, dropy+1, 0, 1); setPix(dropx+1, dropy+1, 0, 1); //--------------------------------------------------------- //réglage de la vitesse------------------------------------ if(thetouche(2,4)==1) vitesse--; if(thetouche(2,5)==1) vitesse++; if(vitesse<1) vitesse=1; if(vitesse>50) vitesse=50; //--------------------------------------------------------- wait(vitesse); } return(score); } //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx int main(void){ int score = 0; gxSetMode(1); gxClearBuff();//efface le buffer video gxSpr_M_C (0,0,splashscreen);//dessin "direct" d'un sprite : splashscreen gxRefresh();//raffraichi l'ecrent avec le buffer video getch(); // attend la pression de n’importe quelle touche clrscr(); // efface l’ecran score = game(); gotoxy(1,2); printf("Score:"); gotoxy(1,3); printf("%d", score); wait(200); getch(); // attend la pression de n’importe quelle touche return(0) ;} // quitte le programme, retour au menu de la calculatrice
fichier des sprites :
http://dl.free.fr/coblu7K8g/SHPBATTL.csp
quelqu'un peut m'aider ?
Dernière modification par phcorp (01 Jul 2007 09:33:10)
Hors ligne
Il faut indiquer dans spritemaker de générer du code pour GxLib (option/je sait plus quoi…)
Je vois aucun pointeur, fonx game() toujours aussi compliquée, les accolades, les indentations… Tu n’as pas étudié les notions fondamentales que je t’ai indiqué.
Si tu ne tiens pas compte des remarques ça ne sert a rien qu’on te donnes des conseils !
Les unités, les obus sont des données. La méthode de gestion de donnée la plus adaptée à ton jeu est la liste doublement chaînée, alors commence par faire les fonx y correspondant (ajouter, supprimer, unité suivante, unité précédente). Après, seulement, tu pourra faire le moteur de ton jeux, et en suite le « visuel ».
sub2x = 0 - 22;
Utilise des #define dans le .h, dans le .c on mets pas de nombres isolé comme ça.
En fin bref, relis les postes précédents, oublies ce code et RECOMMENCE DE PUIS LE DEBUT !
Hors ligne
Je vois aucun pointeur, fonx game() toujours aussi compliquée, les accolades, les indentations… Tu n’as pas étudié les notions fondamentales que je t’ai indiqué.
Si tu ne tiens pas compte des remarques ça ne sert a rien qu’on te donnes des conseils !
holà l'ami, j'avance petit à petit et je veux d'abord bien maîtriser gxlib
En fin bref, relis les postes précédents, oublies ce code et RECOMMENCE DE PUIS LE DEBUT
je suis en train mais ça prend un certain temps;
quand j'aurais fini, tu seras le premier averti
ps: au fait c'est bon maintenant ça marche, merci
Dernière modification par phcorp (01 Jul 2007 14:18:32)
Hors ligne
voilà je laisse mes sources dans le premier message, je les mettrais à jour tous les jours, vous pourrez ainsi suivre les avancements du programme
problême d'affichage du splashscreen au démarrage je ne vois absolument pas pourquoi !
Dernière modification par phcorp (03 Jul 2007 19:53:40)
Hors ligne