Touch version of OpenTTD, for Windows tablets

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
pelya
Transport Coordinator
Transport Coordinator
Posts: 301
Joined: 18 Nov 2010 19:48
Contact:

Touch version of OpenTTD, for Windows tablets

Post by pelya »

OpenTTD 1.8.0 with 'fat fingers touch' interface:
32-bit Windows: https://sourceforge.net/projects/libsdl ... p/download
64-bit Windows: https://sourceforge.net/projects/libsdl ... p/download

All buttons are bigger, there are on-screen Ctrl and Shift buttons, toolbar moved from the top to the left and right sides of the screen, and there's a confirmation dialog when you build anything, with estimated price shown automatically. 'Save to network' does not work. Pinch-zoom gesture is working.
Delete your old openttd.cfg for best results.

---------

There was a Reddit post about OpenTTD running on Ubuntu tablet, so naturally, I've compiled OpenTTD with Android patches for that tablet, and looks like it's playable using touchscreen only.

Which brought up the old topic in my head, about OpenTTD for convertible things other than Android, like Microsoft Surface tablet, or whatever Linux version you are running on your touchscreen POS terminal (and I mean 'point of sale' not 'piece of s***', however most POS terminals I've seen are pretty s*** indeed).

I don't need to worry about Chromebooks, because they run Android apps now.

But people keep buying Windows tablets, as I understand, so having a separate version of OpenTTD with big buttons kind of makes sense.

There are two roadblocks for this - first, is that I'm lazy, and second, is that I hate Windows and MSVC. I might whip up a quick dirty port, if there's enough interest.

Another issue is how to advertise it - I'm pretty sure my touch version won't get a stop on openttd.org front page, and Windows Store seems to accept only UWP apps, and UWP is not supported by SDL 1.2.

If you have Windows tablet or other touchscreen device, and want to see touch version of OpenTTD, please share your thoughts.
Last edited by pelya on 19 Jun 2018 17:58, edited 5 times in total.
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 3985
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Touch version of OpenTTD, for non-Android tablets

Post by NekoMaster »

Well what is the issue with playing OPenTTD on a Windows or LInux touch screen? Do mouse clicks not register properly? Touch/Clicking and dragging does work?
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
pelya
Transport Coordinator
Transport Coordinator
Posts: 301
Joined: 18 Nov 2010 19:48
Contact:

Re: Touch version of OpenTTD, for non-Android tablets

Post by pelya »

Clicking and dragging does work fine, this is more about the size of your fingers.

Image
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9419
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Touch version of OpenTTD, for non-Android tablets

Post by planetmaker »

Sounds like an issue which is solved by choosing proper config, like larger fonts and maybe by default a 2x zoom (instead of the usual 1x).
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 3985
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Touch version of OpenTTD, for non-Android tablets

Post by NekoMaster »

Yeah, I didn't think about that. If you edit your config you can use larger fonts, and in game you can change menu sizes to 2x (though even on a 1920x1080 monitor some windows look a little too big for me)
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
pelya
Transport Coordinator
Transport Coordinator
Posts: 301
Joined: 18 Nov 2010 19:48
Contact:

Re: Touch version of OpenTTD, for non-Android tablets

Post by pelya »

Well, you can improve things by messing up with font size and GUI scale options, but only so much. The best button size is when it's 1/10 of the screen height, and if you blow up fonts that much, no dialog will fit the screen. Android version has button height of 1/12 of the screen height, and yes, people are complaining that buttons are too small. Here's a PC screenshot, with 2x GUI zoom and 720x480 resolution, and the 'touch' version with the same settings and 1x GUI zoom.

Image

---

Image
pelya
Transport Coordinator
Transport Coordinator
Posts: 301
Joined: 18 Nov 2010 19:48
Contact:

Re: Touch version of OpenTTD, for non-Android tablets

Post by pelya »

I've build Win64 version of OpenTTD with the touch interface:

https://sourceforge.net/projects/libsdl ... -win64.zip

Strangely enough, it even supports pinch-zoom gesture.
trjp
Engineer
Engineer
Posts: 2
Joined: 29 Apr 2017 02:09

Re: Touch version of OpenTTD, for non-Android tablets

Post by trjp »

pelya wrote:I've build Win64 version of OpenTTD with the touch interface:

https://sourceforge.net/projects/libsdl ... -win64.zip

Strangely enough, it even supports pinch-zoom gesture.
Just wondering if it might be possible to get 32bit build of that version - I have one of those cheapo Windows tablets (Linx) and it's limited to 32bit (2Gb RAM)

I know from running Bluestacks that the Android version is quite playable but the native Windows version would obviously be better

Thanks!
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 3985
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Touch version of OpenTTD, for non-Android tablets

Post by NekoMaster »

trjp wrote:
pelya wrote:I've build Win64 version of OpenTTD with the touch interface:

https://sourceforge.net/projects/libsdl ... -win64.zip

Strangely enough, it even supports pinch-zoom gesture.
Just wondering if it might be possible to get 32bit build of that version - I have one of those cheapo Windows tablets (Linx) and it's limited to 32bit (2Gb RAM)

I know from running Bluestacks that the Android version is quite playable but the native Windows version would obviously be better

Thanks!
If the CPU is a modern single core or multi core CPU, then it should support installing 64-bit versions of Windows, even if you don't have more then 4GB of RAM.
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
trjp
Engineer
Engineer
Posts: 2
Joined: 29 Apr 2017 02:09

Re: Touch version of OpenTTD, for non-Android tablets

Post by trjp »

NekoMaster wrote:
trjp wrote:
pelya wrote:I've build Win64 version of OpenTTD with the touch interface:

https://sourceforge.net/projects/libsdl ... -win64.zip

Strangely enough, it even supports pinch-zoom gesture.
Just wondering if it might be possible to get 32bit build of that version - I have one of those cheapo Windows tablets (Linx) and it's limited to 32bit (2Gb RAM)

I know from running Bluestacks that the Android version is quite playable but the native Windows version would obviously be better

Thanks!
If the CPU is a modern single core or multi core CPU, then it should support installing 64-bit versions of Windows, even if you don't have more then 4GB of RAM.
The Linx is forced to run 32bit Windows 8/10 by it's BIOS - it's also a WIMBOOT install which makes replacing it a pain-in-the-ass - hence a 32bit executable is the only way to run it (and Linx tablets are quite popular so it should have an audience)
vithrell
Engineer
Engineer
Posts: 1
Joined: 15 Jun 2017 10:44

Re: Touch version of OpenTTD, for non-Android tablets

Post by vithrell »

NekoMaster wrote:
trjp wrote:
pelya wrote:I've build Win64 version of OpenTTD with the touch interface:

https://sourceforge.net/projects/libsdl ... -win64.zip

Strangely enough, it even supports pinch-zoom gesture.
Just wondering if it might be possible to get 32bit build of that version - I have one of those cheapo Windows tablets (Linx) and it's limited to 32bit (2Gb RAM)

I know from running Bluestacks that the Android version is quite playable but the native Windows version would obviously be better

Thanks!
If the CPU is a modern single core or multi core CPU, then it should support installing 64-bit versions of Windows, even if you don't have more then 4GB of RAM.
Yes, I probably could reinstal 64 bit Windows, but me and most of BayTrail based tablet users would greatly appreciate 32bit build anyway so they wouldn't have to reinstall OS.
pelya
Transport Coordinator
Transport Coordinator
Posts: 301
Joined: 18 Nov 2010 19:48
Contact:

Re: Touch version of OpenTTD, for Windows tablets

Post by pelya »

I'll try to build a 32-bit version when 1.7.1 will be released. My free time is limited lately, sorry for no updates.
pelya
Transport Coordinator
Transport Coordinator
Posts: 301
Joined: 18 Nov 2010 19:48
Contact:

Re: Touch version of OpenTTD, for Windows tablets

Post by pelya »

I've compiled touch version 1.7.1 for 64-bit Windows: https://sourceforge.net/projects/libsdl ... -touch.zip
Unfortunately 32-bit version ended up being tricky, when I follow the MXE instruction on wiki the resulting build crashes on start. Maybe someone could give me a bunch of precompiled libraries and a build script? :roll:
SimYouLater
Chief Executive
Chief Executive
Posts: 675
Joined: 03 Apr 2016 20:19

Re: Touch version of OpenTTD, for Windows tablets

Post by SimYouLater »

pelya wrote:I've compiled touch version 1.7.1 for 64-bit Windows: https://sourceforge.net/projects/libsdl ... -touch.zip
Unfortunately 32-bit version ended up being tricky, when I follow the MXE instruction on wiki the resulting build crashes on start. Maybe someone could give me a bunch of precompiled libraries and a build script? :roll:
Right now I'm having to borrow a family member's windows tablet-convertible, as my laptop is experiencing issues severe enough that the retailer I bought it from told me that, as it's under their store warranty and they try to honor it as best they can, they would have to send it to the manufacturer for repairs on my behalf because they can't fix it without specialized tools.

I would like to be able to play OpenTTD on a tablet like this if no other computers are available; unless I have it docked with the keyboard accessory (which has the only USB port) and use a mouse, it's basically impossible to do so on this device, ruining the portability aspect.

I'm also looking into getting this... http://pgslab.com ...as my phone contract has almost ran out and my laptop might not be fixable, and with a laptop being $1000 (I'm not in the US) and a smartphone contract no longer being appealing, the device being pre-ordered on that site is far cheaper ($600 US is still far less than a new phone AND a new laptop).

Because the android version no longer updates to newer stable versions, the above two reasons make having this included in trunk very appealing to me as well. Are you still working on it?
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
pelya
Transport Coordinator
Transport Coordinator
Posts: 301
Joined: 18 Nov 2010 19:48
Contact:

Re: Touch version of OpenTTD, for Windows tablets

Post by pelya »

I'll update it along with Android version, at least 64-bit build.
SimYouLater
Chief Executive
Chief Executive
Posts: 675
Joined: 03 Apr 2016 20:19

Re: Touch version of OpenTTD, for Windows tablets

Post by SimYouLater »

Alright, glad to hear it. Thanks for working on this, it definitely belongs in stable at some point.
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
pelya
Transport Coordinator
Transport Coordinator
Posts: 301
Joined: 18 Nov 2010 19:48
Contact:

Re: Touch version of OpenTTD, for Windows tablets

Post by pelya »

Bump. Updated to 1.8.0: https://sourceforge.net/projects/libsdl ... p/download
I will try to build 32-bit version once again this week, maybe they have finally fixed MXE.
pelya
Transport Coordinator
Transport Coordinator
Posts: 301
Joined: 18 Nov 2010 19:48
Contact:

Re: Touch version of OpenTTD, for Windows tablets

Post by pelya »

32-bit version is finally available: https://sourceforge.net/projects/libsdl ... p/download
arjan1995
Engineer
Engineer
Posts: 1
Joined: 15 Apr 2021 11:53

Re: Touch version of OpenTTD, for Windows tablets

Post by arjan1995 »

Hi folks,

I've compiled the latest version of OpenTTD, 1.11.0, with the touchscreen user-interfase for Windows-based tablets!

It's basically the same as the Android version of OpenTTD, so much like all previous versions and posts: all credits go to pelya.

This version is built for both 32-bit and 64-bit Windows tablets and should run at least on Windows 7 and up.

I haven't tested everything, but the main gameplay seems to work as you would expect.
This includes navigation of the map, building, saving / loading games, starting a new game, using AI / GameScript / NewGRF, sounds / music.
I've also connected to a few online servers. It seems to work, but large maps may cause performance issues or disconnects on lower-end tablets (like my Acer W500).
Stick to smaller maps if your tablet can't keep up with the game.

Downloads:
32-bit: https://github.com/arjanvlek/openttd-an ... -touch.zip
64-bit: https://github.com/arjanvlek/openttd-an ... -touch.zip

Source code:
You can find the sources for this release at https://github.com/arjanvlek/openttd-an ... 1.11.0-r1

Known issues / FAQ:

The game may crash on startup (showing "assertion failed", a "fatal error" prompt or "OpenTTD.exe has stopped working"), but there is a workaround!
If this happens, it is likely caused by the new "Hardware acceleration" not being compatible with your tablet's graphics card or graphics drivers.
To fix this, disable hardware accelearation by editing the config file.
Open the file

Code: Select all

C:\Users\<your_name>\Documents\OpenTTD\openttd.cfg
with a text editor and add the following to the end of the first section (

Code: Select all

[misc]
, right above

Code: Select all

[win32]
):

Code: Select all

video_hw_accel = false
This should disable the accelaration and prevents the game from crashing. However, you'll not get the performance improvements of 1.11.0.

The game may freeze on a black screen and not show the main menu (but not crash). This can also be fixed!
This could happen if you haven't installed OpenGFX. Usually, the game should prompt you to download a 'graphics set', but this version sometimes doesn't.
Solution: Download OpenGFX yourself. It's available from https://www.openttd.org/downloads/openg ... atest.html.
Then, extract the .zip file and place the OpenGfx.TAR file in following folder:

Code: Select all

C:\Users\<your_name>\Documents\OpenTTD\content_download\baseset\
The next time you start the game, it should find the graphics set and show the main menu.
You can then download the sounds (OpenSFX) and music (OpenMSX) from the in-game menus, using the option "Download online content".

There are no sounds and music playing. How can I get sound working?
This standalone version of OpenTTD does not come with the sound and music files included (just like the .zip files of the official releases).
Download the sounds (OpenSFX) and music (OpenMSX) using the in-game menu button named "Download online content".

Is there a touchscreen version of the game for ARM-based Windows tablets?
I don't have compiled the game for the ARM version of Windows yet.
If you have interest, please reply to this topic and I'll see if I can build it as well.
In the meantime, you can try using the 32-bit version (via emulation, may run slowly or crash) or use the regular, non-touch version of OpenTTD. The official release now has an ARM version that should offer good performance and stability.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 13 guests