Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Ebiten | 8,342 | 118 | 7 hours ago | 507 | September 20, 2022 | 272 | apache-2.0 | Go | ||
Ebitengine - A dead simple 2D game engine for Go | ||||||||||
Gainput | 716 | 2 years ago | 40 | mit | C++ | |||||
Cross-platform C++ input library supporting gamepads, keyboard, mouse, touch | ||||||||||
Cgame | 646 | a year ago | mit | C | ||||||
一些用C编写的小游戏, 14行贪吃蛇 22行2048 22行俄罗斯方块 25行扫雷...以及各种小玩意 | ||||||||||
Akihabara | 528 | 10 years ago | 2 | other | JavaScript | |||||
A game engine for making classic arcade style games using Javascript and HTML5. We're starting moving on a re-organized repo here: https://github.com/akihabara | ||||||||||
Gopher360 | 441 | 3 years ago | 87 | gpl-3.0 | C++ | |||||
Gopher360 is a free zero-config app that instantly turns your Xbox 360, Xbox One, or even DualShock controller into a mouse and keyboard. Just download, run, and relax. | ||||||||||
2048 | 436 | 6 years ago | 5 | Java | ||||||
2048 Game with Kivy | ||||||||||
Playground | 431 | 2 | 1 | 6 years ago | 1 | July 25, 2015 | 24 | other | JavaScript | |
Playground.js is a framework for your javascript based games. It gives you out-of-box access to essentials like mouse, keyboard, sound and well designed architecture that you can expand to your needs. | ||||||||||
Etterna | 403 | 4 days ago | 151 | mit | C++ | |||||
Advanced cross-platform rhythm game focused on keyboard play | ||||||||||
Pydirectinput | 348 | 6 | 21 days ago | 5 | February 02, 2021 | 35 | other | Python | ||
Python mouse and keyboard input automation for Windows using Direct Input. | ||||||||||
Enjoy2 | 310 | 8 years ago | 35 | mit | Objective-C | |||||
Transform joystick input into keyboard and mouse events (OSX) |
Gainput is the awesome C++ input library for your game:
#include <gainput/gainput.h>
enum Button
{
ButtonConfirm
};
gainput::InputManager manager;
manager.SetDisplaySize(displayWidth, displayHeight);
const gainput::DeviceId keyboardId = manager.CreateDevice<gainput::InputDeviceKeyboard>();
const gainput::DeviceId mouseId = manager.CreateDevice<gainput::InputDeviceMouse>();
const gainput::DeviceId padId = manager.CreateDevice<gainput::InputDevicePad>();
const gainput::DeviceId touchId = manager.CreateDevice<gainput::InputDeviceTouch>();
gainput::InputMap map(manager);
map.MapBool(ButtonConfirm, keyboardId, gainput::KeyReturn);
map.MapBool(ButtonConfirm, mouseId, gainput::MouseButtonLeft);
map.MapBool(ButtonConfirm, padId, gainput::PadButtonA);
map.MapBool(ButtonConfirm, touchId, gainput::Touch0Down);
while (running)
{
manager.Update();
// May need some platform-specific message handling here
if (map.GetBoolWasDown(ButtonConfirm))
{
// Confirmed!
}
}
By default, Gainput is built using CMake.
mkdir build
cmake ..
make
lib/
, the executables in samples/
.Everyone is welcome to contribute to the library. If you find any problems, you can submit them using GitHub's issue system. If you want to contribute code, you should fork the project and then send a pull request.
Gainput has a minimal number of external dependencies to make it as self-contained as possible. It uses the platforms' default ways of getting inputs and doesn't use the STL.
Generally, testing should be done by building and running Gainput on all supported platforms. The samples in the samples/
folder should be used in order to determine if the library is functional.
The unit tests in the test/
folder are built by the normal CMake build. The executable can be found in the test/
folder. All build configurations and unit tests are built and run by Travis CI whenever something is pushed into the repository.