«

»

সাহায্য চাই………।।

 

Can anybody would like to

give me the code of ludu snake game in c ……

Than it will be great pleasure to me….


এ সম্পর্কিত আরো কিছু টুইট:

মন্তব্য দিনঃ

comments

About the author

Rahad

Permanent link to this article: http://techtweets.com.bd/help/rahad/3205

1 comment

  1. saiam

    ডি এক্স বলের কোডিং টা দেখতে পারেন

    Meshkat DX Ball

    <!–

    var timerID = null
    var INT = 90
    var loadFLG=0
    var gameFLG=0
    var missFLG=0
    var tim = 0 //time
    var blcol = new Array(5) //block color
    var blsta = new Array(40) //block status
    var blclr = 0 //clear block
    var ballX = 0 //ball data
    var ballY = 0
    var ballN = 3
    var ballDX= 0
    var ballDY= 0
    var tmpRL = 193
    var keyP=0
    var keyPr=0
    var endFLG=0

    blcol[0]="#FFFF00"
    blcol[1]="#FFB000"
    blcol[2]="#FF8000"
    blcol[3]="#FF4000"
    blcol[4]="#FF0000"
    blcol[5]="#000000"

    var ieFLG=0
    var n4FLG=0
    if (document.all){
    ieFLG=1
    }else{
    if (document.getElementById){
    n4FLG=0
    }else{
    n4FLG=1
    }
    }

    //—————————————–
    //————- main function ————-
    //—————————————–

    function mainF(){
    clearTimeout(timerID)
    tim=tim+1
    with (Math){tmptim=floor(tim/10)}
    tmptc=""
    tmptb=tim/10
    if (tim==tmptim*10){tmptc=".0"}
    ballX=ballX+ballDX
    ballY=ballY+ballDY
    outCHK()
    blkCHK()
    if (document.getElementById){
    document.SC.TM.value=tmptb+tmptc
    document.SC.CL.value=blclr
    document.SC.SR.value=blclr*200-tim
    document.getElementById("ball").style.top = ballY
    document.getElementById("ball").style.left = ballX
    }else{
    if (ieFLG==1){
    document.SC.TM.value=tmptb+tmptc
    document.SC.CL.value=blclr
    document.SC.SR.value=blclr*200-tim
    ball.style.posTop = ballY
    ball.style.posLeft = ballX
    }else{
    document.layers["info"].document.forms[0].TM.value=tmptb+tmptc
    document.layers["info"].document.forms[0].CL.value=blclr
    document.layers["info"].document.forms[0].SR.value=blclr*200-tim
    document.layers["ball"].moveTo(ballX,ballY)
    }
    }
    racketMove()
    if (gameFLG==1){timerID = setTimeout("mainF()",INT)}
    }

    //—————————————–
    //————- sub functions ————-
    //—————————————–

    //game init
    function initG(){
    keyP=0
    if (endFLG == 0){
    endFLG=1
    blclr=0
    tim=0
    ballN=3
    with (Math){tmptim=floor(tim/10)}
    if (document.getElementById){
    document.SC.TM.value=tmptim
    document.getElementById("ovrmes").style.top=-1000
    document.getElementById("clrmes").style.top=-1000
    }else{
    if (ieFLG==1){
    document.SC.TM.value=tmptim
    clrmes.style.top=-1000
    ovrmes.style.top=-1000
    }else{
    document.layers["info"].document.forms[0].TM.value=tmptim
    document.layers["ovrmes"].visibility="HIDE"
    document.layers["clrmes"].visibility="HIDE"
    }
    }
    for (ib=0; ib<5; ib++){for (ia=0; ia=0){
    if (keyPr != 0){
    if (Math.abs(keyPr)<15){keyPr=keyPr*1.2}
    }else{
    keyPr=keyP
    }
    }else{
    keyPr=keyP
    }
    }else{
    keyPr=0
    }
    tmpRL=tmpRL+keyPr
    if (tmpRL370){tmpRL=370}
    if (document.getElementById){
    document.getElementById(“racket”).style.left=tmpRL
    }else{
    if (ieFLG==1){
    racket.style.left=tmpRL
    }else{
    document.layers[“racket”].left=tmpRL
    }
    }
    }
    }

    //wall and racket check
    function outCHK(){
    if (ballX 401){ballX=802-ballX;ballDX=-ballDX}
    if (ballY = 272){
    if (missFLG==0){
    tmpX=(ballDX/ballDY)*(272-ballY)+ballX
    if (tmpX >= tmpRL-12){
    if (tmpX <= tmpRL+42){
    ballY=272;ballDY=-ballDY
    ballX=tmpX
    ballRD=tmpX-tmpRL
    with (Math){ballDX=8*abs(ballDX)/ballDX}
    if (ballRD36){ballDX=15}
    if (ballRD>=14){if (ballRD=17){if (ballRD=0){if (ballRD=28){if (ballRD=-4){if (ballRD=33){if (ballRD0){missFLG=1}
    }else{
    if (ballY>290){missFLG=0;ballN=ballN-1;gameEnd()}
    }
    }
    }

    //block check
    function blkCHK(){
    tmpY=ballY+4;tmpX=ballX+4
    if (tmpY>=48){if (tmpY=29){if (tmpX<=396){
    with (Math) {
    ia=floor((tmpX-29)/46);ib=floor((tmpY-48)/20);ic=ib*8+ia
    }
    if (blsta[ic]= 40){gameEnd()}

    if (ballDX>0){
    iy=(ballDY/ballDX)*(29+46*ia-tmpX)+tmpY
    if (iy>48+20*ib+18){
    tmpY1=48+20*ib+18
    tmpX1=(ballDX/ballDY)*(48+20*ib+18-tmpY)+tmpX
    ballX=tmpX1-4;ballY=tmpY1-4
    ballDY=-ballDY
    }else{
    if (iy48+20*ib+18){
    tmpY1=48+20*ib+18
    tmpX1=(ballDX/ballDY)*(48+20*ib+18-tmpY)+tmpX
    ballX=tmpX1-4;ballY=tmpY1-4
    ballDY=-ballDY
    }else{
    if (iy= 40){
    document.getElementById(“clrmes”).style.top=150
    endFLG=0
    }
    if (ballN = 40){
    clrmes.style.top=150
    endFLG=0
    }
    if (ballN = 40){
    document.layers[“clrmes”].visibility=”SHOW”
    endFLG=0
    }
    if (ballN

    <!–
    //block layer write

    for (ib=0; ib<5; ib++){
    for (ia=0; ia<8; ia++){
    tmpL=31+46*ia;tmpT=50+20*ib
    tmpIDn=ib*8+ia+1
    if (n4FLG!=1){
    document.write("”)
    }else{
    document.write(“”)
    }
    blsta[ib*8+ia]=ib
    }
    }
    //–>

    <!–
    if (n4FLG==1){
    document.write(' ‘)
    }else{
    document.write(”)
    }
    //–>

    HARD BLOCK

    BALL :
    TIME :
    BLOCK:
    SCORE:

    <!–
    if (n4FLG==1){
    document.write('’)
    }else{
    document.write(”)
    }
    //–>

    ALL CLEAR!

    <!–
    if (n4FLG==1){
    document.write('’)
    }else{
    document.write(”)
    }
    //–>

    GAME OVER!

    <!–
    if (n4FLG==1){
    document.write('’)
    }else{
    document.write(”)
    }
    //–>

    Left = 4 key
    Right = 6 key
    START = S key

মন্তব্য করুন