Skip to main content
The Windows 64-bit platform provides the primary development and testing environment for Minecraft Community Edition. It uses DirectX 11 for rendering and supports keyboard/mouse input alongside gamepad controllers.

Platform Overview

Graphics API

DirectX 11 (D3D11) with fallback to D3D10

Input Methods

Keyboard, mouse, and Xbox 360 controller support

Networking

Winsock-based networking layer

Build System

Visual Studio 2012+ with x64 configuration

Directory Structure

Minecraft.Client/Windows64/
├── Windows64_App.cpp/h           # Application entry point
├── Windows64_Minecraft.cpp       # Main game loop and initialization
├── Windows64_UIController.cpp/h  # UI rendering with GDraw/D3D11
├── Windows64_StorageHttp.cpp     # HTTP-based storage for testing
├── Minecraft_Macros.h            # Platform macro definitions
├── GameConfig/                   # Configuration files
├── Network/
│   ├── PlatformNetworkManagerStub.h
│   └── WinsockNetLayer.h         # Winsock networking
├── Sentient/                     # AI and NPC management
├── Iggy/                         # UI framework
│   └── gdraw/gdraw_d3d11.cpp    # DirectX 11 graphics driver
└── Miles/                        # Audio system
Reference: Minecraft.Client/Windows64/

DirectX 11 Rendering

The Windows platform uses DirectX 11 as its primary graphics API:

Device Initialization

// Initialize D3D11 device and swap chain
D3D_FEATURE_LEVEL featureLevels[] = {
    D3D_FEATURE_LEVEL_11_0,
    D3D_FEATURE_LEVEL_10_1,
    D3D_FEATURE_LEVEL_10_0
};

DXGI_SWAP_CHAIN_DESC sd;
sd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;

D3D11CreateDeviceAndSwapChain(
    NULL,
    D3D_DRIVER_TYPE_HARDWARE,
    NULL,
    createDeviceFlags,
    featureLevels,
    ARRAYSIZE(featureLevels),
    D3D11_SDK_VERSION,
    &sd,
    &g_pSwapChain,
    &g_pd3dDevice,
    &g_featureLevel,
    &g_pImmediateContext
);
Reference: Windows64_Minecraft.cpp:807-808

Depth Stencil Configuration

D3D11_TEXTURE2D_DESC descDepth = {};
descDepth.Width = width;
descDepth.Height = height;
descDepth.MipLevels = 1;
descDepth.ArraySize = 1;
descDepth.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
descDepth.Usage = D3D11_USAGE_DEFAULT;
descDepth.BindFlags = D3D11_BIND_DEPTH_STENCIL;

D3D11_DEPTH_STENCIL_VIEW_DESC descDSV = {};
descDSV.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
descDSV.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2D;
Reference: Windows64_Minecraft.cpp:488-502

UI Rendering with GDraw

The Windows platform integrates the Iggy UI framework with DirectX 11:

GDraw Context Initialization

void ConsoleUIController::init(
    ID3D11Device *dev,
    ID3D11DeviceContext *ctx,
    ID3D11RenderTargetView* pRenderTargetView,
    ID3D11DepthStencilView* pDepthStencilView,
    S32 w, S32 h)
{
    gdraw_funcs = gdraw_D3D11_CreateContext(dev, ctx, w, h);
    m_pRenderTargetView = pRenderTargetView;
    m_pDepthStencilView = pDepthStencilView;
}
Reference: Windows64_UIController.cpp:13-22

Resource Limits

// Set D3D11 resource limits for UI rendering
gdraw_D3D11_SetResourceLimits(GDRAW_D3D11_RESOURCE_vertexbuffer, 5000, 16 * 1024 * 1024);
gdraw_D3D11_SetResourceLimits(GDRAW_D3D11_RESOURCE_texture, 5000, 128 * 1024 * 1024);
gdraw_D3D11_SetResourceLimits(GDRAW_D3D11_RESOURCE_rendertarget, 10, 32 * 1024 * 1024);
Reference: Windows64_UIController.cpp:52-54

Input Handling

The Windows platform supports multiple input methods:

Keyboard and Mouse

// Keyboard/mouse input through Windows messages
#include "..\KeyboardMouseInput.h"

// Input manager supports multiple mapping styles
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_A, _360_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_B, _360_JOY_BUTTON_B);
Reference: Windows64_Minecraft.cpp:20, 96-98

Controller Support

Xbox 360 controller input is mapped to game actions, maintaining consistency with console versions.

Networking

Windows uses a stub implementation for platform networking with Winsock for low-level communication:

Network Layer

Network/
├── PlatformNetworkManagerStub.h    # Stub for Windows dev
├── PlatformNetworkManagerInterface.h # Common interface
└── WinsockNetLayer.h                # Winsock implementation
The stub implementation allows for local testing and development without requiring console network services. Reference: Windows64/Network/

Build Configuration

Visual Studio Setup

1

Open Solution

Load MinecraftConsoles.sln in Visual Studio 2012 or later
2

Select Platform

Choose “Windows64” from the platform dropdown
3

Choose Configuration

Select Debug for development or Release for optimized builds
4

Build

Build the solution (F7) - Minecraft.World will build first as a dependency

Build Configurations

ConfigurationActiveBuildDeploy
Debugx64-
Releasex64
ReleaseForArtx64--
ContentPackagex64-
Reference: MinecraftConsoles.sln:74-82, 112-121

Screen Resolution

Default resolution settings:
BOOL g_bWidescreen = TRUE;
int g_iScreenWidth = 1920;
int g_iScreenHeight = 1080;
The game supports widescreen displays by default with 1080p resolution. Reference: Windows64_Minecraft.cpp:82-85

Development Features

HTTP Storage

The Windows platform includes an HTTP-based storage system for testing:
// Windows64_StorageHttp.cpp - HTTP storage for dev/testing
// Allows testing save/load without console storage APIs
Reference: Windows64_StorageHttp.cpp

Debug Username

For development, the Windows build uses a configurable username:
char g_Win64Username[17] = {0};
wchar_t g_Win64UsernameW[17] = {0};
Reference: Windows64_Minecraft.cpp:87-88

Performance Considerations

The Windows build is primarily for development. Performance characteristics may differ from console versions due to:
  • Different memory management
  • PC hardware variations
  • DirectX vs console-specific graphics APIs

Resource Management

Vertex buffers, textures, and render targets are managed by D3D11 with configurable limits. The GDraw wrapper handles resource allocation and cleanup automatically.

Testing and Debugging

Debug Mode

When _DEBUG is defined, the D3D11 device is created with debug flags:
#ifdef _DEBUG
    createDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG;
#endif
Reference: Windows64_Minecraft.cpp:446, 771

Debug Menus

Debug menus are available when _DEBUG_MENUS_ENABLED is defined, providing in-game tools for testing.

Common Issues

Ensure you have DirectX 11 runtime installed. The game will attempt to fall back to Feature Level 10.1 or 10.0 if 11.0 is unavailable.
Check that the Windows SDK version matches your Visual Studio installation. D3D shader compilation requires the correct SDK.
Install the DirectX End-User Runtime to get Xbox controller support libraries.

Next Steps

Building

Learn about build configurations and project settings

Input Handling

Understand input mapping and controller support

Rendering

Deep dive into the rendering pipeline

Networking

Explore the networking architecture

Build docs developers (and LLMs) love