Mobile stuffs
Space Jam » Devlog
Ok, mobile support wasn’t bad at all.
- On the itch.io upload page check Mobile Friendly. I picked orientation “Portrait”.
- Fix scaling with Project Settings -> Stretch mode -> 2D. I chose to ignore the aspect ratio since my vector graphics won’t look too bad a little stretched.
- In Godot Project Settings -> Input Devices -> Pointing -> Emulate touch from mouse. That allows me to test touch support on my desktop, using the mouse.
- Add TouchScreenButton nodes (there’s a node for everything) and child nodes for shapes. In my case I use some polygons and lines with transparency set to 50% to draw the buttons.
- Link up the pressed/released signals to some script.
- In each of those handlers call the appropriate Input.action_press([action]) or Input.action_release([action]) functions.
And that was it. The rest of my code is already checking for those actions so that it can respond to the keyboard.
Files
spacejam.zip Play in browser
Sep 04, 2021
Space Jam
Vertical Shooter
Status | Prototype |
Author | intrepidhero |
Tags | Godot, On-Rails Shooter, Space |
More posts
- Public varsSep 04, 2021
- Custom drawingSep 03, 2021
- Bullets, Baddies, and BoomsSep 03, 2021
- Proof of conceptSep 03, 2021
Leave a comment
Log in with itch.io to leave a comment.