Skip to content
Draft
2 changes: 2 additions & 0 deletions en/includes/out-of-date-page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
> [!WARNING]
> This page may be out of date and should only be used as a reference.
2 changes: 2 additions & 0 deletions en/includes/xplat-editor-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
> [!NOTE]
> **Game Studio** is being rewritten to be cross-platform.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ In order to run, Stride games require a user to have the following installed:
* FreeType (for installation instructions, visit the [Linux page](../../platforms/linux/setup-and-requirements.md#freetype))
* OpenAL (for installation instructions, visit the [Linux page](../../platforms/linux/setup-and-requirements.md#openal))
* SDL2 (for installation instructions, visit the [Linux page](../../platforms/linux/setup-and-requirements.md#sdl2))
* FreeImage (for installation instructions, visit the [Linux page](../../platforms/linux/setup-and-requirements.md#freeimage))
* Vulkan or OpenGL (depending on the graphics API used by your game)

> [!NOTE]
Expand Down
8 changes: 4 additions & 4 deletions en/manual/game-studio/game-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ You can override settings for particular platforms, graphics APIs, and so on. Fo

1. With the **GameSettings** asset selected, in the **Property Grid**, under **Overrides**, click ![Green plus button](~/manual/game-studio/media/green-plus-icon.png) (**Add**).

![Select graphics platform](../platforms/media/add-override.png)
![Select graphics platform](/media/add-override.png)

Game Studio adds an override.

2. In the new override, next to **Platforms**, select the platforms you want the override to apply to. You can select as many as you need.

![Select graphics platform override](../platforms/media/select-override-platform.png)
![Select graphics platform override](/media/select-override-platform.png)

3. **Optional**: If you want this override to apply only to a specific GPU platform, choose it from the **Specific filter** drop-down list.

Expand All @@ -176,7 +176,7 @@ You can override settings for particular platforms, graphics APIs, and so on. Fo

4. In the **Configuration** drop-down menu, select the kind of setting you want to override (**Editor**, **Texture**, **Rendering** or **Physics**).

![Select graphics platform override](../platforms/media/select-override-configuration.png)
![Select graphics platform override](media/select-override-configuration.png)

5. Set the options you want to override.

Expand Down Expand Up @@ -225,4 +225,4 @@ For more information, see [Splash screen](/splash-screen.md).

## See also

* [Assets](../game-studio/assets.md)
* [Assets](../game-studio/assets.md)
4 changes: 2 additions & 2 deletions en/manual/physics-bullet/colliders.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ To show or hide collider shapes at runtime with a keyboard shortcut, use the **D

3. In the Game Studio toolbar, click **Reload assemblies and update scripts**.

![Reload assemblies](../platforms/media/reload-assemblies.png)
![Reload assemblies](media/reload-assemblies.png)

4. Add the **Debug physics shapes** script as a component to an entity in the scene. It doesn't matter which entity.

Expand All @@ -92,4 +92,4 @@ The script binds the collider shape visibility to **Left Shift + Left Ctrl + P**
* [Rigidbodies](rigid-bodies.md)
* [Kinematic rigidbodies](kinematic-rigid-bodies.md)
* [Simulation](simulation.md)
* [Physics tutorials](tutorials.md)
* [Physics tutorials](tutorials.md)
34 changes: 20 additions & 14 deletions en/manual/platforms/add-or-remove-a-platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,30 @@

<span class="badge text-bg-primary">Beginner</span>

You can add and remove platforms to and from projects.
When creating a new game, Stride prompts you to select the platforms which you want to target. This can be changed after the fact.

1. In the **Solution Explorer** (default bottom left), right-click the project and select **Update package > Update platforms**.

![Update platforms](media/update-platforms.png)

The **Select Platforms** dialog opens.

![Select platforms](media/select-platforms.png)
## Add or remove a platform

2. Select the platforms you want to support and click **OK**.
1. In the **Solution explorer**, locate the main [**project package**](../files-and-folders/project-packages/index.md). Typically it's the one that doesn't end with `.NameOfPlatform`.

3. Reload the assemblies by clicking the **Reload game assembles** button in the toolbar.

![Reload assemblies](media/reload-assemblies.png)
![](media/solution-explorer-main-project-package.webp)

The supported platforms are updated. To refresh the platforms list in the toolbar, restart Game Studio.
2. Right click on it and select **Update package > Update platforms**.

![](media/solution-explorer-update-platforms.webp)

3. Select which platforms you want to support and click **Ok**.

![](media/select-platforms.webp)

Stride will then delete [platform packages](../files-and-folders/project-packages/index.md#platform-packages) for removed platforms and create new ones for the platforms that were added.

4. Reload the assemblies by clicking the **reload game assemblies** button in the toolbar.

![](media/reload-assemblies.webp)

## See also

* [Platforms](index.md)
* [Platforms](index.md)
* [Project packages](../files-and-folders/project-packages/index.md)
* [Project file structure](../files-and-folders/project-structure.md)
7 changes: 7 additions & 0 deletions en/manual/platforms/android/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Android

**Android** is a mobile operating system developed by [Google](https://about.google/) used by most smarthphones and tablets.

## General support

All of Stride's core features **should** work on Android.
67 changes: 34 additions & 33 deletions en/manual/platforms/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,52 @@

![Platforms](media/game-engine-system-requirements-intro-pic.png)

Stride is cross-platform game engine. This means you can create your game once, then compile and deploy it on all the platforms Stride supports. The engine converts C# and shaders to the different native languages, and abstracts the concepts that differ between platforms, so you don't have to adapt your code for each platform.
Stride is a cross-platform engine, which means that you can create a single game and publish it on multiple platforms.

## Supported platforms
## Supported development platforms

* Windows 7, 8, 10
* Windows Universal Platform (UWP)
* [Linux](linux/index.md)
* Android 2.3 and later
* [iOS 8.0 and later](ios.md)

> [!TIP]
> To check which platform your project uses, add a break point to your code (eg in a script), run the project, and check the [Platform.Type](xref:Stride.Core.Platform.Type) variable.

## Supported graphics platforms

* Direct3D 9 (limited support), 10, 11, 12
* OpenGL 3, 4
* OpenGL ES 2 (limited support), 3
* Vulkan
| Name | Overall status | Editor | Building (without the editor) | [Code-only](https://stride3d.github.io/stride-community-toolkit/manual/code-only/index.html) |
| :-- | :-- | :-: | :-: | :-: |
| [Windows](windows/index.md) 10, 11 | Full support | 🟩 | 🟩 | 🟩 |
| [Linux](linux/index.md) | Partial support, read more [here](linux/index.md#development-support) | 🟥 | 🟩 | 🟩 |
| [MacOS](macos/index.md) | Partial support, read more [here](macos/index.md#development-support) | 🟥 | 🟩 | 🟩 |

>[!Note]
>Stride only supports MSAA (multisample anti-aliasing) for Direct3D 11 and later.
>Depending on your device's OpenGL shader compiler, Stride might not run with OpenGL ES2.
> [!NOTE]
> **Game Studio** (the editor) is being rewritten to be cross-platform. Currently however, it's not possible to use it outside of **Windows**.

>[!Warning]
>Direct3D 9 doesn't support HDR textures. Using HDR textures with DirextX 9 will crash your game.
## Supported target platforms

## Set the graphics platform
* [Windows](windows/index.md) 10, 11
* [Linux](linux/index.md)
* [MacOS](macos/index.md)
* [Android](android/index.md)
* ⚠️ [iOS](ios/index.md) (untested)

You set the graphics platform in the **Game settings** asset under **Rendering settings > Target graphics platform**.
## Platform specific code

![Select graphics platform](media/change-graphics-platform.png)
Each platform has it's own [project package](../files-and-folders/project-packages/index.md) that contains the [entry point](../files-and-folders/project-packages/index.md#entry-point) and other code exclusive for that platform.

For more information, see [Set the graphics platform](set-the-graphics-platform.md).
Alternatively, you can check the current platform using [Platform.Type](xref:Stride.Core.Platform.Type).

## Preprocessor variables
```csharp
if (Platform.Type == PlatformType.Android)
{
// This code will only be executed on Android
}
```

Stride defines preprocessor variables if you want to write code that compiles only under a specific platform. For more information, see [Preprocessor variables](../scripts/preprocessor-variables.md).
> [!WARNING]
> Stride also sets [preprocessor variables](../scripts/preprocessor-variables.md) for some platforms, however, it's generally advised to avoid using them.

## In this section

* [Linux](linux/index.md)
* [Windows](windows/index.md)
* [UWP](uwp/index.md)
* [Xbox Live](uwp/xbox-live.md)
* [iOS](ios.md)
* [Xbox Live](uwp/xbox-live.md)
* [Linux](linux/index.md)
* [Setup and requirements](linux/setup-and-requirements.md)
* [MacOS](macos/index.md)
* [Android](android/index.md)
* [iOS](ios/index.md)
* [Build guide](ios/build-guide.md)
* [Add or remove a platform](add-or-remove-a-platform.md)
* [Set the graphics platform](set-the-graphics-platform.md)
* [Game settings](../game-studio/game-settings.md)
112 changes: 3 additions & 109 deletions en/manual/platforms/ios.md
Original file line number Diff line number Diff line change
@@ -1,109 +1,3 @@
# iOS

To deploy your game on iOS devices, you need to connect the device to a Mac with Xamarin.

1. Make sure Xamarin is installed on the PC and the Mac. For instructions about how to install and set up Xamarin, see the Xamarin documentation:

* [Installing Xamarin in Visual Studio on Windows](https://developer.xamarin.com/guides/cross-platform/getting_started/installation/windows/)

* [Connecting to Mac](https://developer.xamarin.com/guides/ios/getting_started/installation/windows/connecting-to-mac/)

2. Make sure your iOS device is provisioned. For instructions, see [Device provisioning](https://developer.xamarin.com/guides/ios/getting_started/installation/device_provisioning/) in the Xamarin documentation.

3. Make sure the iOS platform is added to your Stride project. To do this, in Game Studio, right-click the solution, select **Update package > Update Platforms**, and make sure **iOS** is selected.

![Add iOS](media/add-ios-platform.png)

For more information about adding platforms in Game Studio, see [Add or remove a platform](add-or-remove-a-platform.md).

4. Open your solution in Visual Studio.

>[!Tip]
>To open your project in Visual Studio from Game Studio, in the Game Studio toolbar, click ![Open in IDE](../scripts/media/launch-your-game-IDE-icon.png) (**Open in IDE**).

5. In the Visual Studio toolbar, click ![Xamarin button](media/xamarin-button.png).

![Connect to Xamarin](media/xamarin-button-in-toolbar.png)

**Xamarin Agent** opens.

![Xamarin agent](media/xamarin-agent.png)

6. Connect to the Mac via Xamarin. For instructions, see [Introduction to Xamarin iOS for Visual Studio](https://developer.xamarin.com/guides/ios/getting_started/installation/windows/introduction_to_xamarin_ios_for_visual_studio/) in the Xamarin documentation.

7. In the **Solution Explorer**, right-click the project and select **Set as StartUp Project**.

![Set as startup](media/set-ios-as-startup-project.png)

8. In the **Solution Platforms** menu, select **iPhone** to build on physical iOS devices (including iPad), or **iPhoneSimulator** to build for the simulator. The simulator emulates iOS devices on your machine, but has some drawbacks (see below).

![Solution platform](media/solution-platform.png)

9. In the Visual Studio toolbar, select the iOs device you want to build for.

![Select device](media/select-ios-device-dropdown.png)

10. From the **Solution Explorer**, open `info.plist`.

![Select info file](media/info-plist.png)

11. If you want to create a release build, set the **bundle identifier**. This is a unique ID for your application.

![Select bundle ID](media/bundle-identifier.png)

12. If you want to deploy on iPad, under **Targeted device family**, click ![Add device icon](media/add-device-icon.png).

![Added iPad](media/ipad-device-added.png)

## Speed up builds on iOS devices

It takes a long time to build on iOS devices. This is because:

* the Mac needs to build code ahead of time (AOT) for the different devices

* the Apple sandbox system doesn't let you update packages incrementally, so the Mac needs to completely redeploy the application on the device for every change

To compile code more quickly, in the Solution Explorer, right-click the iOS project and select **Properties**.

![Project properties](media/ios-project-properties.png)

* Under **Linker Behavior**, select **Don't link**.
* Under **Supported Architectures**, select only the architecture of the debug device.
* Disable **Strip native debugging symbols**.
* Enable **incremental builds** (only code that changes from one execution to another is AOT)

For more information, see [iOS Build Mechanics](https://developer.xamarin.com/guides/ios/advanced_topics/ios-build-mechanics/) in the Xamarin documentation. For information about profiling, see [Using instruments to detect native leaks using markheap](
https://developer.xamarin.com/guides/ios/deployment,_testing,_and_metrics/using_instruments_to_detect_native_leaks_using_markheap).

To make redeploying each time faster, make your debug packages as small as possible.

* In Game Studio, reduce the **Size** of the [textures](../graphics/textures/index.md) in your project.

* Remove unused assets.

* Test your scenes one by one rather than loading them simultaneously.

* Debug your application on the **iPhone simulator** instead of a real device. However, execution is slow on the simulator and it produces some rendering artifacts, so we don't recommend using it to debug real-time graphics.

## Compile shaders on iOS

As converting Stride shaders to OpenGL shaders on iPhone devices is slow, we recommend you convert them remotely (ie in Game Studio).

Our recommended workflow is:

1. Execute the app on Windows. This creates the shader permutations.

![New effects](../graphics/effects-and-shaders/media/new-effects-to-import.png)

2. Import the new shaders in Game Studio. This generates an effect log.

![Effect log](../graphics/effects-and-shaders/media/effect-log.png)

3. Save and run the game on iOS.

Ideally, this creates all the shader permutations remotely, so you don't need to convert them on the device. However, new permutations might still occur due to differences such as supported screen resolutions. For more information, including information about how to compile shaders remotely on iOS, see [Compile shaders](../graphics/effects-and-shaders/compile-shaders.md).

## See also

* [iOs in the Xamarin documentation](https://developer.xamarin.com/guides/ios/)
* [Compile shaders](../graphics/effects-and-shaders/compile-shaders.md)
---
redirect_url: ios/index.html
---
Loading