When I view the cart category in this website and click the thumbnail of a cart, it opens up with a virtual keyboard layout. Could it be possible to add similar virtual keyboard to html-exported carts as well? Because I usually export my projects to html so it would be very handy if I could test them on my mobile browser as well while on the road.
- Web player's virtual control layout should have its CSS set up so that it would prevent the user from accidentally "paint selecting" or dragging the ui elements of this control layout. It could be done easily by adding "user-select: none" to css and "draggable=false" to the images.
While I agree that it would be cool to have this built-in, in the meantime, you should check out this awesome project that does what you are looking for:
He goes above and beyond what you are asking for. His example shows context sensitive buttons (ie only showing left and right for a platformer, then switching to a dpad in a map segment) as well as adding in analog controls using the gpio pins.
Headjump, if you see this, you are doing God's work.
Woahs...god's work indeed. Thanks for the link Pablo.
I just tried that demo out on my iPhone 6 and it works far better than I anticipated. This changes some things...I'm going to have to get much more familiar with how Pico8 interacts with the JS.
@paloblancogames Dude, thanks! That is exactly what I am looking for. Gotta try it right now. Thanks for sharing! +++
@paloblancogames Hey I just tried the template, and while it does show the buttons on my phone's browser screen, they do not seem to work. Using iPhone 6 with Google Chrome. Do I need to make any changes to the html regarding the button commands? I read the readme-file and from that I understood that there should not be any other configurations needed other than renaming the title etc?
I tried mine on iPhone6 on Safari and the demo worked just fine.
You do have to put the html_buttonset() function into your game for the buttons to work...you can't just drop in your game JS and have it work (at least I didn't).
Right now I'm trying to get my space invader game working and it's pretty decent but sound isn't working...but that has nothing to do with the template from what I can tell.
@morningtoast Thanks for clarification. I somehow though one would need to use the buttonset function only if the default key config needed to be changed, but that wasn't the case. I used the function and now everything is working, well except the sounds.
hey I did this myself a month or two ago.
there it is if you want another option :D
[Please log in to post a comment]