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

iOS Compatibility #2102

Merged
merged 51 commits into from
Jan 28, 2019
Merged

iOS Compatibility #2102

merged 51 commits into from
Jan 28, 2019

Conversation

swoolcock
Copy link
Contributor

@swoolcock swoolcock commented Feb 22, 2018

Solution/projects/changes to run osu!lazer on iOS devices.

Tasks:

To be done post-merge:

  • osu!mania gameplay (except hold notes)
  • osu!catch gameplay (see below)
  • Ruleset visual tests (see below)

Issues:

  • osu!standard spinners crash the app at the end of the spinner unless you don't spin it at all
  • Anything using BufferedContainers, due to issues outlined in the osu!framework PR
  • Currently can't implement osu!mania hold notes or osu!catch (need to do some hacks to listen for individual key up/down events, as iOS does not expose them)
  • Ruleset visual tests not currently building
  • Visual tests that require file system access may not run due to permissions or non-existent files

@peppy peppy added this to the Candidate Issues milestone Feb 22, 2018
@peppy peppy changed the title WIP: iOS Compatibility (osu!-side) iOS Compatibility (osu!-side) Jun 1, 2018
@smoogipoo smoogipoo removed this from the Candidate Issues milestone Aug 8, 2018
@swoolcock swoolcock changed the base branch from ios to master December 8, 2018 07:08
@MiraiSubject
Copy link
Contributor

I have almost been able to compile this version for iOS. However, I've been running in issues with Sixlabors/Core (and Imagesharp) versions that are not available on NuGet.

Specifically speaking these entries in osu.iOS/packages.config:

<package id="SixLabors.Core" version="1.0.0-dev000094" targetFramework="xamarinios10" /><package id="SixLabors.ImageSharp" version="1.0.0-dev002298" targetFramework="xamarinios10"/>

On my copy of the solution I have been able to make some progress by using this ImageSharp version instead. I have still been unsuccessful in getting the Sixlabors/Core properly linked because of this dependency issue I am having.

For context, I've been using 62c4bc9 (master at the time of writing) of ppy/osu-framework for the build process.

osu.Desktop builds and runs successfully so it's isolated to the iOS build.

@naoey
Copy link
Contributor

naoey commented Dec 24, 2018

@MiraiSubject you need to add the myget feed to your nuget sources (https://www.myget.org/F/sixlabors/api/v3/index.json)

@MiraiSubject
Copy link
Contributor

MiraiSubject commented Dec 24, 2018

Thanks! @naoey I didn't think about that. Got it running on the 2018 iPad Pro now. Going to be looking into contributing now that I got this build working.

Update:

Wasn't able to get everything from the PR working, am still investigating.
Got the following working though:

  • Login
  • Chat
  • osu!direct search and downloads

In osu!standard the game does not do anything after the spinner finishes on the loading screen for a beatmap. Sometimes the game thread locks up and other times you can still interact with the elements. Audio will always play depending on the length of the song.

Unfortunately, the debugger isn't helping a lot either, providing no useful info. Pausing the execution only vaguely points to osuTK, but osuTK is a black box in context of the project.

@swoolcock
Copy link
Contributor Author

In osu!standard the game does not do anything after the spinner finishes on the loading screen for a beatmap.

This is to do with hovering not being detected, and was fixed in ppy/osu-framework#2039

Sometimes the game thread locks up and other times you can still interact with the elements.

I noticed this recently, it's something context-related I think. The draw thread runs fine, but SwapBuffers seems to do nothing. I'll make a ticket for it in the framework.

@peppy peppy changed the title iOS Compatibility (osu!-side) iOS Compatibility Jan 25, 2019
<Compile Include="AppDelegate.cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\osu.Game.Tests\**\Beatmaps\**\*.cs">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this because of some incompatible tests?

Copy link
Contributor Author

@swoolcock swoolcock Jan 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the unit tests to be discovered, they need to be in the executing assembly, it seems. This means I couldn't split the tests into common, desktop and iOS projects. Instead, I made an iOS project that directly links to the source and compiles with the same root namespace.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's probably best to not do this, as it's 100% going to get forgotten when we add a new folder or namespace.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't particularly happy with it either. Another option I thought of is to include *.cs across the entire project, then exclude anything it puts in the build directory.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd definitely prefer this as a slightly better solution. Strongly against specifically listing directories/tests.

@peppy
Copy link
Member

peppy commented Jan 28, 2019

I've probably asked this already, but are osu.iOS/libbass.a still required locally?

@swoolcock
Copy link
Contributor Author

They are currently required, because of the explicit exclusion of NativeLibs in the iOS project. Otherwise mtouch will try to link against libraries that are not supported for iOS. We can potentially solve this by configuring NativeLibs to provide libraries based on target platform.

@peppy peppy merged commit 2025ed7 into ppy:master Jan 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants