Artificial intelligence inside the app: free, on the phone, with no internet.
AstrArch
Space strategy · iOS and AndroidAstrArch is a space strategy game for iOS and Android. The name joins "astro" and the Greek -arch, ruler: you are the sovereign of the stars. You lead your civilization across a galaxy of star systems, among rival empires, independent peoples, alliances, wars and mercenaries.
Compared with the first episode there are two new challenges: 3D scenes and above all artificial intelligence inside the app. As always the code was written by AI, in Kotlin Multiplatform; I acted as the director.
- Star systems with planets orbiting their star, lit by its light
- Planet surfaces generated in code: oceans, deserts, volcanoes, ice, gas giants
- A living scene: rotate it, zoom it, tap a planet or a fleet and give orders
- Native 3D engines on each platform, SceneKit on iPhone and Filament on Android, driven by one shared codebase
- Each rival civilization has a character: aggressive, diplomatic, mercantile, expansionist
- It weighs strength and relations, expands, forms alliances, declares war, hires mercenaries
- It requests an audience with the player when it has something to propose, or to complain about
- An advisor analyses the game, learns from events and suggests what to do
- You talk to the leaders in natural language: ask the terms of an alliance, negotiate a ceasefire
- The answers are written by the model already on the phone: Apple Intelligence on iPhone, Gemini Nano on Android
- No cloud, no cost for players, no data leaving the device
- It works even offline
The AI understands what you ask and writes the reply in the leader's character, but agreements, wars and victories are settled by the game rules. So the game stays consistent even when the model gets a sentence wrong: replies that contradict the outcome are discarded and replaced with pre-written lines.
Which phones?
On-device models need recent phones. On the others the game is just as complete: leaders answer with pre-written lines and negotiations work the same way.
- iPhone 15 Pro and 15 Pro Max
- The whole iPhone 16 range, including 16e
- The whole iPhone 17 range and iPhone Air
- iOS 26 with Apple Intelligence turned on
- Google Pixel 9, 10 and 11
- Samsung Galaxy S25 and S26, Galaxy Z Fold7 and Z Flip7 and later
- Recent models from OnePlus, Xiaomi, OPPO, vivo, Honor, Motorola and others
- Full, up-to-date list: Google ML Kit GenAI
Who did what
All the Kotlin Multiplatform code: game engine, strategic AI, 3D scenes on SceneKit and Filament, galaxy map, the instructions for the on-device models, and the planet surfaces and galaxy animation generated in code.
The portraits of the ten leaders and the advisor, the app icon and the banner of this episode.
Apple's Foundation Models writes the leaders' and the advisor's replies, directly on the phone.
The same job on Android, through the ML Kit GenAI Prompt API, with Google's model built into the phone.
The leaders
Portraits made with Gemini · Tap an image to enlarge it
The planets
Surfaces generated in code and applied to the spheres of the 3D scene