godotengine / tps-demo

Godot Third Person Shooter with high quality assets and lighting
Other
955 stars 166 forks source link

Add mobile-optimized settings and controls #183

Open Calinou opened 7 months ago

Calinou commented 7 months ago

The TPS demo can now run on mobile devices. Basic touch controls are provided (use the left side of the screen to move, right side to look, hold middle-right edge to aim, tap in bottom-right corner to jump). The controls could certainly be improved (e.g. by having a proper virtual joystick), but suffice for testing and benchmarking needs.

When running on a mobile device, the settings menu no longer lists options that have no effect when using the Mobile rendering method. Default settings have also been optimized for mobile if running on a mobile device.

Note: To export the project to mobile platforms, you'll need to enable ETC2 import as requested by the Export dialog when you add an Android/iOS export preset. This is expected, as I've left it disabled to prevent import times from ballooning if you import the project only to run it on desktop platforms.

Preview

Running on a Samsung Galaxy Z Fold4's main display with a stable 30 FPS cap:

Screenshot_20231206_184609_Godot Third-Person Shooter Demo webp

Screenshot_20231206_184711_Godot Third-Person Shooter Demo webp

On this device, it's also possible to have a steady 40 FPS by using lower-than-default graphics settings.

akien-mga commented 5 months ago

I tested this PR on a Pixel 7a, the main menu works fine but then when in-game the rendering is broken, it renders a plain brownish color, which changes when rotating the camera. Seems like all would-be screen pixels are averaged to one?