OpenXcom Forum

Modding => OpenXcom Extended => OXCE Builds & Ports => Topic started by: Meridian on March 24, 2019, 04:17:00 pm

Title: OXCE v7.12 for iOS (iPhone/iPad)
Post by: Meridian on March 24, 2019, 04:17:00 pm
OXCE is now available also for iOS.

You need to build it yourself though, no AppStore.
Source code and build instructions: https://github.com/MeridianOXC/openxcom-ios/tree/oxce-plus

...or try 3rd party AppStore / github IPA build: https://openxcom.org/forum/index.php/topic,8327.0.html
Title: Re: OXCE v5.3 for iOS (iPhone/iPad)
Post by: magus66 on March 27, 2019, 06:21:30 am
Is this source up to date with the latest oxce/openxcom?
Title: Re: OXCE v5.3 for iOS (iPhone/iPad)
Post by: Meridian on March 27, 2019, 09:29:21 am
Is this source up to date with the latest oxce/openxcom?

yes
Title: Re: OXCE v5.4 for iOS (iPhone/iPad)
Post by: Meridian on April 23, 2019, 09:47:31 pm
OXCE for iOS updated to v5.4
Title: Re: OXCE v5.4 for iOS (iPhone/iPad)
Post by: bran479 on June 20, 2019, 11:58:09 pm
Question:  I got everything built and transferred to my device. YAY!
does anyone get a black screen when quit button is pressed?

That is the only quirk

Then I manually kill app
Title: Re: OXCE v5.4 for iOS (iPhone/iPad)
Post by: Meridian on June 21, 2019, 12:20:04 am
Question:  I got everything built and transferred to my device. YAY!
does anyone get a black screen when quit button is pressed?

That is the only quirk

Then I manually kill app

I have never actually tried the app on a real device :/
Only on a simulator... where it works fine.

Thanks for the feedback though, it's nice to know it actually works.
One day I'll borrow an iOS device from someone and try it myself...

Out of curiosity, can you tell me what is the video resolution of your device; and what resolution do you see in OpenXcom when you go into Options>Video? For some reason, on the simulator, the resolution in game was only half of the real device resolution.
Title: Re: OXCE v5.4 for iOS (iPhone/iPad)
Post by: bran479 on June 21, 2019, 12:37:46 am
Sure it was a really neat exercise not too good with app dev stuff. 
Device Ipad Pro Second Gen 12.9 inch - specs 2732 x 2048 pixels, 4:3 ratio

In options Under video 1366x1024
Title: Re: OXCE v5.6.1 for iOS (iPhone/iPad)
Post by: Meridian on August 03, 2019, 08:44:17 pm
OXCE for iOS updated to v5.6.1
Title: Re: OXCE v6.0 for iOS (iPhone/iPad)
Post by: Meridian on October 13, 2019, 11:18:44 am
OXCE for iOS updated to v6.0
Title: Re: OXCE v6.4 for iOS (iPhone/iPad)
Post by: EVOL on March 30, 2020, 08:37:24 pm
Can anybody please help me with doing the thing or do it for me? I'm really eager to try, yet I'm sort of noob when it comes to coding and my English might be not good enough to understand this stuff by myself.

I have an iPad 4 iOS 8 with JB.
Title: Re: OXCE v6.4 for iOS (iPhone/iPad)
Post by: Meridian on March 31, 2020, 12:07:09 am
Can anybody please help me with doing the thing or do it for me? I'm really eager to try, yet I'm sort of noob when it comes to coding and my English might be not good enough to understand this stuff by myself.

I have an iPad 4 iOS 8 with JB.

I have tried it only on emulators, since I don't own iPhone or iPad... but it could go like this:
1. Install XCode on your Mac
2. Download the OXCE source code: https://github.com/MeridianOXC/openxcom-ios/tree/oxce-plus
3. Compile the source using the instructions: https://github.com/MeridianOXC/openxcom-ios/blob/oxce-plus/README.md
4. Using the same instructions, deploy it on your iPad

You don't need to code anything yourself, but you need to be at least a bit familiar with coding under Mac to be able to follow those instructions.
Title: Re: OXCE v6.4 for iOS (iPhone/iPad)
Post by: EVOL on March 31, 2020, 02:20:36 pm
I have tried it only on emulators, since I don't own iPhone or iPad... but it could go like this:
1. Install XCode on your Mac
Oh right, I forgot a Mac is needed... No future I guess
Title: Re: OXCE v6.4 for iOS (iPhone/iPad)
Post by: dresser on April 02, 2020, 10:38:16 pm
OpenXcom works pretty well in the emulator and on my device
OpenXcomExtended -  build filed errors. Help, what am I doing wrong?
Title: Re: OXCE v6.4 for iOS (iPhone/iPad)
Post by: Meridian on April 03, 2020, 12:54:33 pm
What version of XCode do you have?

OpenXcomExtended requires C++17 support, maybe you just need to update...

It works for me, see attached screenshots.
(the game exited during startup because of missing UFO files... I'm too noob to know how to copy them... but it clearly started)
Title: Re: OXCE v6.4 for iOS (iPhone/iPad)
Post by: dresser on April 03, 2020, 08:43:34 pm
What version of XCode do you have?

OpenXcomExtended requires C++17 support, maybe you just need to update...

You are right, my Xcode v 9.2 and does not support C ++17. ((((
Title: Re: OXCE v6.4 for iOS (iPhone/iPad)
Post by: Yankes on April 03, 2020, 08:47:34 pm
Any other compiler? If I recall correctly main road block to compiler for iOS or OSX is having available SDK from APPLE, you already have it and switching compiler would be not hard (probably fresh clang would do the job).
Title: Re: OXCE v6.4 for iOS (iPhone/iPad)
Post by: Meridian on April 03, 2020, 08:52:51 pm
You are right, my Xcode v 9.2 and does not support C ++17. ((((

If you can't upgrade XCode, you might want to try OpenXcomExtended v5.6.2 from August 2019... that was the last version still compatible with c++11.

This commit: https://github.com/MeridianOXC/openxcom-ios/commit/829c28b2a13adfefbf1527587bfbcbbe4f0b4815
Title: Re: OXCE v6.4 for iOS (iPhone/iPad)
Post by: boozedog on April 14, 2020, 09:49:28 pm
Just installed this on my iPad and it's working great! Question ... anybody know the touch gesture to get my soldier to face a certain way?
Title: Re: OXCE v6.4 for iOS (iPhone/iPad)
Post by: Meridian on April 14, 2020, 09:51:30 pm
Just installed this on my iPad and it's working great! Question ... anybody know the touch gesture to get my soldier to face a certain way?

Tap and hold... at the spot the soldier should be looking at.

And thanks for the confirmation that it is actually working... I'm maintaining this branch practically blindly :)
Title: Re: OXCE v6.4 for iOS (iPhone/iPad)
Post by: dresser on April 14, 2020, 10:32:51 pm
Just installed this on my iPad and it's working great! Question ... anybody know the touch gesture to get my soldier to face a certain way?
or swipe to the side where the soldier should look , check these settings. 
Tap and hold... at the spot the soldier should be looking at.

And thanks for the confirmation that it is actually working... I'm maintaining this branch practically blindly :)
.Tap and hold also works.
Title: Re: OXCE v6.4 for iOS (iPhone/iPad)
Post by: dresser on April 14, 2020, 10:49:23 pm
If you can't upgrade XCode, you might want to try OpenXcomExtended v5.6.2 from August 2019... that was the last version still compatible with c++11.

This commit: https://github.com/MeridianOXC/openxcom-ios/commit/829c28b2a13adfefbf1527587bfbcbbe4f0b4815
.I cannot update Xcode, my mac does not support new operating systems. With OpenXcomExtended v5.6.2 from August 2019,  previous errors occur. Sorry for my bad English, because my native language is Russian. Anyway, thank you for trying to help.
Title: Re: OXCE v6.4 for iOS (iPhone/iPad)
Post by: boozedog on April 15, 2020, 02:41:46 pm
Tap and hold... at the spot the soldier should be looking at.

And thanks for the confirmation that it is actually working... I'm maintaining this branch practically blindly :)

Thanks for your work on this! Yes that did the trick!

Another question ... I am finding that the touch sensing is misaligned ... the touch is sensed to be lower than it actually is. Horizontal alignment is fine. I confirmed this by testing using Apple Pencil. Is there a way to fix this alignment myself?
Title: Re: OXCE v6.4 for iOS (iPhone/iPad)
Post by: Meridian on April 15, 2020, 03:57:07 pm
I don't know.
I'm not really a mobile developer, this is beyond my current knowledge.

Unless it is a general alignment problem (I assume it isn't), then it's probably a bug in OXC/E code... you can try contacting sfalexrog on GitHub (https://github.com/sfalexrog), he has implemented this functionality, I'm just trying to keep it alive.
Title: OXCE v6.5.3 for iOS (iPhone/iPad)
Post by: Daedalia on June 17, 2020, 04:57:49 pm
I have never actually tried the app on a real device :/
Only on a simulator... where it works fine.

Thanks for the feedback though, it's nice to know it actually works.
One day I'll borrow an iOS device from someone and try it myself...

Out of curiosity, can you tell me what is the video resolution of your device; and what resolution do you see in OpenXcom when you go into Options>Video? For some reason, on the simulator, the resolution in game was only half of the real device resolution.
This is to do with how iOS handles HD displays I believe. They abstract away the true device resolution for compatibility of old software with new devices which are usually a factor of a base resolution. Started with the iPhone 4 which had twice the resolution of the 3. Old apps would then double up and appear blocky until the developer updated their app. I’m on an XS which has three times the resolution so my in game res is a third of what it could be.

Better description of it here:
https://developer.apple.com/library/archive/documentation/2DDrawing/Conceptual/DrawingPrintingiOS/GraphicsDrawingOverview/GraphicsDrawingOverview.html#//apple_ref/doc/uid/TP40010156-CH14-SW7

I’m hoping it is a simple property or method change somewhere in the code to fix, I’m not an iOS dev unfortunately and I’m not familiar with how SDL is integrated so it could be more work making a change that applies to only the iOS target and not Android too, you might know better. I’ll have a read up on SDL & Xcode when I get time, look at the code, see what I can figure out. I’ll reach out to sfalexrog too.
Title: Re: OXCE v6.5.3 for iOS (iPhone/iPad)
Post by: Daedalia on June 23, 2020, 05:09:54 pm
This is to do with how iOS handles HD displays I believe. They abstract away the true device resolution for compatibility of old software with new devices which are usually a factor of a base resolution. Started with the iPhone 4 which had twice the resolution of the 3. Old apps would then double up and appear blocky until the developer updated their app. I’m on an XS which has three times the resolution so my in game res is a third of what it could be.

Better description of it here:
https://developer.apple.com/library/archive/documentation/2DDrawing/Conceptual/DrawingPrintingiOS/GraphicsDrawingOverview/GraphicsDrawingOverview.html#//apple_ref/doc/uid/TP40010156-CH14-SW7

I’m hoping it is a simple property or method change somewhere in the code to fix, I’m not an iOS dev unfortunately and I’m not familiar with how SDL is integrated so it could be more work making a change that applies to only the iOS target and not Android too, you might know better. I’ll have a read up on SDL & Xcode when I get time, look at the code, see what I can figure out. I’ll reach out to sfalexrog too.

PR with fix created
Title: Re: OXCE v6.5.3 for iOS (iPhone/iPad)
Post by: Meridian on June 23, 2020, 11:34:53 pm
PR with fix created

1/ Does not compile.
E.g. missing semicolon here:

Code: [Select]
  _flags = SDL_WINDOW_OPENGL | SDL_WINDOW_ALLOW_HIGHDPI

2/ is it safe to use SDL_GL_GetDrawableSize? what if we dont have GL at all? can that happen?

Edit: can maybe SDL_GetRendererOutputSize() be used instead of SDL_GL_GetDrawableSize() ? ... I read about it here: https://wiki.libsdl.org/SDL_CreateWindow

3/ not all instances of SDL_GetWindowSize were replaced by SDL_GL_GetDrawableSize... for example in SDLRenderer::screenshot() ... oversight or intention?
Title: Re: OXCE v6.5.3 for iOS (iPhone/iPad)
Post by: Daedalia on June 24, 2020, 03:26:04 am
1/ Does not compile.
E.g. missing semicolon here:

Code: [Select]
  _flags = SDL_WINDOW_OPENGL | SDL_WINDOW_ALLOW_HIGHDPI

2/ is it safe to use SDL_GL_GetDrawableSize? what if we dont have GL at all? can that happen?

Edit: can maybe SDL_GetRendererOutputSize() be used instead of SDL_GL_GetDrawableSize() ? ... I read about it here: https://wiki.libsdl.org/SDL_CreateWindow

3/ not all instances of SDL_GetWindowSize were replaced by SDL_GL_GetDrawableSize... for example in SDLRenderer::screenshot() ... oversight or intention?
1 My Dev environment is a mess, did it off the Mac. Schoolboy error, corrected.

2 Historically fine, but having a read, seems OpenGL is deprecated in iOS.

Read the same, tried that method first but it requires an SDL_renderer not SDL_window argument, path of least resistance, hacky, I’m no iOS developer.

I think I can see how to implement SDL_GetRendererOutputSize. Need to sort my dev environment out first (can’t run the Simulator without the Mac rebooting) to get my head round and test properly.

3 Had trouble finding the F12 key on my phone. Feature seemed redundant on iOS. Let it be.


Sent from my iPhone using Tapatalk
Title: Re: OXCE v6.5.3 for iOS (iPhone/iPad)
Post by: Kitos on August 14, 2020, 05:10:34 pm
Finally installed it on my ipad mini 5th gen. Got a vertical alignment issue. I think it appears only in inventory screen. Fixed by disabling fullscreen inventory. Second issue is music. It plays too fast. Couldn`t figure out a solution.