Unconfigured Ad Widget

تقليص

إعـــــــلان

تقليص
لا يوجد إعلان حتى الآن.

للتحكم بالمجسم في حال اللعب -غيم ستوديو -

تقليص
X
 
  • تصفية - فلترة
  • الوقت
  • عرض
إلغاء تحديد الكل
مشاركات جديدة

  • للتحكم بالمجسم في حال اللعب -غيم ستوديو -

    السلام عليكم ورحمة الله وبركاته :
    انتهيت مؤخراً من برمجة تحكم يعطي المصمم القدرة على تغيير خصائص المجسم المعني من خلال اللعب Flags .
    ملاحظات :
    1- دقة الشاشة المطلوبة هي الـ mode 8
    وهي 1024*768 .
    2- أحفظ البرمجة وأضفها عن طريق
    Include <......>;
    يمكنك تغيير دقة الشاشة عن طريق الأمر Video_Switch في الـ Function Main .
    أو عن طريق الأمر F5 .
    3- الدقة المطلوبة لا يوفرها إلا الإصدار التجاري والإحترافي .
    ويمكنك تشغليها على العادي والإضافي عن طريق تعديل كل مواقع الصور .
    طبعاً لابد ان تصمم الصورتين plus و minus بحجم 8*8 بكسل بصيغة Bmp .
    4-تعطي المجسم الـ Action المسمى Lights وتستخدم الزر T لإظهار التحكمات حال اللعب .
    لن تظهر التحكمات في ما أقل من الدقة المذكورة حيث أن موقعها سيكون خارج الشاشة .

    تحياتي .
    إن الآخرين قد يتواجدون لمساعدتنا وتعليمنا وتوجيهنا ، ولكن الدرس الذي يجب أن نتعلمه متروك لنا .

  • #2
    البرمجة

    ///////////Simulator////////////
    //////Created By Asad Allah/////
    ////////////////////////////////
    ////////////////vars////////////
    var fog_shower =0;
    var tran_digt =0;
    var near_digt =0;
    var over_digt =0;
    var flare_digt =0;
    var bright_digt =0;
    var nofog_digt =0;
    var metal_digt =0;
    var nofilter_digt =0;
    var unlit_digt =0;
    var shadow_digt =0;
    var oriented_digt =0;
    var facing_digt =0;
    var decal_digt =0;
    var dlight_digt =0;
    var pass_digt =0;
    ///////////////////Bmaps//////////
    bmap plus =<plus.bmp>;
    bmap minus =<minus.bmp>;
    /////////////////////////////////

    ///////////////ID////////////////
    Entity* light;
    function lights;
    ////////////////////////////////

    ///////////text defines/////////
    text screen_txt_fog_mode
    {
    font = _a4font;
    pos_x = 830;
    pos_y = 20;
    }

    text screen_txt
    {
    pos_x = 820;
    pos_y = 40;
    }

    text screen_txt_end
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 60;
    }

    text screen_txt_fog
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 80;
    }

    text screen_txt_light_prop
    {
    font = _a4font;
    pos_x = 830;
    pos_y = 100;
    }

    text ambient
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 120;
    }

    text albedo
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 140;
    }

    text transparent
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 160;
    }

    text alpha
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 180;
    }

    text overlay
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 200;
    }

    text flare
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 220;
    }

    text bright
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 240;
    }

    text nofog
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 260;
    }

    text metal
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 280;
    }

    text nofilter
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 300;
    }

    text unlit
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 320;
    }

    text shadow
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 340;
    }

    text oriented
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 360;
    }

    text facing
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 380;
    }

    text decal
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 400;
    }

    text near
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 420;
    }

    text dlight
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 440;
    }

    text pass
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 460;
    }

    text dash
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 480;
    }

    text lightrange
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 500;
    }

    text Red
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 520;
    }

    text Green
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 540;
    }

    text Blue
    {
    font = _a4font;
    pos_x = 820;
    pos_y = 560;
    }
    /////////////////////////////////

    ////////////panel////////////////
    panel fog_stat
    {
    pos_x=0;
    pos_y=0;
    /////////////////////////Digits//////////////////////////////////
    DIGITS 900, 40 , 2, _a4font, 1,camera.fog_start;
    DIGITS 900, 60 , 2, _a4font, 1,camera.fog_end;
    DIGITS 900, 80 , 2, _a4font, 1,camera.fog;
    DIGITS 900, 120, 2, _a4font, 1,light.ambient;
    DIGITS 900, 140, 2, _a4font, 1,light.albedo;
    DIGITS 900, 160, 2, _a4font, 1,tran_digt;
    DIGITS 900, 180, 2, _a4font, 1,light.alpha;
    DIGITS 900, 200, 2, _a4font, 1,over_digt;
    DIGITS 900, 220, 2, _a4font, 1,flare_digt;
    DIGITS 900, 240, 2, _a4font, 1,bright_digt;
    DIGITS 900, 260, 2, _a4font, 1,nofog_digt;
    DIGITS 900, 280, 2, _a4font, 1,metal_digt;
    DIGITS 900, 300, 2, _a4font, 1,nofilter_digt;
    DIGITS 900, 320, 2, _a4font, 1,unlit_digt;
    DIGITS 900, 340, 2, _a4font, 1,shadow_digt;
    DIGITS 900, 360, 2, _a4font, 1,oriented_digt;
    DIGITS 900, 380, 2, _a4font, 1,facing_digt;
    DIGITS 900, 400, 2, _a4font, 1,decal_digt;
    DIGITS 900, 420, 2, _a4font, 1,near_digt;
    DIGITS 900, 440, 2, _a4font, 1,dlight_digt;
    DIGITS 900, 460, 2, _a4font, 1,pass_digt;
    DIGITS 900, 500, 2, _a4font, 1,light.lightrange;
    DIGITS 900, 520, 2, _a4font, 1,light.Red;
    DIGITS 900, 540, 2, _a4font, 1,light.Green;
    DIGITS 900, 560, 2, _a4font, 1,light.Blue;


    //////////////////////////////////////////////////////////////////

    //////////////////////////Buttons/////////////////////////////////
    button 935, 40 , plus , plus , plus , increase_start (), null, null;
    button 800, 40 , minus, minus, minus, decrease_start (), null, null;
    button 935, 60 , plus , plus , plus , increase_end (), null, null;
    button 800, 60 , minus, minus, minus, decrease_end (), null, null;
    button 935, 80 , plus , plus , plus , increase_depth (), null, null;
    button 800, 80 , minus, minus, minus, decrease_depth (), null, null;
    button 935, 120, plus , plus , plus , increase_ambient (), null, null;
    button 800, 120, minus, minus, minus, decrease_ambient (), null, null;
    button 935, 140, plus , plus , plus , increase_albedo (), null, null;
    button 800, 140, minus, minus, minus, decrease_albedo (), null, null;
    button 935, 160, plus , plus , plus , increase_trans (), null, null;
    button 800, 160, minus, minus, minus, decrease_trans (), null, null;
    button 935, 180, plus , plus , plus , increase_alpha (), null, null;
    button 800, 180, minus, minus, minus, decrease_alpha (), null, null;
    button 935, 200, plus , plus , plus , increase_overlay (), null, null;
    button 800, 200, minus, minus, minus, decrease_overlay (), null, null;
    button 935, 220, plus , plus , plus , increase_flare (), null, null;
    button 800, 220, minus, minus, minus, decrease_flare (), null, null;
    button 935, 240, plus , plus , plus , increase_bright (), null, null;
    button 800, 240, minus, minus, minus, decrease_bright (), null, null;
    button 935, 260, plus , plus , plus , increase_nofog (), null, null;
    button 800, 260, minus, minus, minus, decrease_nofog (), null, null;
    button 935, 280, plus , plus , plus , increase_metal (), null, null;
    button 800, 280, minus, minus, minus, decrease_metal (), null, null;
    button 935, 300, plus , plus , plus , increase_nofilter (), null, null;
    button 800, 300, minus, minus, minus, decrease_nofilter (), null, null;
    button 935, 320, plus , plus , plus , increase_unlit (), null, null;
    button 800, 320, minus, minus, minus, decrease_unlit (), null, null;
    button 935, 340, plus , plus , plus , increase_shadow (), null, null;
    button 800, 340, minus, minus, minus, decrease_shadow (), null, null;
    button 935, 360, plus , plus , plus , increase_oriented (), null, null;
    button 800, 360, minus, minus, minus, decrease_oriented (), null, null;
    button 935, 380, plus , plus , plus , increase_facing (), null, null;
    button 800, 380, minus, minus, minus, decrease_facing (), null, null;
    button 935, 400, plus , plus , plus , increase_decal (), null, null;
    button 800, 400, minus, minus, minus, decrease_decal (), null, null;
    button 935, 420, plus , plus , plus , increase_near (), null, null;
    button 800, 420, minus, minus, minus, decrease_near (), null, null;
    button 935, 440, plus , plus , plus , increase_dlight (), null, null;
    button 800, 440, minus, minus, minus, decrease_dlight (), null, null;
    button 935, 500, plus , plus , plus , increase_lightrange(), null, null;
    button 800, 500, minus, minus, minus, decrease_lightrange(), null, null;
    button 935, 520, plus , plus , plus , increase_Red (), null, null;
    button 800, 520, minus, minus, minus, decrease_Red (), null, null;
    button 935, 540, plus , plus , plus , increase_Green (), null, null;
    button 800, 540, minus, minus, minus, decrease_Green (), null, null;
    button 935, 560, plus , plus , plus , increase_Blue (), null, null;
    button 800, 560, minus, minus, minus, decrease_Blue (), null, null;
    layer=8;
    flags=overlay,refresh;

    }
    ///////////////////////////////////////////


    //////////////////str//////////////////////
    string fog_mode= "Fog Properties";
    string light_mode= "light Properties";

    string fog_str= "fog_start = ";
    string fog_end_str= "fog_end = ";
    string fog_depth_str= "fog_depth = ";
    string ambient_str= "ambient = ";
    string albedo_str= "albedo = ";
    string transparent_str= "transparent = ";
    string alpha_str= "alpha = ";
    string overlay_str= "overlay = ";
    string flare_str= "flare = ";
    string bright_str= "bright = ";
    string nofog_str= "NoFog = ";
    string metal_str= "metal = ";
    string nofilter_str= "nofilter = ";
    string unlit_str= "unlit = ";
    string shadow_str= "shadow = ";
    string oriented_str= "oriented = ";
    string facing_str= "facing = ";
    string decal_str= "decal = ";
    string near_str= "near = ";
    string dlight_str= "light = ";
    string pass_str= "passable = ";
    string dash_str= "--------------";
    string lightrange_str= "lightrange = ";
    string Red_str= "Red = ";
    string Green_str= "Green = ";
    string Blue_str= "Blue = ";
    ///////////////////////////////////////////


    function level_fog()
    {
    fog_color =4;
    camera.fog_start =0;
    camera.fog_end =3000;
    camera.fog =50;
    }
    إن الآخرين قد يتواجدون لمساعدتنا وتعليمنا وتوجيهنا ، ولكن الدرس الذي يجب أن نتعلمه متروك لنا .

    تعليق


    • #3
      تابع

      //////////////////////////////////////////////////////

      ///////////////////////Display////////////////////////
      function show_txt()
      {
      screen_txt_fog.string = fog_depth_str;
      screen_txt_end.string = fog_end_str;
      screen_txt.string = fog_str;
      screen_txt_fog_mode.string = fog_mode;
      screen_txt_light_prop.string = light_mode;
      ambient.string = ambient_str;
      albedo.string = albedo_str;
      transparent.string = transparent_str;
      alpha.string = alpha_str;
      overlay.string = overlay_str;
      flare.string = flare_str;
      bright.string = bright_str;
      nofog.string = nofog_str;
      metal.string = metal_str;
      nofilter.string = nofilter_str;
      unlit.string = unlit_str;
      shadow.string = shadow_str;
      oriented.string = oriented_str;
      facing.string = facing_str;
      decal.string = decal_str;
      near.string = near_str;
      dlight.string = dlight_str;
      pass.string = pass_str;
      dash.string = dash_str;
      lightrange.string = lightrange_str;
      Red.string = Red_str;
      Green.string = Green_str;
      Blue.string = Blue_str;

      if(fog_shower!=1)
      {
      screen_txt_fog.visible = on;
      screen_txt_fog_mode.visible = on;
      screen_txt_light_prop.visible = on;
      screen_txt_end.visible = on;
      screen_txt.visible = on;
      ambient.visible = on;
      albedo.visible = on;
      alpha.visible = on;
      overlay.visible = on;
      flare.visible = on;
      bright.visible = on;
      nofog.visible = on;
      metal.visible = on;
      nofilter.visible = on;
      unlit.visible = on;
      shadow.visible = on;
      oriented.visible = on;
      facing.visible = on;
      decal.visible = on;
      near.visible = on;
      pass.visible = on;
      dash.visible = on;
      lightrange.visible = on;
      Red.visible = on;
      Green.visible = on;
      Blue.visible = on;
      dlight.visible = on;
      transparent.visible = on;
      fog_stat.visible = on;
      fog_shower = 1;
      }
      else
      {
      fog_stat.visible = off;
      screen_txt_fog.visible = off;
      screen_txt_fog_mode.visible = off;
      screen_txt_light_prop.visible = off;
      screen_txt_end.visible = off;
      screen_txt.visible = off;
      ambient.visible = off;
      albedo.visible = off;
      alpha.visible = off;
      overlay.visible = off;
      flare.visible = off;
      bright.visible = off;
      nofog.visible = off;
      metal.visible = off;
      nofilter.visible = off;
      unlit.visible = off;
      shadow.visible = off;
      oriented.visible = off;
      facing.visible = off;
      decal.visible = off;
      near.visible = off;
      dlight.visible = off;
      pass.visible = off;
      lightrange.visible = off;
      Red.visible = off;
      Green.visible = off;
      Blue.visible = off;
      transparent.visible = off;
      dash.visible = off;
      fog_shower = 0;
      }
      }

      on_t=show_txt();
      //////////////////////////////////
      ///////////////simulators/////////
      function increase_start()
      {
      while(mouse_left!=0)
      {
      camera.fog_start+=10;
      wait(1);
      }
      }

      function decrease_start()
      {
      while(mouse_left!=0)
      {
      camera.fog_start-=10;
      wait(1);
      }
      }

      function increase_end()
      {
      while(mouse_left!=0)
      {
      camera.fog_end+=10;
      wait(1);
      }
      }

      function decrease_end()
      {
      while(mouse_left!=0)
      {
      camera.fog_end-=10;
      wait(1);
      }
      }
      function increase_depth()
      {
      while(mouse_left!=0)
      {
      camera.fog+=1;
      wait(1);
      }
      }
      function decrease_depth()
      {
      while(mouse_left!=0)
      {
      camera.fog-=1;
      wait(1);
      }
      }

      ////////////////////////////////////

      ////////////////Lights//////////////
      action lights
      {
      light=me;

      my.albedo=20;
      my.ambient=50;
      my.alpha=50;


      }
      /////////////////////////////////////

      function increase_lightrange()
      {
      while(mouse_left!=0)
      {
      light.lightrange+=1;
      wait(1);
      }
      }

      function decrease_lightrange()
      {
      while(mouse_left!=0)
      {
      light.lightrange-=1;
      wait(1);
      }
      }

      function increase_Red()
      {
      while(mouse_left!=0)
      {
      light.Red+=1;
      wait(1);
      }
      }

      function decrease_Red()
      {
      while(mouse_left!=0)
      {
      light.Red-=1;
      wait(1);
      }
      }

      function increase_Green()
      {
      while(mouse_left!=0)
      {
      light.Green+=1;
      wait(1);
      }
      }

      function decrease_Green()
      {
      while(mouse_left!=0)
      {
      light.Green-=1;
      wait(1);
      }
      }

      function increase_Blue()
      {
      while(mouse_left!=0)
      {
      light.Blue+=1;
      wait(1);
      }
      }

      function decrease_Blue()
      {
      while(mouse_left!=0)
      {
      light.Blue-=1;
      wait(1);
      }
      }

      function increase_albedo()
      {
      while(mouse_left!=0)
      {
      light.albedo+=1;
      wait(1);
      }
      }

      function decrease_albedo()
      {
      while(mouse_left!=0)
      {
      light.albedo-=1;
      wait(1);
      }
      }

      function increase_ambient()
      {
      while(mouse_left!=0)
      {
      light.ambient+=1;
      wait(1);
      }
      }

      function decrease_ambient()
      {
      while(mouse_left!=0)
      {
      light.ambient-=1;
      wait(1);
      }
      }

      function increase_alpha()
      {
      while(mouse_left!=0)
      {
      light.alpha+=1;
      wait(1);
      }
      }

      function decrease_alpha()
      {
      while(mouse_left!=0)
      {
      light.alpha-=1;
      wait(1);
      }
      }

      function increase_trans()
      {
      light.transparent=on;
      tran_digt=1;
      }

      function decrease_trans()
      {
      light.transparent=off;
      tran_digt=0;
      }

      function increase_overlay()
      {
      light.overlay=on;
      over_digt=1;
      }

      function decrease_overlay()
      {
      light.overlay=off;
      over_digt=0;
      }

      function increase_flare()
      {
      light.flare=on;
      flare_digt=1;
      }

      function decrease_flare()
      {
      light.flare=off;
      flare_digt=0;
      }

      function increase_bright()
      {
      light.bright=on;
      bright_digt=1;
      }

      function decrease_bright()
      {
      light.bright=off;
      bright_digt=0;
      }

      function increase_nofog()
      {
      light.nofog=on;
      nofog_digt=1;
      }

      function decrease_nofog()
      {
      light.nofog=off;
      nofog_digt=0;
      }

      function increase_metal()
      {
      light.metal=on;
      metal_digt=1;
      }

      function decrease_metal()
      {
      light.metal=off;
      metal_digt=0;
      }

      function increase_nofilter()
      {
      light.nofilter=on;
      nofilter_digt=1;
      }

      function decrease_nofilter()
      {
      light.nofilter=off;
      nofilter_digt=0;
      }

      function increase_unlit()
      {
      light.unlit=on;
      unlit_digt=1;
      }

      function decrease_unlit()
      {
      light.unlit=off;
      unlit_digt=0;
      }

      function increase_shadow()
      {
      light.shadow=on;
      shadow_digt=1;
      }

      function decrease_shadow()
      {
      light.shadow=off;
      shadow_digt=0;
      }

      function increase_oriented()
      {
      light.oriented=on;
      oriented_digt=1;
      }

      function decrease_oriented()
      {
      light.oriented=off;
      oriented_digt=0;
      }

      function increase_facing()
      {
      light.facing=on;
      facing_digt=1;
      }

      function decrease_facing()
      {
      light.facing=off;
      facing_digt=0;
      }

      function increase_decal()
      {
      light.decal=on;
      decal_digt=1;
      }

      function decrease_decal()
      {
      light.decal=off;
      decal_digt=0;
      }

      function increase_near()
      {
      light.near=on;
      near_digt=1;
      }

      function decrease_near()
      {
      light.near=off;
      near_digt=0;
      }

      function increase_dlight()
      {
      light.light=on;
      dlight_digt=1;
      }

      function decrease_dlight()
      {
      light.light=off;
      dlight_digt=0;
      }

      function increase_pass()
      {
      light.passable=on;
      pass_digt=1;
      }

      function decrease_pass()
      {
      light.passable=off;
      pass_digt=0;
      }
      /////////////////////////////end/////////////
      /////////////////////////////////////////////
      إن الآخرين قد يتواجدون لمساعدتنا وتعليمنا وتوجيهنا ، ولكن الدرس الذي يجب أن نتعلمه متروك لنا .

      تعليق


      • #4
        بالنسبة للـ Coding اعلاه ارجو من الله ان لا يضيع مجهودك وان تصل الى ما تسعى اليه

        واتمنى من الاخوة محبي 3D Game Studio ان يقراوا ويحللوا ويستفيدوا مما تقدمه لهم

        تعليق

        يعمل...
        X