0

I've been wanting to create a game engine, but I want to sort out some issues such as how to do controls. Is it possible to map controls to the physical locations on the keyboard as opposed to the individual keys themselves?

I would like to do this because I think that simply configuring to controls like "W" for up and "S" for down is a nuisance for anyone who isn't using qwerty and needs to reconfigure to the locations intended by the creators of a game, which would include Dvorak users like myself or anyone who just decides to change the system default.

I'll probably be using C++ with Boost, SFML and Qt if that matters.

4

1 回答 1

1

最好的方法可能是将控件简单地放在 .ini 或文本文件中,然后用户可以从那里配置它。或者,游戏中的一个菜单,您可以从中选择一个键。即“按向上键”等。就物理布局而言,实际上并没有任何标准。

无论如何,即使是那些使用 qwerty 键盘方式的人也想自定义他们的键,例如 roguelike 键。

于 2011-05-15T04:12:09.097 回答