Pomoc u pravljenju proste igrice

2

Pomoc u pravljenju proste igrice

offline
  • Pridružio: 13 Jan 2006
  • Poruke: 252
  • Gde živiš: Novi Sad

ne vidim zasto ne bi bilo moguce napraviti igricu u pascalu. Ok, nije kao u c++, ali pobogu ljudi prave igrice i u VB (mada uglavnom ne lici ni na sta). Ja sam svojevremeno (pre 6 godina) radio u TP6 animacije, ali znam ljude koji i danas programiraju video igre u Free pascalu ili delphi-u. Doduse da bi otvorio neki normalan graficki mod u TP6 (recimo 320x240 sa 256 boja) treba ti dosta procedura pisanih u asembleru (zato sto je dos u pitanju)



Registruj se da bi učestvovao u diskusiji. Registrovanim korisnicima se NE prikazuju reklame unutar poruka.
offline
  • Pridružio: 24 Jul 2005
  • Poruke: 38
  • Gde živiš: Bijeljina

Ja nisam rekao da je nemoguce praviti igre u Pascalu, samo da je IZUZETNO tesko... Mislim da pored ovoliko modernih alata danasnjice niko ne bi trebao da se okrene Pascalu kao razvojnom okruzenju osim ako to bas mora.



offline
  • Srđan Tot
  • Pridružio: 12 Jul 2005
  • Poruke: 2483
  • Gde živiš: Ljubljana

Ok, da se vratimo na temu... da li imas vec neki kod koji ne radi bas kako zelis? Imas li neku "osnovu" programa (ulazak u graficki mod, uzimanje podataka sa tastature, klase za objekte u igri i slicno)?

Nemoj ocekivati da ce neko da ti napise ceo program Smile

offline
  • Pridružio: 26 Jul 2004
  • Poruke: 1472
  • Gde živiš: Vojvodina,Zrenjanin

Jel moze ovako nesto kao pacman
komande su 4-levo 6-desno 2-dole 8-gore.



program pacman; uses crt, graph; type point=^element; element=record im: pointer; nxt: point; end; fx=^coord; coord=record fa, fo, rf, delais: integer; nxt: fx; end; tableau=array[1..3]of integer; procedure infos; var  i,j,k: integer; begin     for i:=1 to 2 do begin         if i=1 then         setcolor(3)         else setcolor(0);     outtextxy(180,15,'Adaptation of the game:');     outtextxy(60,452,'Left:       4');     outtextxy(60,472,'Right:      6');     outtextxy(190,452,'Up:        8');     outtextxy(190,472,'Down:      2');     outtextxy(320,452,'Stop!:     5');     outtextxy(320,472,'Pause:     P');     outtextxy(450,452,'Sound/Sil.:S');     outtextxy(450,472,'Iwannaquit:Q');         if i=1 then begin             repeat                 for j:=1 to 20  do begin                     for k:=1 to 2 do begin                         if k=1 then setcolor(4) else setcolor(0);                     outtextxy(380+1*j,15,'F');                     outtextxy(390+2*j,15,'r');                     outtextxy(400+3*j,15,'e');                     outtextxy(410+4*j,15,'d');                         if k=1 then delay(600);                     end;                 end;                 for j:=20 downto 1  do begin                     for k:=1 to 2 do begin                         if k=1 then setcolor(4) else setcolor(0);                     outtextxy(380+1*j,15,'F');                     outtextxy(390+2*j,15,'r');                     outtextxy(400+3*j,15,'e');                     outtextxy(410+4*j,15,'d');                         if k=1 then delay(600);                     end;                 end;             until keypressed;         end;     end; end; procedure route(var t: tableau;x,y,fa,fo: integer); var coef: real; begin coef:=(x-fa)/(y-fo+0.1);     if ((coef)>=1)or((coef)<=-1) then begin         if fa>=x then t[1]:=4 else t[1]:=6;         if fo>y then begin t[2]:=8; t[3]:=2; end else begin t[2]:=2; t[3]:=8; end;     end else begin         if fo>=y then t[1]:=8 else t[1]:=2;         if fa>x then begin t[2]:=4; t[3]:=6; end else begin t[2]:=6; t[3]:=4; end;     end; end; label 1; var a, b, c, d, i, j, k, r, rf, x, y, size, pilote, mode, vies, repas, t1, t2, t3, t4, t5, t6, t7, t8, niveau: integer; tar, perdu, son, f1, f2, f3, f4, bonus: boolean; p, p2, p3, ec, ec2, ec3: point; fantome, blank, fade, vdt, repos, fromage, barre: pointer; t: tableau; pf, pf2, pf3: fx; temps, points: longint; stock:Array[1..24] of integer; s: string; begin randomize; pilote:=detect; InitGraph(pilote,mode,'c:\tp\bgi'); clearviewport; size:=imagesize(7,7,33,7);     new(fade);     getmem(fade,size);     getimage(7,7,33,7,fade^); size:=imagesize(7,7,33,33);     new(blank);     getmem(blank,size);     getimage(7,7,33,33,blank^);     for j:=1 to 2 do begin         if j=1 then setfillstyle(1,9) else setfillstyle(1,6);         for i:=1 to 4 do begin         cleardevice;         pieslice(20,20,5*i,360-5*i,10);         rectangle(19,14,20,15);         size:=imagesize(7,7,33,33);             if j=1 then begin             new(p2);             getmem(p2^.im,size);             getimage(7,7,33,33,p2^.im);                 if i=1 then begin                 p:=p2;                 p3:=p;                 end else begin                 p3^.nxt:=p2;                 p3:=p2;                 end;             end else begin             new(ec2);             getmem(ec2^.im,size);             getimage(7,7,33,33,ec2^.im);                 if i=1 then begin                 ec:=ec2;                 ec3:=ec;                 end else begin                 ec3^.nxt:=ec2;                 ec3:=ec2;                 end;             end;         end;         for i:=3 downto 2 do begin         cleardevice;         pieslice(20,20,5*i,360-5*i,10);         rectangle(19,14,20,15);         size:=imagesize(7,7,33,33);             if j=1 then begin             new(p2);             getmem(p2^.im,size);             getimage(7,7,33,33,p2^.im);             p3^.nxt:=p2;             p3:=p2;             end else begin             new(ec2);             getmem(ec2^.im,size);             getimage(7,7,33,33,ec2^.im);             ec3^.nxt:=ec2;             ec3:=ec2;             end;         end;     p2^.nxt:=p;     ec2^.nxt:=ec;     end; cleardevice; setcolor(4); rectangle(20,20,100,21); size:=imagesize(20,20,100,21);     new(barre);     getmem(barre,size);     getimage(20,20,100,21,barre^); cleardevice; setcolor(4); line(20,10,30,30); line(20,10,10,30); line(10,30,30,30); line(16,20,20,20); line(20,20,18,25); line(18,25,16,20); line(20,20,24,20); line(24,20,22,25); line(22,25,20,20); setfillstyle(1,4); floodfill(20,15,4); floodfill(20,27,4); setcolor(0); line(17,27,23,27); size:=imagesize(7,7,33,33); new(fantome); getmem(fantome,size); getimage(7,7,33,33,fantome^); setfillstyle(1,10); floodfill(20,28,0); size:=imagesize(7,7,33,33); new(vdt); getmem(vdt,size); getimage(7,7,33,33,vdt^); setfillstyle(1,5); floodfill(20,28,0); size:=imagesize(7,7,33,33); new(repos); getmem(repos,size); getimage(7,7,33,33,repos^); cleardevice; setcolor(14); rectangle(9,9,10,10); size:=imagesize(9,9,10,10); new(fromage); getmem(fromage,size); getimage(9,9,10,10,fromage^); {1e init} niveau:=0; points:=0; vies:=3; son:=true; b:=400;     repeat cleardevice;     for i:=1 to 19 do         for j:=1 to 13 do         putimage(i*28+36,j*28+45,fromage^,normalput); setcolor(1); {bordure} rectangle(50,60,582,424); rectangle(49,59,583,425); {motifs} rectangle(78,88,161,144); rectangle(471,88,554,144); rectangle(78,340,161,396); rectangle(471,340,554,396); rectangle(189,60,218,144); rectangle(414,60,443,144); rectangle(189,340,218,424); rectangle(414,340,443,424); rectangle(246,88,386,144); rectangle(246,340,386,396); rectangle(50,172,161,228); rectangle(471,172,582,228); rectangle(50,256,161,312); rectangle(471,256,582,312); rectangle(189,172,443,312); rectangle(190,173,442,311); {Anti-fromages} setfillstyle(1,0); floodfill(300,200,1); {passage secret} setcolor(0); rectangle(582,229,583,255); rectangle(49,229,50,255); rectangle(304,172,330,173); {Remplissage} setfillstyle(1,1); floodfill(80,90,1); floodfill(80,350,1); floodfill(500,350,1); floodfill(500,90,1); floodfill(200,90,1); floodfill(420,90,1); floodfill(200,400,1); floodfill(420,400,1); floodfill(250,100,1); floodfill(250,350,1); floodfill(100,200,1); floodfill(500,200,1); floodfill(100,300,1); floodfill(500,300,1); {camemberts} setfillstyle(1,2); setcolor(2); circle(65,75,5); floodfill(65,75,2); circle(65,409,5); floodfill(67,409,2); circle(566,75,5); floodfill(566,75,2); circle(566,409,5); floodfill(566,409,2); setcolor(3); outtextxy(50,40,'lifes:'); outtextxy(156,40,'points:           Energy:                Level:'); outtextxy(290,435,'Infos:I'); setcolor(0); str(niveau,s); outtextxy(540,40,s); niveau:=niveau+1; setcolor(3); str(niveau,s); outtextxy(540,40,s); str(vies,s); outtextxy(105,40,s); f1:=true; f2:=true; f3:=true; f4:=true; repas:=0;     for j:=1 to 16 do     stock[j]:=0; 1: p2:=p; ec2:=ec; temps:=0; perdu:=false; new(pf); pf^.fa:=304; pf^.fo:=174; pf^.rf:=4; pf^.delais:=0; new(pf2); pf2^.fa:=304; pf2^.fo:=210; pf2^.rf:=8; pf2^.delais:=0; pf^.nxt:=pf2; new(pf3); pf3^.fa:=304; pf3^.fo:=240; pf3^.rf:=8; pf3^.delais:=0; pf2^.nxt:=pf3; pf2:=pf3; new(pf3); pf3^.fa:=304; pf3^.fo:=275; pf3^.rf:=8; pf3^.delais:=0; pf3^.nxt:=nil; pf2^.nxt:=pf3; x:=303; y:=313; r:=5; i:=1; b:=b-20; c:=b+30; bonus:=false;     repeat     i:=i+1;         {Pac-itin‚raire}         if keypressed then r:=ord(readkey)-ord('0');         if r=ord('s')-ord('0') then son:=(son=false);         if r=ord('p')-ord('0') then repeat until keypressed;         if r=ord('i')-ord('0') then infos;         if i mod 4000=0 then if temps=0 then p2:=p2^.nxt else ec2:=ec2^.nxt;         if i mod b=0 then begin             if r=6 then if (getpixel(x+27,y)<>1)and(getpixel(x+27,y+26)<>1) then d:=r;             if r=4 then if (getpixel(x-1,y)<>1)and(getpixel(x-1,y+26)<>1) then d:=r;             if r=2 then if (getpixel(x,y+27)<>1)and(getpixel(x+26,y+27)<>1)and((x<>304)or(y<>145)) then d:=r;             if r=8 then if (getpixel(x,y-1)<>1)and(getpixel(x+26,y-1)<>1) then d:=r;             if r=5 then d:=0;             if d=6 then if (getpixel(x+27,y)<>1)and(getpixel(x+27,y+26)<>1) then x:=x+1 else d:=0;             if d=4 then if (getpixel(x-1,y)<>1)and(getpixel(x-1,y+26)<>1) then x:=x-1  else d:=0;             if d=2 then if (getpixel(x,y+27)<>1)and(getpixel(x+26,y+27)<>1) then y:=y+1 else d:=0;             if d=8 then if (getpixel(x,y-1)<>1)and(getpixel(x+26,y-1)<>1) then y:=y-1 else d:=0;             if ((d=6)and((getpixel(x+27,y+12)=14)or(getpixel(x+27,y+14)=14))             or((d=4)and((getpixel(x-1,y+12)=14)) or(getpixel(x-1,y+14)=14))             or((d=2)and((getpixel(x+12,y+27)=14))or(getpixel(x+14,y+27)=14))             or((d=8)and(getpixel(x+12,y-1)=14)or(getpixel(x+14,y-1)=14))) then begin             setcolor(0);             str(points,s);             outtextxy(220,40,s);             points:=points+10;             if points mod 4000=0 then bonus:=true;             repas:=repas+1;             setcolor(3);             str(points,s);             outtextxy(220,40,s);             end;             if temps>0 then begin             putimage(x,y,ec2^.im,normalput);             temps:=temps-1;             putimage(360+trunc(80*temps/(60*(10-niveau div 2))),20,blank^,normalput);             end else             putimage(x,y,p2^.im,normalput);             if (x=51)and(y=61)and(f1=true) then begin             f1:=false;             temps:=60*(10-niveau div 2);             putimage(360,43,barre^,normalput);             end;             if (x=555)and(y=61)and(f2=true) then begin             f2:=false;             temps:=60*(10-niveau div 2);             putimage(360,43,barre^,normalput);             end;             if (x=51)and(y=397)and(f3=true) then begin             f3:=false;             temps:=60*(10-niveau div 2);             putimage(360,43,barre^,normalput);             end;             if (x=555)and(y=397)and(f4=true) then begin             f4:=false;             temps:=60*(10-niveau div 2);             putimage(360,43,barre^,normalput);             end;         end;     {Route fantome}     tar:=false;     k:=1;         if i mod c=0 then begin         pf2:=pf;             repeat             randomize;                 repeat                     if (tar=true)or((pf2^.fa=162)and(pf2^.fo=145))or((pf2^.fa=219)and(pf2^.fo=145))                     or((pf2^.fa=387)and(pf2^.fo=145))or((pf2^.fa=444)and(pf2^.fo=145))or((pf2^.fa=444)and(pf2^.fo=229))                     or((pf2^.fa=444)and(pf2^.fo=313))or((pf2^.fa=387)and(pf2^.fo=313))or((pf2^.fa=162)and(pf2^.fo=313))                     or((pf2^.fa=219)and(pf2^.fo=313))or((pf2^.fa=162)and(pf2^.fo=229)) then begin                         if (k<3)and(temps=0)and(random(10)>2+(niveau div 2)) then begin                         route(t,x,y,pf2^.fa,pf2^.fo);                         pf2^.rf:=t[k];                         k:=k+1;                         end else pf2^.rf:=random(4)*2+2;                     end;                     if (pf2^.fa=304)and(pf2^.fo=174)and(pf2^.delais=0) then pf2^.rf:=8;                     if (pf2^.fa=304)and(pf2^.fo=145)and(pf2^.rf=2) then pf2^.rf:=random(2)*2+4;;                     if pf2^.rf=6 then if (getpixel(pf2^.fa+27,pf2^.fo)<>1)and(getpixel(pf2^.fa+27,pf2^.fo+26)<>1) then begin                     pf2^.fa:=pf2^.fa+1; tar:=false; end else tar:=true;                     if pf2^.rf=4 then if (getpixel(pf2^.fa-1,pf2^.fo)<>1)and(getpixel(pf2^.fa-1,pf2^.fo+26)<>1) then begin                     pf2^.fa:=pf2^.fa-1; tar:=false; end else tar:=true;                     if pf2^.rf=2 then if (getpixel(pf2^.fa,pf2^.fo+27)<>1)and(getpixel(pf2^.fa+26,pf2^.fo+27)<>1) then begin                     pf2^.fo:=pf2^.fo+1; tar:=false; end else tar:=true;                     if pf2^.rf=8 then if (getpixel(pf2^.fa,pf2^.fo-1)<>1)and(getpixel(pf2^.fa+26,pf2^.fo-1)<>1) then begin                     pf2^.fo:=pf2^.fo-1; tar:=false; end else tar:=true;                 until tar=false;                 if (pf2^.fa=51)and(pf2^.fo=61) then                 f1:=false;                 if (pf2^.fa=555)and(pf2^.fo=61) then                 f2:=false;                 if (pf2^.fa=51)and(pf2^.fo=397) then                 f3:=false;                 if (pf2^.fa=555)and(pf2^.fo=397) then                 f4:=false;                                 if pf2^.fa>570 then begin pf2^.fa:=35; putimage(570,229,blank^,normalput); end;                     if pf2^.fa<35 then begin pf2^.fa:=570; putimage(35,229,blank^,normalput); end;                 j:=1;                     while (stock[j]<>0)and(j<24) do                     j:=j+2;                     if (pf2^.rf=6)and((getpixel(pf2^.fa+27,pf2^.fo+12)=14)                     or(getpixel(pf2^.fa+27,pf2^.fo+14)=14))and(odd(pf2^.fa))                     then begin                     stock[j]:=pf2^.fa+27;                     stock[j+1]:=pf2^.fo+13;                     end;                     if (pf2^.rf=4)and((getpixel(pf2^.fa-1,pf2^.fo+12)=14)or                     (getpixel(pf2^.fa-1,pf2^.fo+14)=14))and(odd(pf2^.fa))                     then begin                     stock[j]:=pf2^.fa-2;                     stock[j+1]:=pf2^.fo+13;                     end;                     if (pf2^.rf=2)and((getpixel(pf2^.fa+14,pf2^.fo+27)=14)or                     (getpixel(pf2^.fa+12,pf2^.fo+27)=14))and(odd(pf2^.fo))                     then begin                     stock[j]:=pf2^.fa+13;                     stock[j+1]:=pf2^.fo+27;                     end;                     if (pf2^.rf=8)and((getpixel(pf2^.fa+14,pf2^.fo-1)=14)                     or(getpixel(pf2^.fa+12,pf2^.fo-1)=14))and(odd(pf2^.fo))                     then begin                     stock[j]:=pf2^.fa+13;                     stock[j+1]:=pf2^.fo-1;                     end;                     pf3:=pf;                     t1:=pf3^.fa;                     t2:=pf3^.fo;                     pf3:=pf3^.nxt;                     t3:=pf3^.fa;                     t4:=pf3^.fo;                     pf3:=pf3^.nxt;                     t5:=pf3^.fa;                     t6:=pf3^.fo;                     pf3:=pf3^.nxt;                     t7:=pf3^.fa;                     t8:=pf3^.fo;                     for a:=1 to 6 do begin                     j:=2*a-1;                         if (stock[j]<>0)                         and((t1>stock[j]+3)or(t1<stock[j]-32)                         or(t2>stock[j+1]+3)or(t2<stock[j+1]-32))                         and((t3>stock[j]+3)or(t3<stock[j]-32)                         or(t4>stock[j+1]+3)or(t4<stock[j+1]-32))                         and((t5>stock[j]+3)or(t5<stock[j]-32)                         or(t6>stock[j+1]+3)or(t6<stock[j+1]-32))                         and((t7>stock[j]+3)or(t7<stock[j]-32)                         or(t8>stock[j+1]+3)or(t8<stock[j+1]-32))                         then begin                         putimage(stock[j],stock[j+1],fromage^,normalput);                         stock[j]:=0;                         end;                     end;                     if (temps=0)and(pf2^.delais=0) then putimage (pf2^.fa,pf2^.fo,fantome^,normalput);                     if (pf2^.delais=0)and(temps>0) then putimage (pf2^.fa,pf2^.fo,vdt^,normalput);                     if pf2^.delais>0 then begin                     putimage(pf2^.fa,pf2^.fo,repos^,normalput);                     pf2^.delais:=pf2^.delais-1;                     end;                     {Fantome bouff‚?}                     if (getpixel(pf2^.fa+30,pf2^.fo+10)=6)or(getpixel(pf2^.fa-3,pf2^.fo+10)=6)                     or(getpixel(pf2^.fa+15,pf2^.fo-3)=6)or(getpixel(pf2^.fa+15,pf2^.fo+30)=6) then begin                         for j:=1 to 26 do begin                         putimage(pf2^.fa,pf2^.fo+j,fade^,normalput);                             if son=true then sound(j*100);                         delay(500);                         end;                     nosound;                     setcolor(0);                     str(points,s);                     outtextxy(220,40,s);                     points:=points+500;                         if (points div 4000)<>((points-500) div 4000) then bonus:=true;                     setcolor(3);                     str(points,s);                     outtextxy(220,40,s);                     pf2^.fa:=350;                     pf2^.fo:=250;                     pf2^.delais:=(10-niveau)*100;                     end;                     {bonus?}                     if bonus=true then begin                     bonus:=false;                         if son=true then begin                             for a:=1 to 4 do begin                             sound(440*a);                             delay(1000);                             end;                         nosound;                         end;                     setcolor(0);                     str(vies,s);                     outtextxy(105,40,s);                     vies:=vies+1;                     setcolor(3);                     str(vies,s);                     outtextxy(105,40,s);                     end;                     {fin?}                     if (getpixel(pf2^.fa+30,pf2^.fo+10)=9)or(getpixel(pf2^.fa-3,pf2^.fo+10)=9)                     or(getpixel(pf2^.fa+15,pf2^.fo-3)=9)or(getpixel(pf2^.fa+15,pf2^.fo+30)=9) then begin                     setcolor(0);                     str(vies,s);                     outtextxy(105,40,s);                     vies:=vies-1;                     setcolor(3);                     str(vies,s);                     outtextxy(105,40,s);                     pf2:=pf^.nxt;                         for j:=1 to 26 do begin                         putimage(x,y+j,fade^,normalput);                             if son=true then sound(3000-j*100);                         delay(500);                         end;                      nosound;                      pf2:=pf;                          repeat                          putimage(pf2^.fa,pf2^.fo,blank^,normalput);                          pf2:=pf2^.nxt;                          until pf2=nil;                      delay(5000);                          if vies=0 then                          perdu:=true;                          if vies>0 then goto 1;                     tar:=false;                     end;             pf2:=pf2^.nxt;             until (pf2=nil)or(perdu=true);         end;         {Passage secret}         if x>570 then begin x:=35; putimage(570,229,blank^,normalput); end;         if x<35 then begin x:=570; putimage(35,229,blank^,normalput); end;     until (r=ord('q')-ord('0'))or(perdu=true)or(repas>214);     if repas>214 then begin     cleardevice;     outtextxy(220,30,'Prepare to next level');         while not(keypressed) do begin         delay(1000);         putimage(x,y,p2^.im,normalput);         p2:=p2^.nxt;         end;     if son=true then begin         for i:=1 to 3 do begin         sound(2000);         delay(1500);         nosound;         delay(500);         end;     sound(2000);     delay(12000);     nosound;     end;     end;     until (perdu=true)or(r=ord('q')-ord('0'));     repeat         for j:=1 to 25  do begin             for k:=1 to 2 do begin                 if k=1 then setcolor(4) else setcolor(0);             outtextxy(290-3*j,20,'L');             outtextxy(300-j,20,'o');             outtextxy(310+j,20,'s');             outtextxy(320+3*j,20,'t');                  if k=1 then delay(500);             end;         end;         for j:=25 downto 1  do begin             for k:=1 to 2 do begin                 if (k=1) then setcolor(4) else setcolor(0);             outtextxy(290-3*j,20,'L');             outtextxy(300-j,20,'o');             outtextxy(310+j,20,'s');             outtextxy(320+3*j,20,'t');                     if k=1 then delay(500);             end;         end;     until keypressed; closegraph; end.

offline
  • Pridružio: 24 Jul 2005
  • Poruke: 38
  • Gde živiš: Bijeljina

LaserJat, jesi li ti ovo pravio ili negde nasao source? Stvarno je dobro, u odnosu na to sto sam (nisam) dosad video u Pascalu.
Ima nekih malim problema, kao sto su tragovi koje ostavlja lik kada ide u levu stranu i dole, ali je sve u svemu odlicno!

Pretpostavljam da nije bilo tesko za tebe, zar ne?

offline
  • Pridružio: 26 Jul 2004
  • Poruke: 1472
  • Gde živiš: Vojvodina,Zrenjanin

@iggy91

Hehe..Bilo bi strava da sam ja ovo napravio ali nisam nazalost.Nisam jos uvek tolko dobro savladao pascal.

Imam jos par slicnih igrica u pascalu okacicu i njihov source uskoro.

offline
  • Pridružio: 24 Jul 2005
  • Poruke: 38
  • Gde živiš: Bijeljina

@ LaserJat

Preplashi me na trenutak, Laser... Imam samo jednu molbu. Kada budes ostavljao source za ostale igre, molim te stavi kao .zip datoteke, a ne ovako... Unisti forum... Smile

offline
  • Pridružio: 25 Mar 2006
  • Poruke: 67
  • Gde živiš: Doboj, Republika Srpska

Ajd ovako ne treba onoliko koda kao u onom primjeru.
Potrebno je da uradis sledece
uses dos,crt,graph;
ovim crt igraph moras da navedes ukoliko zelis da koristis sve tastere na tastaturi i ukoliko zelis da koristis grafiku.
Kod iz primjera:
//
begin
pilote:=detect;
InitGraph(pilote,mode,'c:\tp\bgi');
clearviewport;
//
Sluzi za detektovanje grafike i prelazak u grafički mod, a komanda clearviewport ti brise sadrza ekrana.
//
closegraph;
end.
//
ovu komanda ti je obavezna prije zavrsavanja rada u grafickom modu posto te ona vraca u standardni mod 80*40 znakova ili tako nesta zaboraviosam davno sam radi u paskalu znaci uglavnom to je stardani prikaz na monitoru pod dos-om.
Izmedju ovog pises funkcije za iscrtavanje na ekranu, one su ti fino objašnjene u helpu od turbo pascala odes u dio o unitu graph.
Ako animacija treba samo da mrda rukam i nogama a da se ne pomjera po ekranu to ces odradi veoma lako a ako zelis da se mice i po ekranu to ce biti malo komplikovanije i moraces da koristis pokazivace.
I ako je ovo zadatak u nekoj skoli volio bih da ja malo idem u tu skolu.

offline
  • prm 
  • Građanin
  • Pridružio: 11 Jun 2006
  • Poruke: 94

jel to iz one zbirke dobra je ima i stvri koje mogu da crtaju 3D samo sam nesto zaboravio kako se zbirka zove

Ko je trenutno na forumu
 

Ukupno su 2849 korisnika na forumu :: 260 registrovanih, 22 sakrivenih i 2567 gosta   ::   [ Administrator ] [ Supermoderator ] [ Moderator ] :: Detaljnije

Najviše korisnika na forumu ikad bilo je 15694 - dana 01 Feb 2026 12:23

Korisnici koji su trenutno na forumu:
Korisnici trenutno na forumu: 015, 357magnum, aca018, Ageofloneliness, Aleksandar1991, Aleksandar_038, AleksandarV, ArchaBasha, Aristotle2002, ArmFPGA, Arni, as2025, Aska, Avladi, Ba4e, Baltimor, Barista, bbogdan, Ben Roj, berste23, bog sunca, Bojan198527, bojan_t, bojank, bojcistv, Boris90, boromir, Boroš, BORUTUS, boskelazo, Botovac, BradaRS, branko7, branko87, Bubili, BUDDAR70, Butcher, C-Gun, carinko, cebam, Chainsaw, Cicumile, cifra, Comyymoc, crnirocko, cvrle312, cyprus, Dambi, darkdruid72, darkojbn, darkojovxp, Darth Wader, dd201176, dejandr, Deki Duga Devetka, Denaya, Dioniss, Diplomac, Djokislav, djoli, Djordje Kolačarić, DJUNTA, Djuza, dnr, Dogma21, doom83, doragan, draganca, Draganeli, Dragon Order, Dugme1984, dulleo, Dusko Nikolin, Dzambas, El-Komadante, Ercomero, EXIT78, feanor, FGR, Flanker-G, FOX, Foxdie, gobrad, Gogi do, GrobarPovratak, Grochow, GUARIN, Guster25, Holy Saber, Homislav, hyla, hyper1, igorkozar83, Igritelj, ikan, Imperator_Aleksandr_lll, istokzapad, ivanb, Ivoo, j-22orao, Jakonjveliki, Jan, jarovitt, JaV, Jerry Drake, joca83, Joco Skljoco, jodzula, JOntra, Jose, Jovan1983, K a s p e r, Kajzer Soze, Kapetan993, karakaj, Kichma, Kobrim, kolle.the.kid, kondenzator, konstruktor, Krin, krkalon, Krusarac, kybonacci, lakson001, Lance Guest, Levi, LjubisaR, LostInSpaceandTime, Lošmi, Lucije Kvint, M74AB3, majstro, Mane88, marko.markovic, Marko43, Maschinekalibar, matrix_1, mean_machine, menges, mercedesamg, mikrimaus, Milan A. Nikolic, Millennium, milutin134, Mirage 2000N, Mis uz pusku, Miškić, mm1811, mnn2, moldway, molusan, MP Rail, mr.lucas, Mrav Obrad, mrvica78, Muki 123, mushroom, Musklfiber, Myamoto Musashi, Mzee, nebkv, nelezele, Nemanja.M, nemkea71, Neutral, Neutral-M, nick79, nikolapetkovic, novator, Ognjen D., orfanel, Panter, pein, Pekman, Permaldar, Petarvu, petrovicrs, picknick, ping15, Podgoritza, Povratak1912, Prašinar, Prečanin30, promajauglavi, Pururin, PuškeiPlavuše, rajkoplje, rambod, Raso75, rebro1974, RED4G-304, redstar011, Remarqe, Resnica, RiV, royst33, s putnik, savuni, Semberija, Shinobi, simicnenadbg, Sitan_Lopov, Sky diver 29, smuk, Solunac na steroidima, sosko, Spectator, ssekir75, stalja, steksi, Su 57, Szigetwar, t.e.m.p.l.a.r., t84dar, Tajpan, Tandrkalo, Tas011, Teodorasim, theNedjeljko, travisrise, trinitrotoluen, troki1971, TTN, tubular, Tvrtko I, ulogovan, Vanderx, vathra, Velibor Radoja, veljko82, vidra boy, Viktor Petrenko, virked, Visionary, VJ, Vladko, vladnik321, Vojkan Petrovic, VPV, vrlenija, Weah88, Welky, wize, Xland, yiyi, Zdenko, Zeljo980, zillbg, zivojin32, Zmaj Tolak, Zoran1959, Zoran_Partizan, Zorge, Zvlade, Žrnov, 787, 1324, 1453, 800077