النتائج 1 إلى 3 من 3

الموضوع: اصدار جديد للعبة ثلاثية الأبعاد ساعدوني عشان انزلها لكم

  1. #1
    التسجيل
    03-01-2007
    المشاركات
    48

    اصدار جديد للعبة ثلاثية الأبعاد ساعدوني عشان انزلها لكم

    السلام عليكم

    انا صممت لعبة 3d

    ممتازة

    وببرنامد الدارك بيسيك

    عندي مشكلة

    وهي

    لما اجي اصمم الملف التنفيذي exe

    يقول لي عندي مشكلة بالكود

    ويضهر ليي رسالة

    function call "wrapvalue" expects parameters in brackets at line 91

    عموما دا هو الكود مال اللعبة

    عدلوه وضبطوه ليي

    وعلموني ايش مشكلتي بالبرمجة

    عشان املي لكم المنتدى بألعاب 3d

    دا هو الكود

    كود PHP:
    REM Projectthe dead fight demo
    REM Created
    16/01/2007 04:11:17 ã
    REM
    REM 
    ***** Main Source File *****
    REM
    rem tut3a
    rem inetial settings
    sync on 
    sync rate 100
    backdrop off 
    hide mouse
    rem load all media 
    for game
    gosub _load_game
    rem setup all objects 
    for game
    gosub _setup_game
    rem tut3b
    rem game loop
    do
     
    rem Control game elements
     gosub _control_player
     gosub _control_gunandbullet
     gosub _control_enemies
     rem Update screen
     sync
    rem End loop
    loop
    rem TUT3C
    _control_player
    :
    return
    _control_gunandbullet:
    return
    _control_enemies:
    return
    _control_stats:
    return
    _setup_game:
    return
    _load_game:
    return
    rem TUT4A
    rem Load b3d world 
    and sky model
    load bsp 
    "beah\b.b3d","b.b3d"
    SkyObj=load object "beah\b.b3d",SkyObj

    rem TUT4B
    rem Setup camera
    set camera range 1
    ,10000
    autocam off
    rem Setup sky model
    set object SkyObj
    ,1,0,0,0,0,0,0
    scale object SkyObj
    ,20,20,20

    rem TUT4C
    rem Select font
    set text font 
    "arial" set text size 16
    set text to bold 
    set text transparent
    rem Loading prompt
    sync 
    center text screen width()/2,screen height()/2,"LOADING" sync

    rem TUT5A
    rem Trigger player initialisation
    restart
    =1
    rem TUT5B
    rem In 
    case of restart
    if restart=1
       restart
    =0
       set bsp collision off 1
       rotate camera 0
    ,0,0
       position camera 2
    ,2,2
       set bsp camera collision 1
    ,0,0.75,0
    endif
    rem TUT5C
    rem Control player direction
    rotate camera camera angle x
    (0)+(mousemovey()/2.0),camera angle y(0)+(mousemovex()/2.0),0
    rem Control player movement
    cx
    #=camera angle x(0) : cy#=camera angle y(0)
    if upkey()=1 then xrotate camera 0,move camera 0,0.2 xrotate camera 0,cx#
    if downkey()=1 then xrotate camera 0,move camera 0,-0.2 xrotate camera 0,cx#
    if leftkey()=1 then yrotate camera 0,cy#-90 : move camera 0.2 : yrotate camera 0,cy#
    if rightkey()=1 then yrotate camera 0,cy#+90 : move camera 0.2 : yrotate camera 0,cy#
    if wrapvalue(camera angle x(0))>40 and wrapvalue(camera angle x(0))180 then xrotate camera 0,40
    if wrapvalue(camera angle x(0))>180 and wrapvalue(camera angle x(0))280 then xrotate camera 0,280
    rem Apply simple gravity to player
    position camera camera position x
    (),camera position y()-0.1,camera position z()

    rem TUT5D
    rem Player is always focal point of sky
    position object SkyObj
    ,camera position x(),camera position y(),camera position z()
    rem Position listener at player for 3D sound
    position listener camera position x
    (),camera position y(),camera position z()
    rotate listener camera angle x(),camera angle y(),camera angle z()
    rem TUT6A
    rem Load model 
    for gun
    GunObj
    =load object "gun\gan.x",GunObj
    rem Load all sounds
    GunSnd
    =load sound "sounds\gan.wav",GunSnd
    ImpactSnd
    =load 3dsound "sounds\impact.wav",ImpactSnd
    DieSnd
    =load sound "sounds\die.wav",DieSnd
    rem Load music 
    (WAV best for looping)
    MusicSnd=101 load sound "sounds\ingame.wav",MusicSnd
    loop sound MusicSnd 
    set sound volume MusicSnd,80
    rem Load images
    FireImg
    =load image "fire.bmp",FireImg
    CrossHairImg
    =load image "crosshair.bmp",CrossHairImg
    rem TUT6B
    rem Setup gun 
    for player
    lock object on GunObj
    scale object GunObj
    ,2,2,4
    rotate object GunObj
    ,270,0,0
    position object GunObj
    ,0.5,-1,2
    disable object zdepth GunObj
    rem Create object 
    for bullet
    BulletObj
    =make object cube BulletObj,0.1
    rem Create simple sprite based crosshair
    sprite 1
    ,320-16,240-16,CrossHairImg
    set sprite 1
    ,0,1

    rem TUT6C
    rem Control gun firing
    if mouseclick()=and bullet=-50
     bullet
    =100
     play sound GunSnd
     position object BulletObj
    ,camera position x(0),camera position y(0),camera position z(0)
     
    rotate object BulletObj,camera angle x(0),camera angle y(0),0
     set bsp object collision 2
    ,BulletObj,0.1,1
     move object BulletObj
    ,0.2
    endif
    rem TUT6D
    rem Control life of bullet
    if bullet>0
     rem 
    If bullet collides with BSP world
     
    if bsp collision hit(2)=or bulletimpact=1
      rem End bullet on wall
      position sound ImpactSnd
    ,object position x(BulletObj), object position y(BulletObj), object position z(BulletObj)
      
    play sound ImpactSnd
      bulletimpact
    =0
      bullet
    =0
     
    else
      
    rem Move bullet
      dec bullet
      move object BulletObj
    ,0.5
     
    endif
     
    rem Bullet dies
     
    if bullet=0
      set bsp collision off 2
     
    endif
    else
     
    rem Gun recharge phase
     
    if bullet>-50 then dec bullet
    endif
    rem TUT7A
    rem Load models 
    for enemies
    EneObj
    =11
    for ene=EneObj to EneObj+4
     load object 
    "enemy\hn.x",ene
     append object 
    "enemy\Hm.x"enetotal object frames(ene)+1
     position object ene
    ,2,2,4
     loop object ene
    ,0,25
    next ene

    rem TUT7B
    EnemySnd
    =11 load 3dsound "sounds\enemy.wav",EnemySnd
    EnemygunSnd
    =12 load 3dsound "sounds\enemygun.wav",EnemygunSnd
    EnemydieSnd
    =13 load 3dsound "sounds\enemydie.wav",EnemydieSnd

    rem TUT7C
    rem Variable 
    for finding closest enemy
    cdist
    #=9999.99
    rem Handle enemies within world
    for ene=EneObj to EneObj+4
     rem 
    If enemy alive
     
    if object visible(ene)=1
     rem Kill this enemy
     killenemy
    =0
     rem Move enemy on a slow curve 
    for appearance of intelligence
     
    if object angle z(ene)=0
       yrotate object ene
    ,wrapvalue(object angle y(ene)+2)
     endif
     if 
    object angle z(ene)=1
      yrotate object ene
    ,wrapvalue(object angle y(ene)-2)
     endif
     if 
    object angle z(ene)=2
      move object ene
    ,0.05
     
    else
      
    move object ene,0.02
     
    endif
     
    rem Switch direction of curve based on a random value
     
    if rnd(200)=1 then zrotate object ene,rnd(1)
     
    rem Handle gravity for enemy
     position object ene
    ,object position x(ene),object position y(ene)-0.01,object position z(ene)
     
    rem Work out angle and distance between enemy and player
     dx
    #=camera position x(0)-object position x(ene)
     
    dy#=camera position y(0)-object position y(ene)
     
    dz#=camera position z(0)-object position z(ene)
     
    dist#=abs(sqrt(abs(dx#*dx#)+abs(dy#*dy#)+abs(dz#*dz#)))
     
    viewa#=wrapvalue(atanfull(dx#,dz#))
     
    obja#=wrapvalue(object angle y(ene))
     
    if viewa#>180 then viewa#=viewa#-360
     
    if obja#>180 then obja#=obja#-360
     
    rem Closest enemy emits the enemy sound
     
    if dist#26+25 and object visible(ene)=1
      
    killenemy=1
     
    endif
     if 
    killenemy=1
      set bsp collision off 3
    +(ene-EneObj)
      
    hide object ene dec aliensleft
      killenemy
    =0
     
    endif
     
    rem If enemy alive ENDIF
     endif
    next ene
    rem TUT7D
    rem Start the enemy presence sound
    loop sound EnemySnd
    scale listener 0.1
    rem TUT8A
    rem 
    If enemy 'facing player' and 'on similar height' and 'close'zoom in
    if abs(viewa#-obja#)10.0 and abs(dy#)5.0 and dist#30.0
     
    if object angle z(ene)>2 then play sound EnemygunSnd
     rotate object ene
    ,0,viewa#,2
     
    set object speed ene,2
    else
     
    set object speed ene,1
    endif
    rem TUT8B
    rem 
    If enemy gets too close to playerplayer dies
    if dist#2.0
     
    play sound DieSnd
     
    for x=0 to 100
      point camera object position x
    (ene), object position y(ene)+(x/20.0), object position z(ene)
      
    sync
     next x
     restart
    =1
     killenemy
    =1
    endif
    rem TUT8C
    rem 
    If enemy and bullet in same spaceenemy dies
    if bullet>0
     
    if object collision(BulletObj,ene)>0
      play sound EnemydieSnd
      play object ene
    ,26,26+50
      set object speed ene
    ,1
      bulletimpact
    =1
     
    endif
    endif
    rem TUT8D
    rem Place enemies throughout world 
    and set BSP collision for them
    aliensleft
    =0
    restore EnemyPosData
    for ene=EneObj to EneObj+4
     read ex
    #,ey#,ez#
     
    position object ene,ex#,ey#,ez#
     
    set bsp object collision 3+(ene-EneObj),ene,0.75,0
     yrotate object ene
    ,180 fix object pivot ene
     inc aliensleft
    next ene
    rem TUT8E
    rem Enemy position data within level
    EnemyPosData
    :
    data -9.27,9.98,-2.78
    data 
    -16.54,-0.22,19.18
    data 2.0
    ,9.0,25.0
    data 
    -2.0,-9.0,25.0
    data 2
    ,4.0,10.0
    rem TUT9A
    rem Distance to next alien
    if aliensleft>0 then text 20,screen height()-40,"DISTANCE READING:"+str$(abs(cdist#*100))
    rem Aliens Left Stat
    s
    $=str$(aliensleft)+" ALIENS LEFT"
    if aliensleft=0 then s$="LEVEL COMPLETE!" stop sound EnemySnd
    text 640
    -20-text width(s$),screen height()-40,s$
    rem TUT9B
    if particles exist(1)=1 then delete particles 1
    make particles 1
    FireImg500.5
    set particle emissions 1
    ,10
    set particle speed 1
    ,0.01
     
    rem TUT9C
    rem Update particle using bullet object position
    set particle emissions 1
    ,1+(bullet/10)
    rotate particles 1,90-object angle x(BulletObj),object angle y(BulletObj)+180,0
    position particles 1
    ,object position x(BulletObj),object position y(BulletObj),object position z(BulletObj)
    rem TUT9D
    set particle emissions 1
    ,
    اتمنى انكم تعلموني ايش خطأي

    عشان اصمم لكم اللعبة كاملة

    ترا رسمها

    اعني الجرافيكس عالي جدا

    يلا انتضر الرد

  2. #2
    التسجيل
    20-08-2004
    الدولة
    الإمارات العربية المتحدة
    المشاركات
    2,452

    رد: اصدار جديد للعبة ثلاثية الأبعاد ساعدوني عشان انزلها لكم

    اخوي موضوعك مخالف في موضوع مثبت للطلبات ضع طلبك هناك

  3. #3
    التسجيل
    04-02-2004
    الدولة
    الزمن
    المشاركات
    455

    رد: اصدار جديد للعبة ثلاثية الأبعاد ساعدوني عشان انزلها لكم

    انا صححت الاخظاء كلها بس عشان خاطر الشباب
    حط سؤالك بموضوع الطلبات و المساعدات و اول ما اشوفه برد عليك و بعطيك الكود المصحح
    و شوية ملاحظات
    دروس الدارك بيسيك
    1
    2
    3
    4
    5

ضوابط المشاركة

  • لا تستطيع إضافة مواضيع جديدة
  • لا تستطيع الرد على المواضيع
  • لا تستطيع إرفاق ملفات
  • لا تستطيع تعديل مشاركاتك
  •