What the web, Android and iOS exports need at onegame 1.1.2: an engine checkout for all three, plus the Android SDK or a Mac with Xcode, and what each export produces.
At 1.1.2, the web, Android and iOS exports need an engine checkout. A game made from the NuGet packages exports for Linux, Windows and macOS, and its dedicated server for Linux. The web export reads engine sources (its page and script files), so it needs a game created against a checkout; Play Billing in an Android build and plugin servers do too. The Android and iOS entry files ship in the SDK package, but those two exports have only been run from a checkout.
What a game from the packages gets
From the apple tree in Getting started, made with onegame new and the packages only:
onegame export --target weberror: The web export needs the engine sources (its page and script files), so it runs for a game that sets OneGameRoot to an engine checkout (onegame new --engine <checkout>). A game on the RecursiveAI.OneGame.Sdk package cannot export for the web yet.That exits 3. Android and iOS stop earlier on this Linux machine, at their toolchains, each with exit 4:
onegame export --target androiderror: The Android SDK was not found. Set ANDROID_HOME (or pass --sdk <folder>) to a folder with build-tools, platforms, platform-tools and an ndk folder; the command-line tools' sdkmanager installs them.onegame export --target ios-simulatorerror: Exporting for iOS links with Xcode's toolchain and the iOS SDK, so it needs a Mac with Xcode (xcode-select -p must point at it).A game against an engine checkout
Clone the engine at the release tag, build it, and create the game against it:
git clone --branch v1.1.2 https://github.com/recursive-ai-oss/onegame cd onegame dotnet build OneGame.slnx dotnet run --project src/OneGame.Cli -- new mygame --dir ../mygame --engine .
Such a game references the engine’s projects instead of packages. Setting ONEGAME_ROOT to the checkout does the same for onegame new. These steps are from the engine’s README and weren’t run for this page.
What each export makes
| Target | Command | Needs | Result |
|---|---|---|---|
| Web | onegame export --target web | a checkout | a folder any static server can host: .NET on WebAssembly, WebGPU, the page and its scripts. Serve .wasm as application/wasm. |
| Android | onegame export --target android [--abi arm64-v8a,x86_64] [--dev] | a checkout, the Android SDK and NDK | a debug-signed APK holding a NativeAOT shared library, no Java |
| iOS Simulator | onegame export --target ios-simulator [--dev] | a checkout, a Mac with Xcode | an ad-hoc signed .app for the Simulator |
| iOS device | onegame export --target ios | a checkout, a Mac with Xcode | an unsigned arm64 .app, which the owner of an Apple Developer account signs; the steps are printed as signingNeeds |
Good to know
- A page needs a browser with WebGPU: Chrome and Edge 113 and later. Safari and Firefox aren’t tested. Sound starts after the first click or key press.
onegame web testruns a game’s scenarios in headless Chrome (ONEGAME_CHROMEnames the browser), andonegame android testandonegame ios testrun them on an emulator, a device or the Simulator. The engine’s own runs are in Checking on devices.- A game that connects to servers from Android sets
<AndroidInternet>true</AndroidInternet>in its project file. - To branch on the platform, ask
OneGame.Platform.RunningOn(Android,IOS,Browser,Phone,Mobile,Desktop), new in 1.1.2.OperatingSystem.IsAndroid()is false in a NativeAOT Android build. - A scenario capture compares against
name-mobile.pngbesidename.pngon a phone or in a page, when that file exists.
Every target is in Exporting.