• Chipmangel bedroht Weihnachtsgeschäft 26. November 2021
    Washington blockiert weiterhin die Lieferung von Maschinen zur Chipproduktion nach China und das dortige Engagement von US-Firmen. Die Folge: Viele Produkte – vom Smartphone über Spielekonsolen bis zum Auto – können nicht produziert werden.
NOV 07 2021

DOS Games HTML Games und PMAN Pcontrol

Free DOS

HTML-Spiele: Wir alle lieben es, in unserer Freizeit Spiele zu spielen, um unseren Geist zu erfrischen.

Wenn Sie sich jedoch für das Programmieren interessieren, dann denken Sie vielleicht irgendwann daran, auch Ihr eigenes Spiel zu entwickeln.

In diesem Artikel werden wir einen Blick auf die am besten bewerteten Online-HTML-Spiele mit ihrem Quellcode werfen.

Dies wird dir helfen, die Funktionsweise von Online-Spielen zu verstehen.

Alle Spiele, die in diesem Artikel aufgeführt sind, dürfen frei verändert und weitergegeben werden.

Wenn du dich daran erinnerst, dass wir früher den Adobe Flash Player verwenden mussten, um Online-Spiele oder andere Multimedia-Inhalte auszuführen.

Mit der Hilfe von HTML5 und JavaScript brauchen wir den Flash Player jedoch nicht mehr.

Diese Spiele werden mit HTML5 und JavaScript erstellt. Wenn Sie also diese Technologien bereits kennen. Dann können Sie den Code leicht verstehen und diese Spiele auch ändern.

Beginnen wir also ohne Umschweife mit dem ersten Spiel auf unserer Liste

Pac-Man https://loewenhagen.de/Games/P_man/pacman.html

Das Spiel besteht aus 3 HTML-Dateien

P-MAN

<HTML>
<HEAD>
<TITLE>P-MAN</TITLE>
<!--

 .......SECRET COMMAND.......

This game is very hard to clear, so I give you SECRET COMMAND.

"EASY"       EASY MODE    (ENEMY 3/4 SPEED)
"EASIEST"    EASIEST MODE (ENEMY 1/2 SPEED)

Before you start, type "EASY" or "EASIEST" in SCORE WINDOW.
Perhaps you can clear it easily.


//-->
</HEAD>
<FRAMESET COLS="336,*">
  <FRAME SRC="pman.html" NAME="Pman" NORESIZE SCROLLING="NO">
  <FRAME SRC="pcontrol.html" NAME="Pcontrol" NORESIZE SCROLLING="NO">
</FRAMESET>
<NOFRAME>
You must get Netscape 3.0 or later.


</NOFRAME>
</HTML>

Pcontrol


<html> <BODY TEXT="#FFFFFF" LINK="#FFFFFF" VLINK="#999999" ALINK="#00FF00" BGCOLOR="#000000"> <A HREF="vorhang2.zip"><IMG SRC="download.gif" border=0></A> <Center> <FORM NAME="Pcontrol"> <SCRIPT LANGUAGE="JavaScript"> <!-- var timerID = null var timerINT = 20 //interval (ms) var playflag=0; var inkey=0 var tkey = "1" var icons = new Array(20); //btn image icons[1]=new Image();icons[1].src="btn14.gif"; icons[2]=new Image();icons[2].src="btn11.gif"; icons[3]=new Image();icons[3].src="btn12.gif"; icons[4]=new Image();icons[4].src="btn13.gif"; icons[11]=new Image();icons[11].src="btn24.gif"; icons[12]=new Image();icons[12].src="btn21.gif"; icons[13]=new Image();icons[13].src="btn22.gif"; icons[14]=new Image();icons[14].src="btn23.gif"; systm="" ver=navigator.appVersion Nv=ver.charAt(0) len=ver.length for(iln=0;iln<len;iln++) if(ver.charAt(iln)=="(") break systm = ver.charAt(iln+1).toUpperCase() if (systm != "C"){if (Nv >= 4){ document.onkeydown = keyDown document.captureEvents(Event.KEYDOWN) }} function keyDown(DnEvents){ k=DnEvents.which if (k == 52){keyscan(1)} //4 if (k == 56){keyscan(2)} //8 if (k == 54){keyscan(3)} //6 if (k == 50){keyscan(4)} //2 } function interval1(){ clearTimeout(timerID) clearTimeout(timerID) clearTimeout(timerID) clearTimeout(timerID) clearTimeout(timerID) clearTimeout(timerID) clearTimeout(timerID) clearTimeout(timerID) clearTimeout(timerID) clearTimeout(timerID) //10key scan if (systm == "C"){Nv=3} if (Nv <= 3){ document.Pcontrol.DUM.click() tkey=document.Pcontrol.tenkey.value if (tkey != ""){ document.Pcontrol.tenkey.value="" document.Pcontrol.tenkey.focus() if (tkey.indexOf("4") >= 0){keyscan(1)} if (tkey.indexOf("8") >= 0){keyscan(2)} if (tkey.indexOf("6") >= 0){keyscan(3)} if (tkey.indexOf("2") >= 0){keyscan(4)} }else{ document.Pcontrol.tenkey.focus() } }else{ } timerID = setTimeout("interval1()",timerINT) } function intSTOP(){ clearTimeout(timerID) } //btn write function SetBtn(flag, position){ document.images[position].src=icons[flag].src; } //no operation function nop(){} //MODE change function MODEcheck(){} //starter function starter(){ playflag=playflag+1 if (playflag == 1){SetBtn(11,1) SetBtn(2,0) SetBtn(3,2) SetBtn(4,3) tkey="" document.Pcontrol.tenkey.value="" document.Pcontrol.tenkey.focus() timerID = setTimeout("interval1()",timerINT) } if (playflag == 2){playflag=0 SetBtn(1,1) SetBtn(2,0) SetBtn(3,2) SetBtn(4,3) document.Pcontrol.tenkey.value="" intSTOP() document.Pcontrol.MES.value="Click START"; } parent.Pman.document.PMAN.CTRL.value="11"; } //key scan function keyscan(kscan){ inkey=kscan; if (playflag == 1){ tmpvalue=parent.Pman.document.PMAN.CTRL.value if (tmpvalue != "0"){ parent.Pman.document.PMAN.CTRL.value=inkey if (inkey == "1"){ SetBtn(11,1) SetBtn(2,0) SetBtn(3,2) SetBtn(4,3) } if (inkey == "2"){ SetBtn(1,1) SetBtn(12,0) SetBtn(3,2) SetBtn(4,3) } if (inkey == "3"){ SetBtn(1,1) SetBtn(2,0) SetBtn(13,2) SetBtn(4,3) } if (inkey == "4"){ SetBtn(1,1) SetBtn(2,0) SetBtn(3,2) SetBtn(14,3) } } } } //--> </SCRIPT> </HEAD> <CENTER><H1>P-MAN</H1></CENTER><BR> <H3>SCORE:<INPUT TYPE="text" NAME="MES" SIZE=13 VALUE = "Click START" ></H3><BR> <A HREF="javascript:keyscan(2)" onMouseOver="keyscan(2)"><IMG WIDTH=64 HEIGHT=32 SRC="btn11.gif"></A><BR><A HREF="javascript:keyscan(1)" onMouseOver="keyscan(1)"><IMG WIDTH=64 HEIGHT=32 SRC="btn14.gif"></A><A HREF="javascript:keyscan(3)" onMouseOver="keyscan(3)"><IMG WIDTH=64 HEIGHT=32 SRC="btn12.gif"></A><BR><A HREF="javascript:keyscan(4)" onMouseOver="keyscan(4)"><IMG WIDTH=64 HEIGHT=32 SRC="btn13.gif"></A><BR><BR><P> <A HREF="javascript:starter()"><IMG SRC="btn3.gif"></A></CENTER> <SCRIPT LANGUAGE="JavaScript"> <!-- ver=navigator.appVersion len=ver.length for(iln=0;iln<len;iln++) if(ver.charAt(iln)=="(") break systm = ver.charAt(iln+1).toUpperCase() if(systm !="C"){ document.write("<BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P>") document.write("<BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P>") document.write("<BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P>") document.write("<BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P>") document.write("<BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P><BR><P>") } //--> </SCRIPT> <INPUT TYPE="text" NAME="tenkey" SIZE=1 VALUE = "" > <INPUT TYPE="button" NAME="DUM" VALUE=""> </FORM> </BODY> </HTML>

PMAN

<HTML>
<FORM NAME="PMAN">
<HEAD>
<TITLE>Pman</TITLE>

<SCRIPT LANGUAGE="JavaScript">
<!--
var timerID = null
var timerINT = 300                            //interval (ms)
var tmps = new Array(20);                     //temp array
var mapd = new Array(420);                    //map data array
var inkey = 0                                 //mouse status
var acti = 0                                  //on play and key flag
var ptnflg = 0                                //paturn flag
var myX = 0
var myY = 0
var myPOS=0
var myPTN=4
var myPOSold=313
var score=0
var remain=157
var ofno=0
var acno=0
var enno=0
var oldDOT = new Array(5);
var enewait = new Array(5);
var eneacti = new Array(5);
var eneX = new Array(5);
var eneY = new Array(5);
var enePOS = new Array(5);
var enePOSold = new Array(5);
var bluewait = 0
var blueflag=1
var blueacti=0
var bonus = 100
var URAWAZA = 1
var URAflag = 0

var icons = new Array(20);                          //chr image
icons[0] =new Image();icons[0].src ="bl0.gif";
icons[1] =new Image();icons[1].src ="block.gif";
icons[2] =new Image();icons[2].src ="dots.gif";
icons[3] =new Image();icons[3].src ="dotl.gif";
icons[4] =new Image();icons[4].src ="pman0.gif";
icons[5] =new Image();icons[5].src ="pman1.gif";
icons[6] =new Image();icons[6].src ="pman2.gif";
icons[7] =new Image();icons[7].src ="pman3.gif";
icons[8] =new Image();icons[8].src ="pman4.gif";
icons[9] =new Image();icons[9].src ="gate.gif";
icons[10]=new Image();icons[10].src="enemy1.gif";
icons[11]=new Image();icons[11].src="enemy2.gif";
icons[12]=new Image();icons[12].src="enemy3.gif";
icons[13]=new Image();icons[13].src="enemy4.gif";
icons[14]=new Image();icons[14].src="enemy5.gif";

//restarter
function restarter(){
document.PMAN.CTRL.value="0"
tmpacti="0"
readstyle()
PARAset()
}


//init
function init(){
PARAset()

  timerID = setTimeout("interval1()",timerINT)

}

function PARAset(){
score=0
remain=157
myX=9
myY=16
myPOSold=313
ptnflg=0
enewait[1]=0
enewait[2]=10
enewait[3]=20
enewait[4]=30
eneacti[1]=1
eneacti[2]=2
eneacti[3]=1
eneacti[4]=2
eneX[1]=9
eneY[1]=8
eneX[2]=8
eneY[2]=10
eneX[3]=9
eneY[3]=10
eneX[4]=10
eneY[4]=10
enePOSold[1]=161
enePOSold[2]=198
enePOSold[3]=199
enePOSold[4]=200
oldDOT[1]=0
oldDOT[2]=0
oldDOT[3]=0
oldDOT[4]=0
bluewait=0
blueflag=1
blueacti=0
bonus = 100
URAWAZA = 1
URAflag = 0
}


function interval1(){
tmpacti=document.PMAN.CTRL.value
  clearTimeout(timerID)
  timerID = setTimeout("interval1()",timerINT)

//restart check
  if (tmpacti == "11"){
     tmpURA=parent.Pcontrol.document.Pcontrol.MES.value
     URAWAZA=1
     URAflag=0
     if (tmpURA == "EASY"){URAWAZA=4}
     if (tmpURA == "EASIEST"){URAWAZA=2}

     if (score == 0){document.PMAN.CTRL.value="1"
                     tmpacti="1"
     }else{restarter()}
  }

//active flag check
if (tmpacti != "0"){
  blueflag=1
  if (bluewait > 0){
   bluewait=bluewait-1
   blueflag=-1
  }else{
   blueacti=0
  }

  //new left check
  if (tmpacti == "1"){
     tmppos=myY*19+myX-1
     if (mapd[tmppos] != 1){acti=1}
     if (myX == 0){acti=1}
  }
  //new right check
  if (tmpacti == 3){
     tmppos=myY*19+myX+1
     if (mapd[tmppos] != 1){acti=3}
     if (myX == 18){acti=3}
  }
  //new up check
  if (tmpacti == 2){
     tmppos=myY*19-19+myX
     if (mapd[tmppos] != 1){acti=2}
  }
  //new down check
  if (tmpacti == 4){
     tmppos=myY*19+19+myX
     if (mapd[tmppos] != 1){acti=4}
  }



  //left check
  if (acti == 1){
     tmppos=myY*19+myX-1
     if (mapd[tmppos] != 1){myX=myX-1
     }else{if (myX == 0){myX=18
           }else{if (mapd[tmppos-18] != 1){acti=2
                 parent.Pcontrol.document.Pcontrol.tenkey.value="8"
                 }else{acti=4
                 parent.Pcontrol.document.Pcontrol.tenkey.value="2"
                 }
           }
     }
  }
  //right check
  if (acti == 3){
     tmppos=myY*19+myX+1
     if (mapd[tmppos] != 1){myX=myX+1
     }else{if (myX == 18){myX=0
          }else{if (mapd[tmppos-20] != 1){acti=2
                parent.Pcontrol.document.Pcontrol.tenkey.value="8"
                }else{acti=4
                parent.Pcontrol.document.Pcontrol.tenkey.value="2"
                }
          }
     }
  }
  //up check
  if (acti == 2){
     tmppos=myY*19-19+myX
     if (mapd[tmppos] != 1){myY=myY-1
     }else{if (mapd[tmppos+18] != 1){acti=1
                                     myX=myX-1
           parent.Pcontrol.document.Pcontrol.tenkey.value="4"
          }else{acti=3
           myX=myX+1
           parent.Pcontrol.document.Pcontrol.tenkey.value="6"
          }
     }
  }
  //down check
  if (acti == 4){
     tmppos=myY*19+19+myX
     if (mapd[tmppos] != 1){myY=myY+1
     }else{if (mapd[tmppos-20] != 1){acti=1
                                     myX=myX-1
           parent.Pcontrol.document.Pcontrol.tenkey.value="4"
          }else{acti=3
           myX=myX+1
           parent.Pcontrol.document.Pcontrol.tenkey.value="6"
          }
     }
  }

//move P-MAN
  myPOS=myY*19+myX
  ptnflg=ptnflg+1
  myPTN=4
  if (ptnflg == 2){ptnflg=0
  }else{myPTN=4+acti
  }

//move enemy

tmpURAflag=1
URAflag=URAflag+1
if (URAflag >= URAWAZA){
  tmpURAflag=0
  URAflag=0
}
if (URAWAZA == 1){tmpURAflag=1}

if (blueflag == -1){
 blueacti=blueacti+1
 if (blueacti == 2){blueacti=0}
}

for (ij=1; ij<5; ij++){
  enno=ij
  if (blueacti !=1){
                    if (tmpURAflag == 1){calenemy()}
                    }
  enePOS[ij]=eneY[ij]*19+eneX[ij]
}


//score check
  if (mapd[myPOS] == 2){mapd[myPOS]=0
                        remain=remain-1
                        score=score+10}
  if (mapd[myPOS] == 3){mapd[myPOS]=0
                        remain=remain-1
                        bluewait=30
                        blueacti=0
                        bonus=100
                        score=score+50}
  parent.Pcontrol.document.Pcontrol.MES.value=score+"pts"

//ending
  for (iz=1; iz<5; iz++){
    if (enePOSold[iz] == myPOS){
      if (enePOS[iz] == myPOSold){
        enePOS[iz]=myPOS
      }
    }
    if (enePOS[iz] == myPOS){
      if (blueflag == 1){
        document.PMAN.CTRL.value="0"
        parent.Pcontrol.document.Pcontrol.MES.value=score+"pts NG"
      }else{
        enewait[iz]=5
        enePOS[iz]=199
        eneX[iz]=9
        eneY[iz]=10
        eneacti[iz]=1
        score=score+bonus
        bonus=bonus*2
        parent.Pcontrol.document.Pcontrol.MES.value=score+"pts"
      }
    }
  }
  if (remain == 0){document.PMAN.CTRL.value="0"
     parent.Pcontrol.document.Pcontrol.MES.value=score+"pts OK"
  }


//old CHR clear
  SetIcon(0,myPOSold)
  for (ij=1; ij<5; ij++){
  SetIcon(oldDOT[ij],enePOSold[ij])
  }

//new CHR write
  mapd[myPOS]=0
  SetIcon(myPTN,myPOS)
  myPOSold=myPOS
  for (ij=1; ij<5; ij++){
  tmpenePOS=enePOS[ij]
  oldDOT[ij]=mapd[tmpenePOS]
  tmpenePTN=14
  if (bluewait == 0){tmpenePTN=9+ij}
  if (bluewait == 2){tmpenePTN=9+ij}
  if (bluewait == 4){tmpenePTN=9+ij}
  if (bluewait == 6){tmpenePTN=9+ij}
  if (bluewait == 8){tmpenePTN=9+ij}
  if (bluewait == 10){tmpenePTN=9+ij}

  SetIcon(tmpenePTN,tmpenePOS)
  enePOSold[ij]=enePOS[ij]
  }
}
}

//paturn write
function SetIcon(flag, position){
document.images[position].src=icons[flag].src;
}


function readstyle(){
for (id=0; id<22; id++){;
for (ie=0; ie<19; ie++){;
 ig = tmps[id].charAt(ie);
 ih = id*19+ie;
   if (ig == "0"){mapd[ih] = 0};
   if (ig == "1"){mapd[ih] = 1};
   if (ig == "2"){mapd[ih] = 2};
   if (ig == "3"){mapd[ih] = 3};

   SetIcon (mapd[ih],ih);
};
};
SetIcon(9,180)
SetIcon(10,161)
SetIcon(11,198)
SetIcon(12,199)
SetIcon(13,200)
}


function calenemy(){
 if (enewait[enno] >= 1){
   if (enewait[enno] == 1){
                           SetIcon(oldDOT[enno],enePOSold[enno])
                           eneX[enno]=9
                           eneY[enno]=8
   }
   enewait[enno]=enewait[enno]-1
 }else{
   if (enno == 1){enetype1()}
   if (enno == 2){enetype2()}
   if (enno == 3){enetype3()}
   if (enno == 4){enetype4()}
 }
}

function offsetcal(acno){
if (acno == 1){ofno=-1}
if (acno == 2){ofno=-19}
if (acno == 3){ofno=1}
if (acno == 4){ofno=19}
}

function eneXYcal(){
if (eneacti[enno] == 1){eneX[enno]=eneX[enno]-1}
if (eneacti[enno] == 2){eneY[enno]=eneY[enno]-1}
if (eneacti[enno] == 3){eneX[enno]=eneX[enno]+1}
if (eneacti[enno] == 4){eneY[enno]=eneY[enno]+1}
}

function enetype1(){
//crossing chaser

tmpLR=0
tmpeneacti1=eneacti[enno]+1
if (tmpeneacti1 >= 5){tmpeneacti1=tmpeneacti1-4}
offsetcal(tmpeneacti1)
tmpenepos=eneY[enno]*19+eneX[enno]+ofno
if (mapd[tmpenepos] != 1){tmpLR=1}
tmpeneacti1=eneacti[enno]+3
if (tmpeneacti1 >= 5){tmpeneacti1=tmpeneacti1-4}
offsetcal(tmpeneacti1)
tmpenepos=eneY[enno]*19+eneX[enno]+ofno
if (mapd[tmpenepos] != 1){tmpLR=1}
if (eneX[enno] == 18){tmpLR=1}
if (eneX[enno] == 0){tmpLR=1}
if (tmpLR == 1){
 eneacti[enno]=0
 if (myX*blueflag >= eneX[enno]*blueflag){
  tmpenepos=eneY[enno]*19+eneX[enno]+1
  if (mapd[tmpenepos] != 1){eneacti[enno]=3}
 }else{
  tmpenepos=eneY[enno]*19+eneX[enno]-1
  if (mapd[tmpenepos] != 1){eneacti[enno]=1}
 }
 tmpsubY=myY-eneY[enno]
 if (tmpsubY <= 0){tmpsubY=-tmpsubY}
 tmpsubX=myX-eneX[enno]
 if (tmpsubX <= 0){tmpsubX=-tmpsubX}
 tmpsubXY=tmpsubY-tmpsubX
 if (eneacti[enno] == 0){tmpsubXY=1}
 if (tmpsubXY*blueflag >= 0){
  if (myY*blueflag >= eneY[enno]*blueflag){
   tmpenepos=eneY[enno]*19+eneX[enno]+19
   if (mapd[tmpenepos] != 1){eneacti[enno]=4}
  }else{
   tmpenepos=eneY[enno]*19+eneX[enno]-19
   if (mapd[tmpenepos] != 1){eneacti[enno]=2}
  }
 }
 if (eneacti[enno] == 0){
  tmpenepos=eneY[enno]*19+eneX[enno]-1
  if (mapd[tmpenepos] != 1){eneacti[enno]=1}
  if (eneacti[enno] == 0){
   tmpenepos=eneY[enno]*19+eneX[enno]-19
   if (mapd[tmpenepos] != 1){eneacti[enno]=2}
   if (eneacti[enno] == 0){
    tmpenepos=eneY[enno]*19+eneX[enno]+1
    if (mapd[tmpenepos] != 1){eneacti[enno]=3
    }else{eneacti[enno]=4
    }
   }
  }
 }
}
 eneXYcal()
}

function enetype2(){
//straight lover

offsetcal(eneacti[enno])
tmpenepos=eneY[enno]*19+eneX[enno]+ofno
if (mapd[tmpenepos] == 1){
 eneacti[enno]=0
 if (myX*blueflag >= eneX[enno]*blueflag){
  tmpenepos=eneY[enno]*19+eneX[enno]+1
  if (mapd[tmpenepos] != 1){eneacti[enno]=3}
 }else{
  tmpenepos=eneY[enno]*19+eneX[enno]-1
  if (mapd[tmpenepos] != 1){eneacti[enno]=1}
 }
 tmpsubY=myY-eneY[enno]
 if (tmpsubY <= 0){tmpsubY=-tmpsubY}
 tmpsubX=myX-eneX[enno]
 if (tmpsubX <= 0){tmpsubX=-tmpsubX}
 tmpsubXY=tmpsubY-tmpsubX
 if (eneacti[enno] == 0){tmpsubXY=1}
 if (tmpsubXY*blueflag >= 0){
  if (myY*blueflag >= eneY[enno]*blueflag){
   tmpenepos=eneY[enno]*19+eneX[enno]+19
   if (mapd[tmpenepos] != 1){eneacti[enno]=4}
  }else{
   tmpenepos=eneY[enno]*19+eneX[enno]-19
   if (mapd[tmpenepos] != 1){eneacti[enno]=2}
  }
 }
 if (eneacti[enno] == 0){
  tmpenepos=eneY[enno]*19+eneX[enno]-1
  if (mapd[tmpenepos] != 1){eneacti[enno]=1}
  if (eneacti[enno] == 0){
   tmpenepos=eneY[enno]*19+eneX[enno]-19
   if (mapd[tmpenepos] != 1){eneacti[enno]=2}
   if (eneacti[enno] == 0){
    tmpenepos=eneY[enno]*19+eneX[enno]+1
    if (mapd[tmpenepos] != 1){eneacti[enno]=3
    }else{eneacti[enno]=4
    }
   }
  }
 }
}
 eneXYcal()
}

function enetype3(){
//crossing turner

tmpeneacti1=eneacti[enno]+1
if (tmpeneacti1 >= 5){tmpeneacti1=tmpeneacti1-4}
tmptmpacti=eneacti[enno]
eneacti[enno]=0
turncheck()
if (eneacti[enno] == 0){
 tmpeneacti1=eneacti[enno]+3
 if (tmpeneacti1 >= 5){tmpeneacti1=tmpeneacti1-4}
 turncheck()
}
if (eneacti[enno] == 0){
eneacti[enno]=tmptmpacti

offsetcal(eneacti[enno])
tmpenepos=eneY[enno]*19+eneX[enno]+ofno
if (mapd[tmpenepos] == 1){

 eneacti[enno]=0
 if (myX*blueflag >= eneX[enno]*blueflag){
  tmpenepos=eneY[enno]*19+eneX[enno]+1
  if (mapd[tmpenepos] != 1){eneacti[enno]=3}
 }else{
  tmpenepos=eneY[enno]*19+eneX[enno]-1
  if (mapd[tmpenepos] != 1){eneacti[enno]=1}
 }
 tmpsubY=myY-eneY[enno]
 if (tmpsubY <= 0){tmpsubY=-tmpsubY}
 tmpsubX=myX-eneX[enno]
 if (tmpsubX <= 0){tmpsubX=-tmpsubX}
 tmpsubXY=tmpsubY-tmpsubX
 if (eneacti[enno] == 0){tmpsubXY=1}
 if (tmpsubXY*blueflag >= 0){
  if (myY*blueflag >= eneY[enno]*blueflag){
   tmpenepos=eneY[enno]*19+eneX[enno]+19
   if (mapd[tmpenepos] != 1){eneacti[enno]=4}
  }else{
   tmpenepos=eneY[enno]*19+eneX[enno]-19
   if (mapd[tmpenepos] != 1){eneacti[enno]=2}
  }
 }
 if (eneacti[enno] == 0){
  tmpenepos=eneY[enno]*19+eneX[enno]-1
  if (mapd[tmpenepos] != 1){eneacti[enno]=1}
  if (eneacti[enno] == 0){
   tmpenepos=eneY[enno]*19+eneX[enno]-19
   if (mapd[tmpenepos] != 1){eneacti[enno]=2}
   if (eneacti[enno] == 0){
    tmpenepos=eneY[enno]*19+eneX[enno]+1
    if (mapd[tmpenepos] != 1){eneacti[enno]=3
    }else{eneacti[enno]=4
    }
   }
  }
 }
}
}
 eneXYcal()
}

function enetype4(){
//everytime chaser

 eneacti[enno]=0
 if (myX*blueflag >= eneX[enno]*blueflag){
  tmpenepos=eneY[enno]*19+eneX[enno]+1
  if (mapd[tmpenepos] != 1){eneacti[enno]=3}
 }else{
  tmpenepos=eneY[enno]*19+eneX[enno]-1
  if (mapd[tmpenepos] != 1){eneacti[enno]=1}
 }
 tmpsubY=myY-eneY[enno]
 if (tmpsubY <= 0){tmpsubY=-tmpsubY}
 tmpsubX=myX-eneX[enno]
 if (tmpsubX <= 0){tmpsubX=-tmpsubX}
 tmpsubXY=tmpsubY-tmpsubX
 if (eneacti[enno] == 0){tmpsubXY=1}
 if (tmpsubXY*blueflag >= 0){
  if (myY*blueflag >= eneY[enno]*blueflag){
   tmpenepos=eneY[enno]*19+eneX[enno]+19
   if (mapd[tmpenepos] != 1){eneacti[enno]=4}
  }else{
   tmpenepos=eneY[enno]*19+eneX[enno]-19
   if (mapd[tmpenepos] != 1){eneacti[enno]=2}
  }
 }
 if (eneacti[enno] == 0){
  tmpenepos=eneY[enno]*19+eneX[enno]-1
  if (mapd[tmpenepos] != 1){eneacti[enno]=1}
  if (eneacti[enno] == 0){
   tmpenepos=eneY[enno]*19+eneX[enno]-19
   if (mapd[tmpenepos] != 1){eneacti[enno]=2}
   if (eneacti[enno] == 0){
    tmpenepos=eneY[enno]*19+eneX[enno]+1
    if (mapd[tmpenepos] != 1){eneacti[enno]=3
    }else{eneacti[enno]=4
    }
   }
  }
 }
 eneXYcal()
}

function turncheck(){
 if (tmpeneacti1 == 1){
  if (myX*blueflag < eneX[enno]*blueflag){
    tmpenepos=eneY[enno]*19+eneX[enno]-1
    if (mapd[tmpenepos] != 1){eneacti[enno]=1}
  }
 }
 if (tmpeneacti1 == 3){
  if (myX*blueflag > eneX[enno]*blueflag){
    tmpenepos=eneY[enno]*19+eneX[enno]+1
    if (mapd[tmpenepos] != 1){eneacti[enno]=3}
  }
 }
 if (tmpeneacti1 == 2){
  if (myY*blueflag < eneY[enno]*blueflag){
    tmpenepos=eneY[enno]*19+eneX[enno]-19
    if (mapd[tmpenepos] != 1){eneacti[enno]=2}
  }
 }
 if (tmpeneacti1 == 4){
  if (myY*blueflag < eneY[enno]*blueflag){
    tmpenepos=eneY[enno]*19+eneX[enno]+19
    if (mapd[tmpenepos] != 1){eneacti[enno]=4}
  }
 }
}


//-->
</SCRIPT>
</HEAD>
<html>
<BODY TEXT="#FFFFFF" LINK="#FFFFFF" VLINK="#999999" ALINK="#00FF00" BGCOLOR="#000000" ONLOAD="init()">
<SCRIPT LANGUAGE="JavaScript">
<!--
//screen fill
document.write("<PRE><CENTER>");
for (iad=0; iad<22; iad++){;
for (iac=0; iac<19; iac++){document.write("<IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC='bl0.gif'>")};
document.write("<BR>");
};
document.write("</CENTER></PRE>");

tmps[0] ="1111111111111111111";
tmps[1] ="1222222221222222221";
tmps[2] ="1211211121211121121";
tmps[3] ="1311211121211121131";
tmps[4] ="1222222222222222221";
tmps[5] ="1211212111112121121";
tmps[6] ="1222212221222122221";
tmps[7] ="1111211101011121111";
tmps[8] ="1111210000000121111";
tmps[9] ="1111210111110121111";
tmps[10]="0000200100010020000";
tmps[11]="1111210111110121111";
tmps[12]="1111210000000121111";
tmps[13]="1111210111110121111";
tmps[14]="1222222221222222221";
tmps[15]="1211211121211121121";
tmps[16]="1321222222222221231";
tmps[17]="1121212111112121211";
tmps[18]="1222212221222122221";
tmps[19]="1211111121211111121";
tmps[20]="1222222222222222221";
tmps[21]="1111111111111111111";
//read style data
readstyle();
//-->
</SCRIPT>
<BR>Gesteuert wird mit:
<BR>8-Oben
<BR>4-Links
<BR>6-Rechts
<BR>2 Unten

<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>



<INPUT TYPE="text" NAME="CTRL" SIZE=10 VALUE = "0" >

</BODY>
</FORM>
</HTML>

WOW das ist langer Code. Ich stelle die Dateien als Download zur Verfügung

Tetris

Tetris https://loewenhagen.de/Games/tetris/TETRIS.HTM

Print Friendly, PDF & Email

There are no comments

Leave a Reply

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

NEWS



Atomuhr
Kalender


Cookie Consent mit Real Cookie Banner