Added a README and rumble tests

master
Wynd 2026-01-24 22:18:12 +02:00
parent d00bc0c12b
commit eec42cc759
3 changed files with 46 additions and 0 deletions

29
README.md 100644
View File

@ -0,0 +1,29 @@
# gamo
local gamepad tester
original TUI app here: [https://git.pixelatedw.xyz/wynd/gamo](https://git.pixelatedw.xyz/wynd/gamo)
## why ?
there's nothing particularly fancy about this and it does what it says, allows the user to test their gamepad
made with godot because I couldn't be bothered with any GUI toolkits out there
it uses a custom exporting template to cut down its size by more than half
compared with the original TUI version it is huge coming at around 32MB (about 17 times more) and it consumes about 26 times more RAM (~130MB)
however it comes with a bunch of benefits such as a much nicer layout, button images, transparency and an overall (very subjecitve) nicer UX/DX
## controls
- `v` to start a rumble test (weak default)
- `shift` toggle between rumble modes (weak/strong)
## config
this app comes with a config found in:
- Linux: `~/.local/share/gamo/config.cfg`
## credits
icons are from kenney's input prompt collection: [https://www.kenney.nl/assets/input-prompts](https://www.kenney.nl/assets/input-prompts)

View File

@ -3,6 +3,7 @@ extends Control
@onready var device_name: RichTextLabel = $Device @onready var device_name: RichTextLabel = $Device
var _has_joy := false var _has_joy := false
var _weak_rumble := true
func _ready() -> void: func _ready() -> void:
if Input.get_connected_joypads().size() > 0: if Input.get_connected_joypads().size() > 0:
@ -18,3 +19,9 @@ func _process(_delta: float) -> void:
if Input.get_connected_joypads().size() <= 0: if Input.get_connected_joypads().size() <= 0:
self.device_name.text = WyHelper.NO_DEVICE self.device_name.text = WyHelper.NO_DEVICE
self._has_joy = false self._has_joy = false
func _input(event: InputEvent) -> void:
if event.is_action_pressed("toggle_rumble_mode"):
self._weak_rumble = !self._weak_rumble
elif event.is_action_pressed("rumble_test"):
Input.start_joy_vibration(0, 1.0 if self._weak_rumble else 0.0, 1.0 if !self._weak_rumble else 0.0, 1)

View File

@ -116,6 +116,16 @@ l1={
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":9,"pressure":0.0,"pressed":false,"script":null) "events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":9,"pressure":0.0,"pressed":false,"script":null)
] ]
} }
rumble_test={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":86,"physical_keycode":0,"key_label":0,"unicode":118,"location":0,"echo":false,"script":null)
]
}
toggle_rumble_mode={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194325,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
[rendering] [rendering]