OpenTTD webapp with touch interface for iPhone/iPad
Moderator: OpenTTD Developers
OpenTTD webapp with touch interface for iPhone/iPad
Would you please try it on iPad or iPhone? Simply open this link:
https://pelya.github.io/openttd-touch-webapp
It runs more or less okay in both Chrome and Firefox on my Android phone, but I don't have any Apple mobile devices to test.
Most of the Emscripten porting was already done by Milek7, I've only added fullscreen switching and a few fixes for 1.11 branch.
Running OpenTTD in the web browser is probably the only legal way to get it into the Apple Store, with the GPL code downloaded from the website, and the 'app' consisting of a simple WebView + WebSocket proxy server for multiplayer support. I can only theorize about that, I don't have any Apple desktop PCs to run XCode, and I don't have Apple developer account anyway.
What works: starting new game, downloading NewGRFs, building stuff, savegames, switching into fullscreen mode, FPS is acceptable, adding the link to your home screen.
What does not work: music plays only sometimes, video resolutions are wonky, non-English languages, multiplayer, pinch-zoom, tutorial, text input, cloud saves. All of these can be fixed in the future, except for cloud saves, which I think I'll replace with simply downloading the savegame the same way you download files using a web browser.
https://pelya.github.io/openttd-touch-webapp
It runs more or less okay in both Chrome and Firefox on my Android phone, but I don't have any Apple mobile devices to test.
Most of the Emscripten porting was already done by Milek7, I've only added fullscreen switching and a few fixes for 1.11 branch.
Running OpenTTD in the web browser is probably the only legal way to get it into the Apple Store, with the GPL code downloaded from the website, and the 'app' consisting of a simple WebView + WebSocket proxy server for multiplayer support. I can only theorize about that, I don't have any Apple desktop PCs to run XCode, and I don't have Apple developer account anyway.
What works: starting new game, downloading NewGRFs, building stuff, savegames, switching into fullscreen mode, FPS is acceptable, adding the link to your home screen.
What does not work: music plays only sometimes, video resolutions are wonky, non-English languages, multiplayer, pinch-zoom, tutorial, text input, cloud saves. All of these can be fixed in the future, except for cloud saves, which I think I'll replace with simply downloading the savegame the same way you download files using a web browser.
Re: OpenTTD webapp with touch interface for iPhone/iPad
Scrolling the web browser window on an iPhone XS running IOS 14.4.2 insta-crashes OpenTTD, have to refresh the browser window to get it back.
Edit; should mention, Safari, and it doesn't appear to be scrolling but *any touch input whatsoever*.
Let me know what test cases you want me to go through
Edit; should mention, Safari, and it doesn't appear to be scrolling but *any touch input whatsoever*.
Let me know what test cases you want me to go through
Currently working under the name 'reldred' on Github, and Discord.
NFO/NML coder, part-time patch writer for JGRPP, and all round belligerent.
14:40 <orudge> I can't say I discriminate against any particular user
14:41 <Aegir> orudge: I can!
NFO/NML coder, part-time patch writer for JGRPP, and all round belligerent.
14:40 <orudge> I can't say I discriminate against any particular user
14:41 <Aegir> orudge: I can!
- orudge
- Administrator
- Posts: 25147
- Joined: 26 Jan 2001 20:18
- Skype: orudge
- Location: Banchory, UK
- Contact:
Re: OpenTTD webapp with touch interface for iPhone/iPad
iPhone 12, iOS 14.5 - the title screen loads and works, pressing anything at all crashes it (at which point the music and sound effects start playing!)
Re: OpenTTD webapp with touch interface for iPhone/iPad
Thank you. My guess is that it crashes because it tries to enter fullscreen mode. I've disabled fullscreen mode for now, could you please try it again with the same URL?
Do you see the game main menu if you don't tap the screen? Does it play sounds? Does it show an error message about insufficient RAM for sprite cache?
Do you see the game main menu if you don't tap the screen? Does it play sounds? Does it show an error message about insufficient RAM for sprite cache?
- orudge
- Administrator
- Posts: 25147
- Joined: 26 Jan 2001 20:18
- Skype: orudge
- Location: Banchory, UK
- Contact:
Re: OpenTTD webapp with touch interface for iPhone/iPad
It now seems to work pretty much perfectly for me!
Re: OpenTTD webapp with touch interface for iPhone/iPad
Thanks. There should be an option in the web browser to add the webapp to home screen, it's called 'Add to home screen' in Chrome and 'Install' in Firefox. If you launch the webapp using the home screen icon, it should hide the browser toolbar and open in fullscreen mode automatically.
I'll keep working on it bit by bit.
I'll also need to find some developer with MacBook and $100 to publish 'OpenTTD webapp launcher' app to the App Store, and also explain long and hard about GPL and why the app shouldn't be removed to Apple support. App Store requires your app having some extra functionality compared to your website, the app will open WebView in fullscreen mode and lock it in the landscape orientation, so it kinda barely passes, and in the future it will also have a WebSocket proxy for multiplayer. Would be a shame if it will also have ads, but I won't have any control over that.
I'll keep working on it bit by bit.
I'll also need to find some developer with MacBook and $100 to publish 'OpenTTD webapp launcher' app to the App Store, and also explain long and hard about GPL and why the app shouldn't be removed to Apple support. App Store requires your app having some extra functionality compared to your website, the app will open WebView in fullscreen mode and lock it in the landscape orientation, so it kinda barely passes, and in the future it will also have a WebSocket proxy for multiplayer. Would be a shame if it will also have ads, but I won't have any control over that.
- orudge
- Administrator
- Posts: 25147
- Joined: 26 Jan 2001 20:18
- Skype: orudge
- Location: Banchory, UK
- Contact:
Re: OpenTTD webapp with touch interface for iPhone/iPad
We (as in the OpenTTD project) do have such an account, but we’d need to look and see what we can do.
-
- Traffic Manager
- Posts: 161
- Joined: 02 Mar 2009 02:07
Re: OpenTTD webapp with touch interface for iPhone/iPad
A bit of topic, don't know if it can be of any help:
Seems to run fine under Windows 7 with "Firefox" and "Min". Can go fullscreen with F11 under Firefox, not under Min (but it doesn't crash) when in intro menu. In game of course F11 brings the company list. I was surprised of the decent speed under Min, for a long time ago I had tried to run OTTD under Firefox and it was very slow.
Seems to run fine under Windows 7 with "Firefox" and "Min". Can go fullscreen with F11 under Firefox, not under Min (but it doesn't crash) when in intro menu. In game of course F11 brings the company list. I was surprised of the decent speed under Min, for a long time ago I had tried to run OTTD under Firefox and it was very slow.
Re: OpenTTD webapp with touch interface for iPhone/iPad
I'll tell you the secret how to make an app run fast. It's -O3 -flto.perverted monkey wrote: ↑07 May 2021 09:28 I was surprised of the decent speed under Min, for a long time ago I had tried to run OTTD under Firefox and it was very slow.
Re: OpenTTD webapp with touch interface for iPhone/iPad
ohh I like it... Just wasn't able to write something in the console screen. When I klick it the keyboard won't show up.
But for the rest it works pretty good. Keep it coming..
But for the rest it works pretty good. Keep it coming..
Re: OpenTTD webapp with touch interface for iPhone/iPad
Did some more testing.
Joining stations with CTRL button does not work for me on an iPad Pro. Also to release the CTRL button I have to go to game options and change the button size.
Joining stations with CTRL button does not work for me on an iPad Pro. Also to release the CTRL button I have to go to game options and change the button size.
Re: OpenTTD webapp with touch interface for iPhone/iPad
I've fixed Chinese and Arabic fonts not working.
I'm going to fix CTRL button and text input next week, and also pinch-zoom if I have time.
And here is a screenshot of it in the portrait orientation, for your entertainment.
I'm going to fix CTRL button and text input next week, and also pinch-zoom if I have time.
And here is a screenshot of it in the portrait orientation, for your entertainment.
Re: OpenTTD webapp with touch interface for iPhone/iPad
I've fixed Ctrl button and text input. I've also disabled zoom, because text edit box would zoom in and there was no way to zoom out, and the game resolution have decreased for some reason after that, making fonts barely readable. You can select different resolution from game options, but all of the resolutions listed there are not wide-screen, so I'm going to fix it next.
Pinch-zoom crashes the debug build of the game, there's some problem with SDL2 and Emscripten.
Also there's a page visit counter now during page load, it's at 200 total visits now. I'm not asking for 70 000 active daily users as with Android version, but this number is still a bit pathetic. I hope this will change if we get a launcher app into the Apple store.
Pinch-zoom crashes the debug build of the game, there's some problem with SDL2 and Emscripten.
Also there's a page visit counter now during page load, it's at 200 total visits now. I'm not asking for 70 000 active daily users as with Android version, but this number is still a bit pathetic. I hope this will change if we get a launcher app into the Apple store.
Re: OpenTTD webapp with touch interface for iPhone/iPad
Thanks for the updates, time to test again.
Re: OpenTTD webapp with touch interface for iPhone/iPad
The iPhone version is online now, great!!
Link: https://apps.apple.com/us/app/openttd/id1585549844 or just search in the apple app store.
Link: https://apps.apple.com/us/app/openttd/id1585549844 or just search in the apple app store.
Re: OpenTTD webapp with touch interface for iPhone/iPad
Grab it while it's available on App Store, it will be taken down eventually. It looks 1:1 identical to the Android version, and I guess it was compiled from the same sources.
Re: OpenTTD webapp with touch interface for iPhone/iPad
It's been available for at least a month now, maybe longer.
Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!
Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Re: OpenTTD webapp with touch interface for iPhone/iPad
In the web app version is there a way to upload save files (eg. those created by playing on a normal computer)? This would make it even more amazing...
Re: OpenTTD webapp with touch interface for iPhone/iPad
Yes it's possible. Click 'Load' - 'Load from network'
The label is intentionally confusing, on Android it will load from the cloud, and I was too lazy to fix it.
The label is intentionally confusing, on Android it will load from the cloud, and I was too lazy to fix it.
Re: OpenTTD webapp with touch interface for iPhone/iPad
Sorry, but that button doesn't seem to do anything on my iPad. When touching it the "Load game" screen just disappears and no menu for uploading a save file is opened.
Who is online
Users browsing this forum: Google [Bot] and 2 guests