Running Theme Hospital on Android with CorsixTH

I’ve used the Android SDK for a few bits and pieces, but I’ve never tried to work with the Android NDK before. So, as an attempt to try to find my way around it, I set myself the goal of porting one of my favourite games – Theme Hospital – to the Android platform in the form of CorsixTH.

I’ve followed CorsixTH for a while, and they’ve made superb progress in recreating a Theme Hospital clone using the original assets from the game. There’s still a fairly extensive list of features in the original game that haven’t yet found their way into CorsixTH, but a large amount of the core game functionality is there.

CorsixTH has a great choice of open source libraries powering it, which actually made compiling it for Android surprisingly easy. In fact, SDL and some libraries that commonly accompany it have already been ported over with great success which really meant that all I had to do was rename a few functions and create a few makefiles to get it running; I’m sure that someone with experience with the NDK could do it in half the time it took me.

In any case, you can get the source code from my GitHub repository and there’s a link to the APK in the downloads section so that you can install it straight to your Android device without compiling the project yourself. I would happily invite anyone to fork the repository and make some improvements as there’s still a fair bit left to do, such as getting it to scale on different device resolutions and scrolling by dragging.

 

 

Download App

Download “CorsixTH for Android” CTH-0.7.1.apk – Downloaded 13204 times – 9 MB

Edit: Now also available on Google Play Store!

  • mr plow

    dude this is awesome, whats the deal with scrolling.. is there a way to do it without dragging?

    • http://gravatar.com/isengdoang isengdoang

      I found a Bug: Every Time I place an handyman game freeze and brings a Error Message. I didn’t found any help per Google.

      • http://www.armedpineapple.co.uk Alan

        It was a bug in CorsixTH. Should be fixed in the latest version.

  • http://www.armedpineapple.co.uk Alan

    @mr plow

    I’ve made it capture two fingers as being the equivalent of a middle mouse click on the desktop version, so you can now move around by pressing with two fingers and dragging. I’ve also disabled edge scrolling by default now, but if you’ve only got a single touch device, you can always enable it again.

    I was going to use two fingers as a right click action so it could be used to rotate an object before placing it, but I’ll think up a different way of doing it. Maybe have an icon that appears in the corner.

    • Harry

      Just wondering whether you managed to sort the right click feature? Love the game, excellent work!

      • http://www.armedpineapple.co.uk Alan

        What do you mean specifically about ‘sort’? It has been mapped to a long press since around v2 and I’ve not been made aware of any bugs relating to it since.

  • Mass

    Awesome! I’m keeping my eyes peeled for when you create a fully functional version!

  • Brandon

    Hey man, This is actually freaking awesome. I just got the game back the other night and remembered how much I like it. I work in an office so I would love to get the game working on my HTC android cell phone.. I was thinking about getting the files you have now but it seems as though you haven’t fully worked out the kinks yet. I listed my Email.. Keep in touch.. keep me updated. This is surely something I want for entertainment :p

  • Tim

    Wow.. looks nice and works really great. So my Question, it is possible to port SimTower with NDK? How can i find a Tutorial!?

  • Luke

    Installed this on my samsung galaxy note last night and it works really nicely. I’ve been using the notes stylus to play the game and have found that the mouse pointer doesnt allways line up with your stylus.

    Other then that this is fantastic stuff, downloaded the apk then put my GOG theme hospital files on the phone and I was away!

    Sound and music all work too to my suprise! Great stuff, thanks very much for your work.

  • http://www.armedpineapple.co.uk Alan

    @Tim
    Corsix-TH wasn’t too difficult to port because it’s open source and has been designed with the intention of running on multiple platforms. SimTower doesn’t really tick these boxes and would be so much more difficult – the only reasonable solution would be to emulate. There’s a couple of open source clones floating about that might be cool to port though!

    @Luke
    Glad everything worked for you. This is the first I’ve heard of this bug, but I’d like to figure it out. I’ve got a couple of things I can try and it’d be great if you’re willing to help me out – fire me an email if you’re interested.

  • shelly

    How exactly do i get theme hospital on my galaxys2? Never tried anything like this before and don’t know where to start. someone give me step-by-step? If it’s not too much trouble :-) thanks so much

  • Shane

    Hey Alan. Thanks for sharing CorsixTH for Android. I’ve installed it on my samsung galaxy note the other day and everything works fine except for the sound. Just wondering how do you fix this? thanks again!

    • http://www.armedpineapple.co.uk Alan

      Hi Shane. The only reason I can think for this is because your Theme Hospital game files are incomplete. Your ‘SOUND’ folder should be full of .MDI and .DIG files and the ‘MIDI’ folder within it should have a few .XMI files there. Try copying the files over again.

      Have you also made sure that you have enabled sound in the wizard? (You can revisit it by pressing the menu button).

      • Shane

        I have enabled the sound and downloaded some audio files. I think the music is working now, but i’m not sure about the other sound effects are working. Didn’t here the annoying paging lady, or other sound effects. Anyways, I’ll try to figure it out. Thanks again, mate!

      • http://www.armedpineapple.co.uk Alan

        You could try using the same files with the PC version of CorsixTH. That would tell you if it’s your original game files or not.

      • Shane

        Yeah. I made all the sound and audio work by copying ‘SOUND-0.DAT’ file from “DATA” folder of the PC version of Theme Hospital. Thanks!

      • Shane

        Hey Alan! Just wondering, how can you copy the saved game files? I want to continue playing CorsixTH on my laptop but my saved games are on my desktop. Is there a way i could export my saved games to other computers? Thanks!

      • http://www.armedpineapple.co.uk Alan

        If you’re using 0.2 or later, saved games should be on your SD card in a folder called ‘CTHsaves’. You can copy them to wherever you keep your saved games on your desktop. Where this is will depend on what operating system you run, but if you can locate your configuration file, they’re usually with that. http://code.google.com/p/corsix-th/wiki/ConfigurationFile

        I use Titanium MediaSync (https://play.google.com/store/apps/details?id=com.keramidas.MediaSync&hl=en) to sync files with my desktop, so you could use this with CTH if you wanted. Might be a bit fiddly though.

  • Pingback: Jouer à Theme Hospital sur Android

  • Pingback: Klassiker auf Android portiert: Theme Hospital - Androider

  • Pingback: Inoffizieller Port von Theme Hospital landet im Android Play Store » SmartDroid

  • Pingback: Classic Game "Theme Hospital" Ported To Android For Free, But Beware The Suspicious Paid Version In The Play Store

  • Pingback: Android Mania - Classic Game “Theme Hospital” Ported To Android For Free, But Beware The Suspicious Paid Version In The Play Store Free

  • Faruk Ahmet

    This is incredible… just the other day I was thinking to myself, ‘I wish I could play Theme Hospital on my tablet’… and here it is!
    However, I can’t seem to make it work. It asks for ‘the original files’, which I can’t find. See the screenshot: http://db.tt/EjlMCzlj
    (I’m on a Kindle Fire running a custom CM9/ICS ROM)

  • Pingback: Theme Hospital disponible sur Android | Jobbr fr

  • Pingback: Classic Game "Theme Hospital" Ported To Android For Free, But Beware The Suspicious Paid Version In The Play Store | Approid.co

  • Pingback: Theme Hospital is available for free for Android devices, paid version violates MIT license | Make It Android

  • Gordo

    I have been trying to get this to work for the longest time on my computer.. with no results. i saw the post and installed it,got it working and love it

  • Gordo

    i think i accidentally published it. my mistake. wanted to add i have had the original cd for a long time, and managed to replace the demo with fullversion. now i can play all day!plus since my a500 works with a mouse, thats super sweet!

    @Alan just wondering, option to add external mouse option?or is that too crazy to ask to revert back to mouse control?
    also, since unlocking my gt-i9000 i have revived my interest in this and have an additional question.
    @Alan would it be possible to do the same for Interstate ’76? or would that be easier to emulate? i would love to put my time towards that for everyone.
    just a thought, that was another game i loved, but much larger files and came out at the same time (1997).

    @Faruk check around /sdcard/Android/data folder .. somewhere there should be data files and uk.co.armedpineapple… folder. thats where the data saves. i found if i menu at the error screen, go back to setup after downloading demo, and choose default, it worked for me. or search for the folder under android/data/uk.co.armedpineapple

  • dimas

    can’t instal on my optimus 2x

  • Pingback: Theme Hospital: Play Store-Version illegal, korrekte Version kostenlos

  • Mikhail

    I’ve installed this game and built my first hospital – it was a great nostalgic feeling :)
    But after that I realised that I don’t have any patients. What am I doing wrong?

    • Shane

      @Mikhail You have to purchase a reception desk and hire a receptionist. And you have to click the “pointing hand” to let the patients know that your hospital is now ready to accept them.

  • Ben F

    Trying to get Tm installed but it’s asking me for original game data, not sure what I’m looking for and how to select. Nothing under sdcard/tm where I thought it might be. Appreciate any assistance. Thanks

    • Shane

      @Ben You have to download the demo or full version TH game and put them on your sdcard/tm folder. I hope that’ll work.

      • Alec

        How do you download the full version?
        Going through the setup originally it asked for the location of the original files, but I couldn’t see any way of actually selecting a folder. (long press, short press etc just highlights)
        I redid setup and selected the demo option which doesn’t require selecting the location of original files.

      • Shane

        You have to search for the TH game full version free download. Or you could just pay for it.
        You have to connect your phone to a desktop computer or laptop to access your memory card(or internal memory) and put the original game on sdcard/tm folder.

  • Pingback: [23/05/12] -Daily short Top 5- » anDROID NEWS & TV

  • Pingback: Treat yourself to Theme Hospital for Android | Pocket Tactics

  • Pingback: Theme Hospital disponible sur Android

  • http://www.chugsonline.co.uk Simon Nemeth

    You’ll be pleased to know that the dodgy infringing port on Google Play has been removed by Google. It seems they received a number of complaints from users about using your code (an infringment of the MIT licence) and the app’s dodgy access requirements aswell (a possible invasion of privacy).

  • Pingback: Unofficial paid-for Theme Hospital Android game removed from Google Play | Android news

  • Pingback: Android Hub Network - All Android News in one place

  • Pingback: 45 Best New Android Games From The Last 3 Weeks (5/19/12 - 6/10/12)

  • Pingback: Android Hub Network - All Android News in one place

  • Pingback: Android Mania - 45 Best New Android Games From The Last 3 Weeks (5/19/12 – 6/10/12) Free

  • Pingback: HandyCheck - Startseite

  • Pingback: CorsixTH v0.2.2 9( 0.2.2.9) apk download | Free Apps Download for Android

  • Andrew

    this is cool – ever thought of porting oolite, that would be cool too.

  • Andrew

    Got this working with the demo, but can’t make it work with the original files. I’ve copied the directory structure and contents to sd/th, but it asks for the location. On clicking mnt/external_sd/th it highlights green and crashes out. I know the files are ok, because the PC version works with the same ones. Any ideas? I’m using and android 4 (ics) tablet.

    thanks

  • Anonymous

    Wish it would be possible to run the original Deus Ex on android… one of the best games ever

    • http://www.armedpineapple.co.uk Alan

      It’s available with OnLive (http://www.onlive.co.uk/). Don’t really know how good it is, but it’s free to try.

  • gamer

    (Samsung Galaxy Tab 2 10.1) for me, this doesnt really work.
    In the wizard,i choose the th folder (yes, i copied every file of the original game to that folder), it highlights the name green and then, the app just shuts down. Shame, cause i really wanna play this fantastic game where ever i go!

    • http://www.armedpineapple.co.uk Alan

      Uninstall the version you’ve got at the moment and try the latest test version. If you choose ‘Automatically Detect’, it will go searching for your files.

  • Pingback: Theme Hospital Android | Mobile App & Games

  • tango

    Was super excited about this. loved this game since i was a kid! but it always locks up after it makes you build the first GP’s office. the edit window wont close and pushing other buttons just turns them red, and you cant continue the game.

    tried several reinstalls, different versions of Corsix, downloaded the demo version each time with the same result.

    cool idea, but very frustrated. :\

    • http://www.armedpineapple.co.uk Alan

      I can’t replicate this with the latest version (0.3).

      The symptoms you’re having indicate a game error, so either corrupt game files or a bug in CorsixTH, but like I say, I can’t replicate this with the demo files and the version included with the app.

      Try uninstalling and redownloading 0.3, and if it’s still a problem, send me an e-mail and I’ll try to find out what’s going wrong.

  • Anonymous

    hi downloaded the game about half an hour ago and it has crashed every time i tried to play after the first 10 mins i am on a HTC sense tablet 3.2.1 version, also i don’t quite understand how to get the full version as I’m not that greta with comps and i am on a mac, if you could simplfy this for me?

    • http://www.armedpineapple.co.uk Alan

      Make sure you’re running the latest version.

      Also, the full version can be found on GOG for a few quid and is fully compatible. http://www.gog.com/gamecard/theme_hospital. You just need to extract the files that you download onto your SD card. Full instructions can be found on the project page.

  • http://gravatar.com/flyingmanu flyingmanu

    Hi,

    Strange thing for me: I did put the full game in sd/th, launched the apk: the game works after setup. But when I quit, and want to launch via the Corsixth icon: nothing happens.

    Any idea of what I’m doing wrong ? Thanks for all this good work !

    • http://www.armedpineapple.co.uk Alan

      There’s a bug in some of the latest versions which is causing problems. You may want to try 0.3 which is known to be fairly stable, otherwise if you can wait for a few days then I think I’ll have a build that’s slightly more stable.

  • Alex

    just wanted to thank you for your awsome work ;)

  • mys

    This app is so cool! any chance you can get Dungeon Keeper working on Android too :-)
    anyway i just wanted to find out how you rotate objects when placing them?

    • http://www.armedpineapple.co.uk Alan

      Thanks. I think your best bet for Dungeon Keeper is go use one of the many DosBox ports.

      Press and hold to rotate, if you’re using one of the newer versions.

  • Manuel

    Hey, i have installed this app on my asus t300tf. Everything works fine, but how can i rightclick to turn around tables or other things. I saw in a video that a player rightclick by holding the table with the one finger and tapping with a second one, but this does not work for me.
    Sorry for my really bad english and thank you for this great port of a wonderful game.

    • http://www.armedpineapple.co.uk Alan

      That video is old. Press and hold to rotate in the newer versions.

  • Harry Tennent

    Apologies, I was trying everything but I didn’t think of that! Many thanks

    • http://www.armedpineapple.co.uk Alan

      No worries. I get asked it a lot, despite the fact that it’s on the home page and in the Google Play description. Do you think it would be better if I added another page to the setup wizard with the controls on it so that they’re at least displayed in-game?

  • Dewi

    Hi. Loving the game. On my second hospital now. Game crashed after a while (can still pick things and people up) the staff and patients don’t move. Made sure game was NOT paused. Saved the game and tried re-opening the game and loading the save game. Still nothing. I guess i have to start the whole game over again! Dissapointing :(

    • http://www.armedpineapple.co.uk Alan

      That’s a shame. When it freezes like that it’s almost definitely because of a bug in CorsixTH itself. Make sure you’re running the latest version, because I merge in all the changes from CorsixTH every version and there can often be quite a few bug fixes included in that.

      If you wish me to identify which bug in particular it could be then please send me an e-mail and I can guide you through sending me the relevant debugging information. Otherwise you’ll have to restart the level unfortunately, or try loading from a save game before the error occured.

  • Jeny

    Hi i’m so glad i found ur website. But unfortunatelly my device is blackberry 10. So i tried to convert to bar. I could launch the setup wizard but it keeps asking for the th original files. I downloaded the demo and locate it directly to …/demo/HOSP but still no luck..

    Help please
    Thank you

    • http://www.armedpineapple.co.uk Alan

      Unfortunately, it is only supported on pure Android devices at the moment. Blackberry devices are incompatible. If I can get my hands on one, I’ll try to build support in the future. Although curiously, if it were to fail it would be when the game engine itself loads, not whilst it was trying to find the files in the setup wizard.

  • Stoddy

    Hey Nice to see this game on tablet :) does et come to ipad as well?…please i hope it does i miss this game…… :)

    • http://www.armedpineapple.co.uk/ Alan Woolley

      It’s unlikely to happen in the near future because I don’t own any of the kit required for iOS development. That and iOS is a notoriously closed platform, it wouldn’t make porting as easy as it was for Android. Never say never though.

  • Brian

    Hi Alan, I found this game a few days ago and was hooked on the original years ago. I am having a problem with the game freezing on April 10 (100 days in). I have Corsix TH 0.5.2 and have my original files loaded on a Samsung tablet running Jellybean (4.1.1). Have you heard of anyone else experiencing this problem?

    • http://www.armedpineapple.co.uk/ Alan Woolley

      What sort of freeze? Does the ‘app not responding’ dialog appear or is it the game engine throwing an error?

      • Brian

        Everything stops. There are no error codes being displayed. When I start a new simulation, that may freeze on a different date, but when that one freezes, it is always on that new date. I am attempting to see if it is a certain character beinghired as a staff member. I do not think that is the problem though.

      • http://www.armedpineapple.co.uk/ Alan Woolley

        If you email me the log files located in /sdcard/Android/data/uk.co.armedpineapple.cth/files then I can take a look for you. They’re called cthlog.txt and ctherrlog.txt.

  • Slanzinger

    Love this! It’s brilliant! Quick question though – how do you right-click? I’m running on a Nexus 7 (downloaded CorsixTH from the Google Play store today) – saw your post somewhere below saying that it’s bound to a long press, but I can’t seem to get that to work. Any advice?

    • Slanzinger

      Scratch that… Turns out it’s working. Very odd. Ah well. I’m sure I’ll be having lots of fun with this! Thank you for the port! =)

  • travis

    Hello! Thanks for your work, its amazing. I have a little problem: the game is in pause mode, and i dont know how to leave it. In the original game it was P but on thetablet… thanks in advance

    • http://www.armedpineapple.co.uk/ Alan Woolley

      Change the game speed. I think it’s the top option in the menu.

  • allan

    hi alan,

    i’ve already download from google play, and create th folder (Anims & level), but still cannot locate when install, please help me…..

    • http://www.armedpineapple.co.uk/ Alan Woolley

      Have you read through the instructions on this page? http://www.armedpineapple.co.uk/projects/corsixth-for-android/using-the-full-version-of-theme-hospital/

      You should also make sure that Theme Hospital is from a legitimate source, such as one of those listed on the FAQ, ideally gog.com or the original CD. Downloading from abandonware sites has been known to cause problems with CorsixTH.

      • allan

        hi alan,

        thanks for quick reply. I have downloaded and successfully play on pc, but did not find a file that you meant to be copied on my tablet.

        Thanks

      • allan

        hi alan,

        I try to copy all files, and it works. No longer demo.

        Thanks

  • Robertο

    I read the FAQ but can’t seem to be able to rotate items… Could you be more specific?

    • http://www.armedpineapple.co.uk/ Alan Woolley

      Do exactly the same thing as you do to pick up items. You just need to press and hold anywhere on the screen.

  • gago

    How to unpause the game? :)

  • amyh88

    Is there a way of downloading it without original files?

    • http://www.armedpineapple.co.uk/ Alan Woolley

      You can download and play with the demo files but if you want access to the entire game then you’ll need to own the full version of Theme Hospital first.

  • lola

    It says you already have to have the paid version for it to work?

    • http://www.armedpineapple.co.uk/ Alan Woolley

      If you own the full version then you can use that with CorsixTH. If not, you have to use the demo to play. The demo is included.