Skip to content

Releases: MarkusSela/IW4-Pocket

IW4 Pocket v0.3.6

Choose a tag to compare

@MarkusSela MarkusSela released this 15 Oct 02:44

IW4 Pocket 0.3.6

Tested on one phone (iPhone 13 Pro Max, about 3 GB for the app): the lobby and in-match bot rows work and mp_rust loads, but a match still ends when iOS closes the app for memory after a few minutes. This release does not fix that. It adds bots you can add in the lobby and during a match, an option to leave out weapon camo skins, a shorter options menu, and new bot names.

Bots (issues #4 and #6)

  • Lobby: a BOTS row in game setup, before the match (0 to 10).
  • During a match: open the Options menu (Start) and tap Add 1 bot or Add 5 bots. Only the host adds bots; for everyone else the rows do nothing. If the rows do not show up, send iw4l-boot.log: it lists the menus it looked at.
  • IW4L_BOTS=5 in iw4l-env.txt still sets how many bots a match starts with, and IW4L_CMDS=map mp_rust; bot add 5 works as before (only map, bot, and set/seta on match and bot rules). Neither has a row in the options menu.
  • New bot names (2009-2010 style and a few memes), up to 15 characters.
  • Credits: IW4L_BOTS by LemonMoo (Cade Palmer), the lobby bot row by AdrianTomasDiez. Both cherry-picked with their authorship, changed to share one value.

Options menu

  • IW4 Pocket options now has two pages: the first with the settings that matter most (profile, render scale, frame limit, texture size, lean shaders, weapon camo skins) and a second with the rest. "Free spare memory" is gone: in tests it gave back 0 MiB. Old IW4L_HEAP_RELIEF lines in iw4l-env.txt are ignored.
  • Weapon camo skins (Auto keeps them, Skip leaves them out). The log has a camouflage: line saying what was kept or left out. Measured on the 13 Pro Max with the same map: Skip removed all 8360 + 8360 camo models, but memory after loading was the same (2511 MiB with Skip, 2512 MiB with the camos kept). So it is not a memory saver; it only leaves the camos out. Idea and first code by mk2rs2000.

SideStore source

  • Add https://raw.githubusercontent.com/MarkusSela/IW4-Pocket/main/source.json in SideStore (Sources, +). Test versions say TEST.

For phones with about 3 GB for the app: set Render scale to 0.67 or 0.5. That helps a little; the app can still be closed by iOS during a match.

Please send iw4l-boot.log (and iw4l-boot.crash.log if the app closes) and say how you installed the app.

IW4 Pocket v0.3.5 (test)

Pre-release

Choose a tag to compare

@MarkusSela MarkusSela released this 15 Oct 00:14

IW4 Pocket 0.3.5

For phones with a 3 GB memory grant. On an iPhone 13 Pro Max, 0.3.4 loaded mp_rust and a match ran for about a minute, then iOS closed the app: the allocator was holding about 450 MiB of free pages that the app was not using but iOS still counted. Not yet tested on a phone.

Memory

  • Free spare memory (new, on by default on iPhone). When iOS leaves less than 600 MiB, the app asks the allocator to hand its unused pages back, at most every 3 seconds. The log shows each call: heap relief: footprint 3040 -> 2990 MiB (allocator says N MiB) in 4 ms | calls, total gained. If it causes a hitch, turn it off in IW4 Pocket options > Free spare memory, or with IW4L_HEAP_RELIEF=0.

Settings and advice

  • Phones with about 3 GB for the app: set Render scale to 0.67 or 0.5 (IW4 Pocket options). On an iPhone 13 Pro Max, 0.5 leaves 168 MiB at the start of a match against 94 MiB at full size.
  • Lean shaders stays on by default on the Low profile. On the same phone it is the difference between a map that loads and one that does not.

Logs

  • heap relief: lines (see above). Please send iw4l-boot.log; if the app closes, also iw4l-boot.crash.log.
  • The problem report asks how you installed the app.

Known: on a 3 GB grant the app may still be closed during a match. If it is, the logs show how long it ran and how much each relief call gave back.

IW4 Pocket v0.3.4

Choose a tag to compare

@MarkusSela MarkusSela released this 14 Oct 19:08

IW4 Pocket 0.3.4

Test build aimed at phones with a 3 GB memory grant (iPhone 13 Pro Max, iPhone 15, SideStore with a free account), where mp_rust was closed by iOS while the map prepared its graphics. Not yet tested on a phone. Please send iw4l-boot.log and iw4l-memory-settings.txt.

Memory

  • Lean shaders, on by default on the Low profile: each shader frees its compiled data once its pipelines are built, instead of keeping it for the whole run. Measured on a Mac with phone settings: about 790 MB less. By treuenten (cherry-picked, authorship kept).
  • Replay clip buffer is off on iPhone (about 150 MB less in a match). By treuenten.

Display (by treuenten)

  • The display stays at 60 Hz for the first minute of a match, then asks for 120 Hz. This removed freezes of 85-200 ms at the start of matches on a 17 Pro Max.
  • Optional render scale (0.5 to 0.85 of the screen's resolution).

Bots and startup commands

  • iw4l-env.txt accepts IW4L_CMDS=map mp_rust; bot add 5 again (only map, bot, set, seta; at most 200 characters and 8 commands). Fixes issue #4.
  • New row in IW4 Pocket options: Start a match with bots (Rust, Favela, Estate, Terminal, 5 bots).

IW4 Pocket options: new rows for lean shaders, replay clip buffer, 120 Hz delay, render scale and the bot match. Every row starts on Auto and applies after a restart.

Logs

  • window: line with the drawable size, points and scale, to diagnose a picture that fills only a corner of the screen (issue #8).
  • Memory is logged every 8 MiB when less than 300 MiB are left, so the last seconds before iOS closes the app are visible.
  • A run closed by iOS keeps its log as iw4l-boot.crash.log.
  • The problem report asks how you installed the app.
  • A rejected iw4l-env.txt line now says which setting it was.

Known: on a 3 GB grant, mp_rust may still run out of memory. If it does, the new log lines show where.

IW4 Pocket 0.3.3

Choose a tag to compare

@MarkusSela MarkusSela released this 11 Oct 10:47

IW4 Pocket 0.3.3

Built to get mp_rust running on the iPhone 13 Pro Max (A15) and to make problem reports easy. Tested on an iPhone 13 Pro Max: the graphics error is gone and the IW4 Pocket options work, but the app still runs out of memory while the map prepares its graphics (see Known).

The graphics error that closed the app (found in the 0.3.2 logs of an iPhone 13 Pro Max)

  • Phones whose GPU cannot filter 32-bit float textures (A15 and older) made the renderer reject the texture table: Texture binding 0 expects sample type Float { filterable: true }, but was given a view with format R32Float. The app then quit with code=1 while 66 of 1484 pipelines were ready.
  • On those phones the sun shadow map, the spot shadow maps and the float depth now use a 1x1 placeholder in the table. Phones that can filter them (for example the iPhone 17 Pro Max) are unchanged.
  • Dynamic shadows are held off on those phones, since their maps could not be read anyway.
  • If another image causes a similar error, the log names it.

IW4 Pocket options (in the game: Options > IW4 Pocket options)

  • Device profile, texture size, frames in flight, 120 Hz in matches, frame limit, compressed textures, dynamic shadows. Every row starts with Auto, has a one-line description, and applies after you restart the app.
  • Choices are kept in Documents/iw4l-env.txt; lines you wrote there yourself are left alone.
  • Send logs: asks for a second press, then opens a GitHub problem report with a short summary filled in (no personal data). You attach the two log files by hand.
  • Shows how much memory iOS gives the app.

Better logs

  • gpu: line (compressed textures, 32-bit float filtering), shadow memory: lines, session summary: (peak memory, least memory left, why the run ended), previous run: (tells a run closed by iOS from one that ended itself).
  • Heap per asset kind now shows total and own (a weapon's own cost without its models and animations).
  • The app folder path is written as <app>; the install id is no longer in the log. Repetitive lines (destructible deaths, static model meshes) are left out.

Known: on a 3 GB grant (iPhone 13 Pro Max) the app is closed by iOS during mp_rust while it prepares graphics pipelines (about 3.07 GB used of 3.07 GB, around 750 of 1484 pipelines done). This build does not lower memory; that is the next job. Phones with more memory are not affected.

Please send iw4l-boot.log, iw4l-boot.prev.log and iw4l-memory-settings.txt after trying mp_rust.

IW4 Pocket v0.3.2

Choose a tag to compare

@MarkusSela MarkusSela released this 10 Oct 09:37

Experimental release. This build has not been run on a phone yet; the previous one, v0.3.0, is the last one that was tested on a device.

Built to find out where the memory goes and why the app quits after loading mp_rust. It is not a fix, and it has not been run on a phone yet (the package was checked, the game was not).

What is new since 0.3.0

  • Heap per asset kind in iw4l-boot.log (heap net growth per asset kind).
  • Graphics errors are logged (RENDER ERROR <type>: <text>). Before, such a quit looked like a silent code=1.
  • New app icon.
  • Frame timing by treuenten: two frames in flight and no MSAA on menu cameras, a 120 Hz display request during matches, screen kept awake while loading and playing, frame pacing: statistics. Phones that are granted about 3 GB (Low tier) keep one frame in flight, because the extra frame has not been measured on that memory; IW4L_FRAME_LATENCY=2 in iw4l-env.txt tries two.
  • 25 engine fixes by treuenten (and one by neptune, IW4L commit 32f7b39): controller steering for the Predator and the killstreak map, menus, lobby return, steep slopes, culling, dropped weapons, mp_strike loading, lighting slots, sound slots, spark fountains, and a bot navigation cache that no longer rebuilds when weapon tables change.

All of it was imported commit by commit with the original authorship kept. See NOTICE.

Things to know

  • The first time a map loads, the bot navigation is baked from scratch (12-29 s extra on a phone). Then it is cached.
  • Pipelined rendering on iOS stays off.
  • Install it over the existing app with SideStore (same bundle ID), do not uninstall: that would delete the game files.

If you try it, please send iw4l-boot.log and iw4l-memory-settings.txt (Files app, IW4 Pocket folder) and tell me your device and iOS version. Look for RENDER ERROR, heap net growth and frame pacing:.

IW4 Pocket v0.3.0

Choose a tag to compare

@github-actions github-actions released this 07 Oct 13:59

IW4 Pocket 0.3.0 — device profiles (experimental)

The app now looks at the phone and picks its own memory settings. This is the biggest change since 0.2.0.
No iPhone gameplay result is available for this exact build. Not proven: that mp_rust now loads on a ~3 GB phone.

What is new

  • Device profiles. At launch the app reads how much memory iOS grants it and picks a tier:
    • low (under 4 GiB): no next-map cache, 1 shader worker
    • mid (4 to 5.5 GiB): 64 MiB next-map cache, 2 shader workers
    • high (5.5 GiB or more): 256 MiB next-map cache, 2 shader workers
      The resident map is off on iOS in every tier. Mid and high values are untested guesses.
      The chosen tier is the first thing in iw4l-memory-settings.txt and the log (device tier: ...). These thresholds are first guesses from two phones. Every IW4L_* setting in iw4l-env.txt still overrides the tier.
  • Resident map off on iOS. The kept copy of the loaded map shared every decoded image, so images could not be moved and existed twice. Releasing it also frees the weapon GPU textures at teardown when the weapon cache is bounded.
  • Compressed BC textures on GPUs that support them (Apple9+, e.g. A17 Pro and newer). Older chips such as A15/A16 keep expanding to RGBA8 as before. IW4L_IOS_BC=0 forces the old path for comparison.

Credits

The resident-map fix and BC-texture support are by treuenten (issue #1), imported with their authorship kept in the history. vendor/wgpu-hal is wgpu-hal 29.0.4 with one 6-line change (backported from gfx-rs/wgpu#9656); licences included.
Not imported yet: the iOS 27 scene-lifecycle commits. This build still uses the iOS 18.5 SDK.

Settings (restart the app after editing iw4l-env.txt)

IW4L_FPV_RETAIN_MIB=0      # 0-1024, next-map weapon cache
IW4L_SHADER_WORKERS=1      # 1-64
IW4L_MOVE_IMAGES=1         # 0 or 1
IW4L_RESIDENT_MAP=0        # 0 or 1
IW4L_IOS_BC=1              # 0 or 1

Unknown names and invalid values are ignored. Please send iw4l-boot.log and iw4l-memory-settings.txt with every report; they say which tier your phone got.

Install

Install IW4.Pocket.ipa with SideStore over the old version to keep your game files. No game data is included. Not affiliated with Activision, Infinity Ward or Apple.

IW4 Pocket v0.2.1

Choose a tag to compare

@github-actions github-actions released this 07 Oct 06:39

IW4 Pocket 0.2.1 — memory candidate (experimental)

This candidate changes memory ownership and shader scheduling, not just diagnostics.
No iPhone gameplay result is available for this version. Previous versions reached the menu on an iPhone 13 Pro Max (6 GB), but mp_rust was terminated near the app's roughly 3 GiB memory allowance. This release does not claim that crash is solved.

Changes

  • iOS defaults to zero optional FPV payload retention between maps. IW4L_FPV_RETAIN_MIB=0 disables this reuse cache; 1–1024 sets a payload-byte budget in MiB. Active weapon assets and required donor batches are untouched. Admission happens after image wrapping, when the actual retained size is known; rejected cache entries can be decoded again for a later map.
  • Move uniquely owned Bevy images instead of unconditionally cloning their pixel buffers. Shared images still copy safely. IW4L_MOVE_IMAGES=0 restores copying for A/B comparison; default is 1.
  • One shader compilation worker by default on iOS, configurable with IW4L_SHADER_WORKERS=1 through 64 and capped by the existing load pool. The implementation limits runnable shader chunks, not merely their size. It does not reduce the number of shaders or their final storage, and may load more slowly.
  • Alternate image wrappers preserve the already decoded image's texels, dimensions and mip count. They no longer feed RGBA back into the compressed-texture decoder. Payload accounting is rebalanced when the iOS conversion changes size, preventing mismatched subtraction on drop.
  • Live footprint, malloc heap and optional FPV ownership gauge are separated from cumulative texture/transfer traffic. No inference of "GPU memory" from footprint minus heap. Phase deltas overlap and must not be summed.

Restart-only settings and A/B

In Files > On My iPhone > IW4 Pocket, create iw4l-env.txt:

IW4L_FPV_RETAIN_MIB=0
IW4L_SHADER_WORKERS=1
IW4L_MOVE_IMAGES=1

Fully quit and restart after editing. Change one setting at a time, using the same phone, map, game files and texture cap. Suggested comparison: FPV budget 64, workers 4, or image move 0, separately. FPV admission counts payload bytes, not allocator overhead, and retained bytes overlap active assets.

The settings file now accepts only validated tuning controls: the three above; IW4L_IMAGE_DECODE_BUDGET_MIB / IW4L_CACHE_BUDGET_MIB (0–4096); IW4L_SOUND (on/off, 1/0). Unknown names, path overrides and malformed values are ignored without echoing their contents. The texture-cap file remains supported separately.

iw4l-memory-settings.txt records the effective memory controls at startup, before a possible termination. summary.json, when generated, also records controls, effective shader concurrency and a memory snapshot. Send these with iw4l-boot.log and iw4l-boot.prev.log.

Installation and remaining checks

Install over the existing app with SideStore to preserve game data. The bundle remains com.markussela.iw4l; the existing icon is unchanged. No game files are included.

The IPA verification report checks plist/version, arm64 Mach-O, retained Rust symbols, exact packaged icons and binary settings markers. It does not verify gameplay or signing. Device checks still required: menu/controller, first mp_rust load, weapon textures, return to menu and second map load, and the A/B memory logs.

No new lazy weapon loading, wholesale donor eviction, game-file deletion or promise of a specific MiB saving is included.

IW4 Pocket v0.2.0

IW4 Pocket v0.2.0 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 06 Oct 23:58

IW4 Pocket 0.2.0 (experimental)

Unofficial iOS port of IW4L, the open-source Rust runtime for Modern Warfare 2 (2009).

Tested only on an iPhone 13 Pro Max (6 GB). It should technically run on other iPhones/iPads with Metal, but that is unverified.

New in 0.2.0

  • New app icon.
  • Diagnostics built to find where the memory goes (the app still gets killed by iOS when a map loads):
    • memory is logged for every load stage (start and end): footprint, malloc heap, and what iOS still allows
    • allocation size classes and every single allocation of 16 MB or more
    • device model, iOS version and RAM at the top of the log
    • the previous run's log is kept as iw4l-boot.prev.log
    • the noisy "menu catalog" lines are filtered out
    • symbols are kept, so a crash backtrace is readable
  • iw4l-env.txt: put a text file with that name in the app folder (Files > On My iPhone > IW4 Pocket) with one IW4L_NAME=value per line, to set the engine's own switches without a rebuild (for example IW4L_CACHE_BUDGET_MIB=64). Names must start with IW4L_. The applied lines are echoed in the log. Which switches actually reduce memory is not known yet.

Works

  • Starts, loads the game data and reaches the main menu.
  • Touch acts as a mouse click in the menus.
  • PS4 (DualShock 4) controller via Apple GameController.

Known issue

  • Loading a match map (tested: mp_rust) still crashes: iOS terminates the app for using too much memory (about 3 GB on the tested phone). Not solved yet.

Install

  1. Install IW4.Pocket.ipa with SideStore. Install over an older version to keep your game files.
  2. Open the app once, then copy your own MW2 (2009) PC game folder (the one with zone/) to Files > On My iPhone > IW4 Pocket > Games.
  3. Launch. The first load is slow.

No game files are included. Please attach iw4l-boot.log (and iw4l-boot.prev.log) when reporting a problem.

Support the project: https://ko-fi.com/marukoshi

Not affiliated with Activision, Infinity Ward, Apple or the IW4L authors.

IW4 Pocket v0.1.9

Choose a tag to compare

@github-actions github-actions released this 06 Oct 13:58

IW4 Pocket 0.1.9 (experimental)

Unofficial iOS port of IW4L, the open-source Rust runtime for Modern Warfare 2 (2009).

Tested only on an iPhone 13 Pro Max (6 GB). It should technically run on other iPhones/iPads with Metal, but that is unverified.

What changed in 0.1.9

  • Lightmaps no longer keep a second CPU copy on iOS. A reviewer on Reddit pointed out that data may be copied several times; this removes one such copy (each lightmap page is six images, two of them clones of the others). Whether it is enough is unknown.
  • Much more detailed memory log. iw4l-boot.log now records, several times per second: the footprint iOS enforces, what iOS still allows, malloc heap in use and reserved, memory outside the heap (GPU-backed and mapped memory), and per-category counters (textures on the CPU, bytes sent to the GPU, duplicate image copies, meshes, lightmaps). Engine log lines (map load stages, asset counts) are mirrored into the same file.

Works

  • Starts, loads the game data and reaches the main menu.
  • Touch acts as a mouse click in the menus.
  • PS4 (DualShock 4) controller via Apple GameController.

Known issue

  • Loading a match map (tested: mp_rust) still crashes: iOS terminates the app for using too much memory (about 3 GB on the tested phone). Not solved yet. The new log is meant to show where the memory goes.

Install

  1. Install IW4.Pocket.ipa with SideStore. Install over an older version to keep your game files.
  2. Open the app once, then copy your own MW2 (2009) PC game folder (the one with zone/) to Files > On My iPhone > IW4 Pocket > Games.
  3. Launch. The first load is slow.

No game files are included. Please attach Documents/iw4l-boot.log when reporting a problem.

Support the project: https://ko-fi.com/marukoshi

Not affiliated with Activision, Infinity Ward, Apple or the IW4L authors.

IW4 Pocket v0.1.8

Choose a tag to compare

@github-actions github-actions released this 06 Oct 06:24

IW4 Pocket 0.1.8 (experimental)

Unofficial iOS port of IW4L, the open-source Rust runtime for Modern Warfare 2 (2009).

Tested only on an iPhone 13 Pro Max (6 GB). It should technically run on other iPhones/iPads with Metal, but that is unverified.

Works

  • Starts, loads the game data and reaches the main menu.
  • Touch acts as a mouse click in the menus.
  • PS4 (DualShock 4) controller via Apple GameController.

Known issue

  • Loading a match map (tested: mp_rust) still crashes: iOS terminates the app for using too much memory. Not solved yet.

Install

  1. Install IW4 Pocket.ipa with SideStore. Install over an older version to keep your game files.
  2. Open the app once, then copy your own MW2 (2009) PC game folder (the one with zone/) to Files > On My iPhone > IW4 Pocket > Games.
  3. Launch. The first load is slow.

No game files are included. A boot log is written to Documents/iw4l-boot.log; attach it when reporting a problem.

Support the project: https://ko-fi.com/marukoshi

Not affiliated with Activision, Infinity Ward, Apple or the IW4L authors.