static GameServer() { ServerID = Settings.Read( "Server ID", Guid.NewGuid() ); ServerName = Settings.Read( "Server Name", "Change Me" ); MaxConnections = Settings.Read( "Max Connections", 16 ); serving_port = Settings.Read( "Serve on Port", 31733 ); game = new Core.VoxelGameEnvironment(); game.UniverseNum = Settings.Read( "Game Universe", 1 ); game.Init( true ); game.Start_Game( true ); }
public Display( VoxelGameEnvironment game ) { Exit = CannotExit; this.game = game; //string versionOpenGL = GL.GetString(StringName.Version); //GL.Get //display_width = Width;// = Settings.Read( "GL.Width", System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width ); //display_height = Height;// = Settings.Read( "GL.Height", System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height ); //mouse_x = display_width / 2; //mouse_y = display_height / 2; Width = 1080; Height = 1920; #if !USE_GLES2 System.Windows.Forms.Cursor.Position = new Point( display_x + ( display_width ) / 2, display_y + display_height / 2 ); #endif //GL.Viewport( 0, 0, Width, Height ); #if !USE_GLES2 GL.Enable( EnableCap.Multisample ); #endif Matrix4.CreatePerspectiveFieldOfView( (float)( System.Math.PI / 2 ), (float)Width / (float)Height, 0.01f, 10000, out projection ); //projection = Matrix4.Identity; // generic fly camera not attached to any object free_camera = new Voxels.UI.Camera(); active_camera = free_camera; // default to freecam; free_camera.MoveTo( 0, 4, 0 ); free_camera.MoveTo( 1799, 4, 0 ); debug_cube_transform = btTransform.Identity; }