Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port AGS 3.6.0 to iOS (SDL2 backend) #1505

Closed
6 tasks done
ericoporto opened this issue Jan 17, 2022 · 6 comments · Fixed by #2259
Closed
6 tasks done

Port AGS 3.6.0 to iOS (SDL2 backend) #1505

ericoporto opened this issue Jan 17, 2022 · 6 comments · Fixed by #2259
Labels
system: ios what: engine related to the game engine

Comments

@ericoporto
Copy link
Member

ericoporto commented Jan 17, 2022

The previous Allegro based AGS engine was ported to iOS, and the port is maintained in the release-3.5.1 branch. But the newer SDL2 based AGS that is on the current master branch has not been ported to iOS yet, so the README in iOS directory is not updated.

Porting to iOS should require following the porting guide in SDL2 repository:

github.com/libsdl-org/SDL/blob/main/docs/README-ios.md

Current MacOS builds use CMake, there are two possible approaches here

Authoring the Xcode projects may require additional steps to build the dependencies (these are currently automated when using CMake build system). This was previously done by some scripts and makefiles that have not been updated.

It's recommended that the person doing the port owns at least one iOS device so they can test in real hardware.

Until this is resolved, consider the information in iOS/ directory not updated.


Current roadmap:

@ivan-mogilko ivan-mogilko added the what: engine related to the game engine label Jan 17, 2022
@ivan-mogilko ivan-mogilko changed the title Port AGS to iOS (using SDL2) Port AGS 3.6.0 to iOS (SDL2 backend) Jul 31, 2022
@ericoporto
Copy link
Member Author

I am currently looking into updating the Xcode projects, this will take a bit of time, but thought of mentioning it here in case someone else is looking into this too.

@ericoporto
Copy link
Member Author

ericoporto commented Feb 4, 2023

Hey, I started this, the branch is here:
https://github.com/ericoporto/ags/tree/add-new-ios-xcode

The new readme is here: add-new-ios-xcode/iOS/README.md (I still need to explain how to get the libraries there, but it's the same process as from OSX Xcode project)

If someone would like to try things out. It's basically you run libsrc/download.sh and later you add your game files in the Resource directory in Xcode and then you build and your game should run. The code has lots of things to be cleaned up and adjusted still.

Also, the previous iOS port was actually something like a generic game player but I don't know enough on iOS permissions to do that yet. I also was having a hard time upgrading the old project, so I removed it and started from scratch.

It would be nice if someone that happens to know AGS, C++ and iOS and Xcode happens to take a look at it.

@ericoporto
Copy link
Member Author

ericoporto commented Aug 11, 2023

https://github.com/libsdl-org/SDL/blob/SDL2/include/SDL_filesystem.h

I was looking into SDL_GetPrefPath, and it takes an org string and an app string to make the writeable path in iOS. This is similar to android where there is an org name and an app name. For the app name, I can leverage the game name, but for the org name, It would be nice to have something in AGS for this, that was made available for all ports.

@ivan-mogilko
Copy link
Contributor

For the app name, I can leverage the game name, but for the org name, It would be nice to have something in AGS for this, that was made available for all ports.

Do you mean, adding this information to the project data, or compiled game data?

@ericoporto
Copy link
Member Author

Hum, I was thinking on compiled data. But maybe I spoke too soon, I think this information may be somewhere in the Xcode project (for the iOS case) and there may be some way to get it somehow - although I don't know yet how. I am still trying to understand the docs. :/

@ericoporto
Copy link
Member Author

@edmundito hey, got my changes in, can you rebase your things on current master and make a PR with your improvements? It would be nice to get the changes in how to use the Xcode project you made documented in the Readme.

The current one is still the way I had made which is a single Xcode project where you add your game files to Resource folder in it and hit build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
system: ios what: engine related to the game engine
Projects
None yet
2 participants