Dimension 3 Lab

dim3 Helper

HUD Editor

This is ALPHA Version , be carefully to use it!!!!!!! (Keep your buckup Interface.xml data.)
  • HUD_Editor v0.2 , Tool for dim3 - v3.0
  • 1.This program run ONLY Firefox3 later because this use E4X(ECMAScript for XML )
    2.This program NOT CHANGE original Interface.xml. So you want result by edit, then copy & paste to output data for original file.
    3.This can edit Bitmap ,Text and Bar Objects in the HUD data.

    Interface viewer

  • Interface viewer , Tool for dim3 2.0
  • Font Expand Patch

  • font_expand_patch
  • Misc reserch

    Template Memo

  • Editor Data---- The data which dim3 Editor(tool icons)
  • Libraries---- Dynamic libraries
  • Data---- The resource which dim3 Engine uses

  • Data folder (Default setting)
    (To make original FPS, these files are customized. )
  • Bitmaps folder
     
    Data/Bitmap/Interface/ ---- (The pictures which are used in interface of the game. png format)
    Weapon Icons, Health

    Data/Bitmaps/Font/ ---- ( Bitmap Font )
    Data/Bitmaps/Crosshairs/ ---- ( Crosshairs)
    Data/Bitmaps/Textures/ ---- ( Wall and Floor textures which edit with MAP Editor, png format)
    Data/Bitmap/UI_Elements/ ---- (Use for menu Interface , png format)
     main.png  ---- Titleback(This image appear to background on menu-mode.)
     cursor.png  ---- Cursor
     button_....png ---- Buttons

    Data/Bitmap/Titles/Example ---- Title.png( Title?, About image? , Staff credit? )

  • Chooser ---- (MAP Chooser Images. , png format)

  • Settings ---- (Config , Settings. XML format )
    Interface.xml ---- (Menu, Chooser, 3D HUD Interface layout )

  • Scripts ---- (Script, JavaScript )
    Data/Scripts/Courses ---- each MAP define.(Course Script)
    Data/Scripts/Game ---- javascript files
     Game.js ---- Menu constitution (General)
     Host.js  ---- Network (for host)
     Client.js ---- Network (for client)

    Data/Scripts/Objects ---- Definition of object (Prayer, vehicle and wood, enemy and illuminant)
    Data/Scripts/Projectiles  ----Projectiles( Bullet、Fireball , Missile )
    Data/Scripts/Weapons  ----Weapon(Hammer , Pistol , Launcher 、Mine)

  • Maps  ----(MAPDATA, XML format)These resources edit with MAP Editor
  • Models  ----(3DModel and Texture , XML format 、png format)These resources edit with dim3 Animator.

  • Movies ---- (Movie for Story , .mov format)
  • Story  ----(Pictures for Story,tips,misc information. png format with sequence number filename)
  • Music  ----(BGM, wav format)
  • Sounds ---- (SE, wav format)
  • Shaders ---- (Shader, GLSL?)

  • Saved Games ----(Savedata)
  • ScreenShots ----(Saved screenshots, If 'F4' key is pushed on the game, screenshot will be captured.)
  • CourseScripts Memo (dim3, version1.6)
    Civil War and Big Indoor Map.js ( Translation is not yet)

  • ObjectScripts Memo(dim3, version1.6)(Data/Scripts/Objects)
    Some reserch(Translation is not yet)


  • Memo
    DIM3_EVENT_MAP ------------------- Event
      DIM3_EVENT_MAP_OPEN ----- Sub Event
      DIM3_EVENT_MAP_CLOSE ----- Sub Event



  • dim3 Screenshots

    My study memos

    ;) Trial and error

    MAP Editor




    Texture of Map parts

    at 'Texture Settings' dialog.
  • Map Pattern can set pattern animation. (Pseudo fade in/out/flashing/moving/etc)
  • add 'Frame' and set 'Animation Wait' (unit: msec)
  • User shader settings.
     

  • Ambient

    In the ambient, there is the two of types the "wall" and "floor/ceiling".
    These are kinds of the texture put on the wall and the floor, etc.
    (Carpet, Poster, Ivy, and Cobweb, Decal...etc. )
    An ambient setting is done from the segment menu.


    Texture 2D Animation

  • In Map Editor , The segments of the wall are done animation.
  • In Animator, 2D-display for Side Scroller as like Mario Story .

    Indexs & offset(Frames)
  • 24bit PNG image files (Transparented background) and simple square model.
    Set Frames & Wait times
    How to 2D animation control by Script

    How to make automatic slide doors



    (Editor v2.1~)
    Slide Door :
    Platform :

    Lightings



    Memo


    Node


    Rigid Body




    3D Animation - Bone


    Bone &Weight (use Bones >>Set Bone...) Rotation of Bone B

    How to display that weighted vertices.

    Map Importing

  • Import Height map



  • Import OBJ data for map(using wing3d)

    Camera and Input-key-mode setting

    Setting | Map

    Static Camera

    Side Scroller

    Outdoor

    Indoor

    each_course_script.js
    DIM3_CAMERA_TYPE_*

    _STATIC

    _CHASE_STATIC

    _CHASE

    _FPP

    player.js
    DIM3_INPUT_MODE_*

    _TOP_DOWN

    _SIDE_SCROLL

    _FPP

    _FPP

    Default input Key Set:
    // Course Script

    //Player:Static Camera Map
    obj.setting.inputMode=DIM3_INPUT_MODE_TOP_DOWN;
    // Map: Static Camera Map
    camera.setting.type=DIM3_CAMERA_TYPE_STATIC;
    camera.staticPosition.follow=true;
    camera.staticPosition.moveToSpot(map.spot.find('View1','Camera')); ------ Position Setting is easy

    //Player: Side Scroller Map
    obj.setting.inputMode=DIM3_INPUT_MODE_SIDE_SCROLL;
    // Map: Side Scroller Map
    camera.setting.type=DIM3_CAMERA_TYPE_CHASE_STATIC;
    camera.chaseAngle.x=0;
    camera.chaseAngle.y=270;
    camera.chaseAngle.z=0;
    camera.chase.distance=14000;

    //Player: Map: Big Outdoor Map
    obj.setting.inputMode=DIM3_INPUT_MODE_FPP;
    // Map: Big Outdoor Map
    camera.setting.type=DIM3_CAMERA_TYPE_CHASE;

    camera.chase.distance=10500;
    camera.chase.trackSpeed=5;
    camera.chaseAngle.x=0;
    camera.chaseAngle.y=0;
    camera.chaseAngle.z=0;

    //Player: default(DIM3_INPUT_MODE_FPP)
    // Map: Big Indoor Map
    camera.setting.type=DIM3_CAMERA_TYPE_FPP;

    Fog

    Dim3 has two kinds of fogs that "fog" & "GL-based Fog".
    Then, Fog Setting can set either from "Script" and "Fog setting" dialog of Editor.


  • Forum ref. Portal around player?

    Testing of Course Script(big_outdoor_map.js).

    fog

    "fog" using layers of texture. default setting + texture chagne
       map.fog.on=true;
      map.fog.textureIndex=14;
      map.fog.textureStamp=1;
     map.fog.speed=0.01;
     map.fog.startPercentage=0.95;
     map.fog.startAlpha=0.07;
     map.fog.endAlpha=0.3;
     map.removeSky=true;
     
    

    (fog only, testureStamp=1.0 )
       map.fog.on=true;
      map.fog.textureIndex=17;
      map.fog.textureStamp=1.0;
      map.fog.speed=255.0;
      map.fog.startPercentage=0.2;
     map.fog.startAlpha=0.2;
     map.fog.endAlpha=5.0;
    
    (fog only, testureStamp=0.5 )
       map.fog.on=true;
      map.fog.textureIndex=17;
      map.fog.textureStamp=0.5;
      map.fog.speed=25;
      map.fog.startPercentage=0.88;
     map.fog.startAlpha=10.12;
     map.fog.endAlpha=20.54;
    

    glFog

    GL based fog.
    (glFog only)
        map.glFog.on=true;
        map.glFog.type=DIM3_GL_FOG_TYPE_LINEAR;
     
      map.glFog.startDistance=18000;
       map.glFog.endDistance=12000;
    //     map.glFog.density =0.095;// (DIM3_GL_FOG_TYPE_EXP)
    
    	    map.glFogColor.red =0.4;
    	    map.glFogColor.blue =0.4;
    	   map.glFogColor.green =0.4;
     
    

    (glFog only, Start Distance < End Distance)
        map.glFog.on=true;
        map.glFog.type=DIM3_GL_FOG_TYPE_LINEAR;
     
      map.glFog.startDistance=12000;
       map.glFog.endDistance=18000;
    //     map.glFog.density =0.095;// (DIM3_GL_FOG_TYPE_EXP)
    
    	    map.glFogColor.red =1.0;
    	    map.glFogColor.blue =1.0;
    	   map.glFogColor.green =1.0;
     
    

    (glFog only, Start Distance > End Distance)
        map.glFog.on=true;
        map.glFog.type=DIM3_GL_FOG_TYPE_LINEAR;
     
      map.glFog.startDistance=18000;
       map.glFog.endDistance=12000;
    //     map.glFog.density =0.095; // (DIM3_GL_FOG_TYPE_EXP)
    
    	    map.glFogColor.red =1.0;
    	    map.glFogColor.blue =1.0;
    	   map.glFogColor.green =1.0;
     
    

    fog & glFog

    both using
    (fog & glFog)
     map.fog.on=true;
      map.fog.textureIndex=17;
      map.fog.textureStamp=0.5;
      map.fog.speed=25;
      map.fog.startPercentage=0.88;
     map.fog.startAlpha=10.12;
     map.fog.endAlpha=20.54;
    
    
        map.glFog.on=true;
        map.glFog.type=DIM3_GL_FOG_TYPE_LINEAR;
     
      map.glFog.startDistance=18000;
       map.glFog.endDistance=12000;
    //     map.glFog.density =0.095;
    
    	    map.glFogColor.red =0.4;
    	    map.glFogColor.blue =0.4;
    	   map.glFogColor.green =0.4;
    

    DIM3_GL_FOG_TYPE_EXP

    What is texture stamping?


    Rain


    Misc

    				iface.interaction.xxxxxx
    
    				iface.screen.widthScale=640;
    				iface.screen.heightScale=480;
    
    				iface.text.move( text_name  , x , y);
    				iface.text.show(  text_name );
    				iface.text.hide(  text_name  );
    				iface.text.setText(  text_name   ,   text );
    					
    				iface.bitmap.move(bitmap_name , x , y);
    				iface.bitmap.show(bitmap_name);
    				iface.bitmap.hide(bitmap_name);
    				iface.bitmap.resize( bitmap_name, w , h );
    				
    				
    				iface.bar.setValue( bar_name ,  inline_value );      (obj.health.current/obj.health.maximum)
    				iface.bar.show( bar_name);
    				iface.bar.hide( bar_name );
    
    				iface.bitmap.hideAll();	 
    				iface.text.hideAll();
    				 iface.bar.hideAll();
    

    Font Experiment

    "gl_text.c" modify Experiment (dim3 2.1 beta_2 source code)
    small.png (128x128 -> 128x512 pixel expand )

  • Important!
    "0.109375f" isn't magic number.
    picture size : (0.0)-(128,128)
    texture size: (0.0)-(1.0, 1.0)

    0.109375f : 1 = x : 128
    The ratio which corresponds from X,Y position is calculated.

    "gl_text.c"
    /* =======================================================
    
          Draw Line of Text
          
    ======================================================= */
    
    void gl_text_draw_line(int x,int y,char *txt,int txtlen)
    {
    	register int	i,ch,fst,snd,trd, csum;
    	register unsigned char   *c;//unsigned
    	int				lft,rgt,top,bot,xoff,yoff,wid,high;
    	float			gx_lft,gx_rgt,gy_top,gy_bot;
        
    		// scale values before drawing
    		
    	wid=gl_text_get_char_width(font_small);
    	high=gl_text_get_char_height(font_small);
    		
    	gl_scale_2D_point(&x,&y);
    	gl_scale_2D_point(&wid,&high);
    	
    		// draw text
    		
    	lft=x;
    	bot=y;
    	top=bot-high;
    	
    	c=txt;
    	
    	for (i=0;i='!') && ( ch<=255 )) {//'z'
    		
    			ch-='!';	
    
    			
    			fst=ch;
    			
    			// ch+=90;//test
    			// Shift_JIS (XML file's encoding=2byte) case Japanese offset , 
    			 /*
    			if ((i+1<=txtlen) && ( fst==97 )){                   
    				snd=(int)*c++;
    				fst=fst+snd-166;// hiragana offset
    				i++; 
    			}else if( (i+1<=txtlen) && ( fst==98 ) ){
    				snd=(int)*c++;
    				fst=fst+snd+11;// katakana offset
    				i++; 
    			}
    			*/
    			// UTF8 case (XML file's encoding= 3byte)  Japanese offset
    		 if ((i+2<=txtlen) && ( fst==194 )){                   
    				snd=(int)*c++;
    				trd=(int)*c++;
    				
    				if ( (snd==0x83) && ( trd>=0x80) ){//E38380〜
    					
    					//  if (  snd==0x83    ){  snd = 0x82;  trd=trd+0x40;  }//E38380〜E38293 katakana
    					fst=snd+trd-55;// katakana normal
    					
    				}else{ //E38181〜 E381BF
    					if ( (snd==0x82)&&(  trd>=0xA1)    ){  snd = 0x81;  trd=trd+0x33;  }//E382A1〜 katakana 
    					else if (  snd==0x82    ){  snd = 0x81;  trd=trd+0x40;  }//E38280〜E38293 hiragana 
    					fst=snd+trd-168;// hiragana offset a - mi normal
    				} 
    					i++;i++; 
    			}
    			
    			
    			yoff=fst/10;
    			xoff=fst-(yoff*10);
    
    			gx_lft=((float)xoff)*0.09375f;
    			gx_rgt=gx_lft+0.089f;
    			gy_top=((float)yoff)*0.0274f;//0.05468f; //0.109375f;
    			gy_bot=gy_top+0.027f; //0.108f;
    			
    			rgt=lft+wid;
                
    			glTexCoord2f(gx_lft,gy_top);
    			glVertex2i(lft,top);
    			glTexCoord2f(gx_rgt,gy_top);
    			glVertex2i(rgt,top);
    			glTexCoord2f(gx_lft,gy_bot);
    			glVertex2i(lft,bot);
                
    			glTexCoord2f(gx_rgt,gy_top);
    			glVertex2i(rgt,top);
    			glTexCoord2f(gx_rgt,gy_bot);
    			glVertex2i(rgt,bot);
    			glTexCoord2f(gx_lft,gy_bot);
    			glVertex2i(lft,bot);
    			
    			if(  fst < 90 ){
    				lft+=(int)(wid*font_char_size[fst]);
    			}else{   lft+=(int)(wid*0.99f);    }
    		}
    		else {
    			lft+=wid/3;
    		}
    		
    	}
    }
    
  • dim3 Link

  • Dim3 Files -User Create Resourse Library- There are many of contribute files, 3D Model, Font , Sound , Script ....
  • Last modified 2006/06/17

    Tsukubado