با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
این مبحث ملاحظات طراحی و بهترین شیوهها برای مدیریت ورودیهای کاربر در بازیهای Google Play در رایانه شخصی را پوشش میدهد.
بازیهای Google Play در رایانه شخصی به جای صفحه نمایش لمسی، به ماوس و صفحه کلید برای ورودی بازیکن متکی است. هنگام طراحی تجربه ماوس و صفحه کلید، بر ایجاد بهترین تجربه کاربری برای کاربران رایانه های شخصی دسکتاپ یا لپ تاپ تمرکز کنید. برای شروع، به راهنمای ما در مورد سازگاری ورودی برنامه Android برای دستگاههای Chromebook مراجعه کنید.
بهترین شیوه ها
ما بهترین روش های زیر را برای طراحی و ایجاد تعامل با بازیکنان توصیه می کنیم.
همه اهداف باید با ماوس قابل کلیک باشند.
همه سطوح قابل پیمایش روی رویدادهای چرخ ماوس حرکت می کنند.
سطوح قابل کلیک را هنگام نگه داشتن ماوس برجسته کنید و بهترین قضاوت خود را برای بهبود کشف رابط کاربری بدون تحت فشار قرار دادن کاربر به کار ببرید.
کلیدهای میانبر را برای کاربران فراهم کنید تا به سرعت کنترل ها را به نمایش بگذارند.
کنترلهای لمسی (مثلا جوی استیکهای انگشت شست یا دکمههای روی صفحه) را با کنترلهای مبتنی بر ماوس و کلیدهای میانبر جایگزین کنید.
برای اقداماتی که در بازی تلفن همراه خود نیاز به حرکات چند لمسی دارند، اطمینان حاصل کنید که عملکردهای مشابه با صفحه کلید یا کنترل ماوس پشتیبانی میشوند (به عنوان مثال، استفاده از چرخ پیمایش ماوس برای جایگزینی فشار دادن دو انگشت).
هنگام طراحی یک بازی برای مخاطبان بین المللی، مهم است که بازی خود را با چیدمان صفحه کلید خود برای هر زبانی که بازی شما پشتیبانی می کند، آزمایش کنید. عدم انجام این کار ممکن است بازیکنان را از استفاده از ویژگی هایی مانند چت درون بازی مسدود کند. میتوانید محل ورودی خود را در تنظیمات سیستم خود تغییر دهید و تغییرات به طور خودکار در Google Play Games در رایانه شخصی اعمال میشود. در تلفن همراه، بسیاری از مشکلات موتور شما ممکن است با این واقعیت که متنی را از صفحه کلید مجازی دریافت می کنید، پنهان شوند. مشکلات رایج در رایانه شخصی عبارتند از:
مدیریت نادرست کدهای کلیدی "گرافیک جایگزین" (AltGr). در بسیاری از زبانها از این برای تایپ علامتهای دیاکریتیک مانند لهجهها یا نمادهای خاص محلی مانند علامتهای ارز منطقهای استفاده میشود.
مدیریت نادرست ورودی های "توسعه روش ورودی" (IME) . این روش معمولاً برای پشتیبانی از الفبای غیر لاتین استفاده می شود و به کاربران اجازه می دهد چندین کلید را در یک کاراکتر ترکیب کنند.
GameTextInput و EditText قبلاً از طرحبندی صفحهکلید بینالمللی و روشهای ورودی آگاه هستند.
نگاشت ورودی توصیه شده
فهرست زیر شامل اقدامات مشترک بسیاری از بازیها و توسعهدهندگان پیادهسازی معمولی در بازیهای Google Play در رایانه شخصی است:
استفاده کنید وارد کنید کلید ارسال پیام یا ارسال متن در فیلدهای ورودی متن.
منوها و گفتگوها باید با فرار کلید
استفاده کنید وارد کنید کلید پیشرفت از طریق عناصر داستان و جعبه های گفتگو.
از چرخ اسکرول برای پیمایش عمودی متن استفاده کنید.
از چرخ اسکرول برای بزرگنمایی یا کوچکنمایی استفاده کنید، بهخصوص اگر در ساخت موبایل خود از دو انگشت استفاده کنید.
استفاده کنید دبلیو ، الف ، اس ، و D در اطراف نقشه ای که معمولاً از یک حرکت کلیک و کشیدن روی آن استفاده می کنید، حرکت کنید.
حتی اگر این اقدامات رایج هستند، شما همچنان باید به طور صریح آنها را با Input SDK به پخش کننده ارائه دهید تا مطمئن شوید که به درستی قابل شناسایی هستند.
حالت سازگاری
بازیهای Google Play روی رایانه شخصی، بازی شما را بهطور پیشفرض در «حالت سازگاری ورودی» قرار میدهد. این بدان معنی است که وقتی دکمه سمت چپ ماوس را فشار می دهید، یک رویداد لمسی به بازی شما داده می شود. برای اطلاعات بیشتر به راهنمای ورودی ماوس مراجعه کنید.
آموزش و آموزش کاربران
در برخی موارد، کاربران می توانند از آموزش های درون بازی بهره مند شوند که علاوه بر مشاهده کنترل های ماوس و صفحه کلید، کنترل های بازی را به آنها آموزش می دهد. توصیه میکنیم آموزشهای درون بازی و ویژگیهای آموزشی را با کنترلهای صحیح برای ماوس و صفحهکلید، و حذف آموزشهای مربوط به کنترلهای لمسی برای نسخه رایانه شخصی بازیتان، اضافه کنید.
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# Input support\n\nThis topic covers design considerations and best practices for handling user\ninput in Google Play Games on PC.\n\nGoogle Play Games on PC relies on a mouse and keyboard for player input rather\nthan a touchscreen. When designing your mouse and keyboard experience, focus on\nbuilding the best user experience for desktop or laptop PC users. To get\nstarted, see our guide on\n[Android app input compatibility for Chromebooks](/topic/arc/input-compatibility).\n\nBest practices\n--------------\n\nWe recommend the following best practices for designing and building player\ninteractions.\n\n- All targets should be clickable with a mouse.\n- All scrollable surfaces scroll on mouse wheel events.\n- Highlight clickable surfaces when hovered, and use your best judgment to improve UI discovery without overwhelming the user.\n- Provide hotkeys for users to quickly bring up controls.\n- Replace touch-based controls (for example, thumb joysticks or on-screen buttons) with mouse-based controls and hotkeys.\n- For actions in your mobile game that require multi-touch gestures, ensure the same actions are supported with a keyboard or mouse control (for example, using the scroll wheel of the mouse to replace a two-finger pinch).\n\nFor additional details and best practices, see our guide on\n[optimizing your ChromeOS Android app for mouse and keyboard](/topic/arc/optimizing#keyboard).\n\n### Internationalization considerations\n\nWhen designing a game for an international audience, it is important that you\ntest your game with your keyboard layout set to each language supported by your\ngame. Failure to do so may block players from using features such as in-game\nchat. You can change your input locale\n[in your system settings](https://support.microsoft.com/en-us/windows/manage-the-input-and-display-language-settings-in-windows-12a10cb4-8626-9b77-0ccb-5013e0c7c7a2)\nand the changes will apply automatically to Google Play Games on PC. On\nmobile, many issues in your engine may be hidden by the fact that you're\nreceiving text from a virtual keyboard. Common issues on PC include:\n\n- Incorrect handling of \"alternative graphic\" (AltGr) keycodes. In many locales this is used to type diacritical marks such as accents or special locale-specific symbols such as regional currency glyphs.\n- Incorrect handling of [\"input method extension\" (IME)](/reference/android/view/inputmethod/InputMethodManager) inputs. This method is commonly used to support non-Latin alphabets by allowing users to combine several keystrokes into a single character.\n\n[`GameTextInput`](/games/agdk/add-support-for-text-input) and\n[`EditText`](/reference/android/widget/EditText) are already aware of\ninternational keyboard layouts and input methods.\n\n### Recommended input mappings\n\nThe following list includes actions many games have in common, and the typical\nimplementation developers use on Google Play Games on PC:\n\n- Use the enter key to send messages or submit text in text entry fields.\n- Menus and dialogs should be cancellable with the escape key.\n- Use the enter key to progress through story elements and dialog boxes.\n- Use the scroll wheel to scroll text vertically.\n- Use the scroll wheel to zoom in or out, especially if you use a two-finger pinch in your mobile build.\n- Use W, A, S, and D navigate around a map that you'd normally use a click and drag motion on.\n\nEven though these actions are common, you should still explicitly present them\nto the player with the [Input SDK](/games/playgames/input-sdk) to make sure they're\nproperly discoverable.\n\nCompatibility mode\n------------------\n\nGoogle Play Games on PC places your game into \"input compatibility mode\" by\ndefault. This means that when you press the left mouse button, your game is\ngiven a touch event. See the [mouse input](/games/playgames/input-mouse) guide for more\ninformation.\n\nTutorials and user education\n----------------------------\n\nIn some cases, users can benefit from in-game tutorials that teach them the\ncontrols to the game, in addition to being able to view the mouse and keyboard\ncontrols. We recommend including in-game tutorials and educational features with\nthe correct controls for mouse and keyboard, and removing tutorials relevant to\ntouch-based controls for the PC version of your game."]]