訓練
模組
了解您可用來引導遊戲和平台開發的基本協助工具最佳做法原則。 另請了解如何使用 Xbox 協助工具指導方針,這是可供開發人員使用的一項免費線上資源,而此資源提供依特定遊戲元素和功能所組織的最佳做法完整清單。
The Microsoft Game Development Kit (GDK) uses the Win32 programming style, including windows and messages. Although much of this is identical to what you might encounter on Windows PC, this topic describes what's supported on console and the differences from Windows PC.
Every game must have a WinMain
as its entry point function. Within
WinMain
, the game should do the following.
On console, the window just acts a target for messages.
On console, there's support for basic input from the keyboard and mouse as well as window lifetime. The following system messages are supported.
WM_ACTIVATE
WM_ACTIVATEAPP
WM_CHAR
WM_CREATE
WM_DESTROY
WM_DPICHANGED
WM_KEYDOWN
WM_KEYUP
WM_KILLFOCUS
WM_LBUTTONDOWN
WM_LBUTTONUP
WM_MBUTTONDOWN
WM_MBUTTONUP
WM_MOUSEMOVE
WM_MOUSEWHEEL
WM_QUIT
WM_RBUTTONDOWN
WM_RBUTTONUP
WM_SETFOCUS
WM_SHOWWINDOW
WM_SIZE
WM_SYSKEYDOWN
WM_SYSKEYUP
WM_THEMECHANGED
WM_TIMER
WM_USER
WM_XBUTTONDOWN
WM_XBUTTONUP
Console supports only a subset of what might be expected from winuser.h. Console supports only the following windows functions.
AdjustWindowRect
AdjustWindowRectEx
CallWindowProc
CreateWindowEx
DefWindowProc
DestroyCursor
DestroyWindow
DispatchMessage
GetClientRect
GetCursorInfo
GetCursorPos
GetMessage
GetWindowLong
GetWindowLongPtr
KillTimer
LoadCursor
MoveWindow
PeekMessage
PostMessage
PostQuitMessage
PostThreadMessage
RegisterClass
RegisterClassEx
SendMessage
SetCursor
SetTimer
SetWindowLong
SetWindowLongPtr
SetWindowPos
ShowCursor
ShowWindow
TranslateMessage
UnregisterClass
訓練
模組
了解您可用來引導遊戲和平台開發的基本協助工具最佳做法原則。 另請了解如何使用 Xbox 協助工具指導方針,這是可供開發人員使用的一項免費線上資源,而此資源提供依特定遊戲元素和功能所組織的最佳做法完整清單。