Game
Bunker 13
A fast Doom-style shooter with real brick walls and gun sounds.
- Category
- Game
- Requires
- macOS 13+
- Size
- 20 MB
- Price
- Free
Preview
About Bunker 13
Bunker 13 is a Wolfenstein/Doom-style first-person shooter: three levels of corridors, sliding doors and guards, rendered by a raycaster in Swift at 1280×800 and a solid 60 frames per second (tested on an M1 MacBook Air).
What it does
- Raycaster. Textured brick, concrete and metal walls with distance fog, drawn on all CPU cores at 1280×800.
- Enemies. Guards and tougher Heavies that chase you around corners, shoot back, flash when hit and fall.
- Weapons. A pistol and a shotgun with recoil and muzzle flash, using real recorded gun sounds, plus footsteps.
- Controls. Mouse look, WASD, run, doors, a minimap (Tab) and an FPS counter (F). Click the window to capture the mouse, Esc to let go.
How it was made
One prompt, then three short follow-ups to keep keyboard and mouse input from leaking to other apps, then a fourth that doubled the resolution in each direction and made it smoother. The whole conversation is in the case study.
Notes
The brick, concrete and metal textures and the gun and footstep sounds come from the CC0 FPS Asset Kit on GitHub, downloaded while the game was compiled. The soldiers, weapons and screens are drawn in code. If you press Control or Option-based shortcuts that macOS handles itself (for example Control with the arrow keys), macOS may still act on them.
Information
- Developer
- SiliconDevKit (generated by AI from a prompt)
- Category
- Game
- Compatibility
- macOS 13 or later, Apple silicon. Apple silicon Macs only (M1 or later), not Intel
- Size
- 20 MB (.dmg)
- Version
- 1.1
- Price
- Free
- Signing
- Ad-hoc signed, not notarized
The prompt behind it
This game was generated from the prompt below. Paste it into SiliconDevKit to build your own version, then change it however you like.
Build a macOS first-person shooter called Bunker 13: a fast Wolfenstein/Doom-style raycaster in Swift, 60 fps. Write assets.json as exactly [{"repo":"https://github.com/petroulacl/fps-asset-kit","ref":"a19b7458a593598211c95ec46ef4eb4b6d1f94d7","to":"kit","paths":["textures/Bricks097/Bricks097_2K-JPG_Color.jpg","textures/Bricks104/Bricks104_2K-JPG_Color.jpg","textures/Concrete048/Concrete048_2K-JPG_Color.jpg","textures/Metal049A/Metal049A_2K-JPG_Color.jpg","sfx/firearm_sfx/Prepared SFX Library/1911/A_34P.wav","sfx/firearm_sfx/Prepared SFX Library/Nova/O_17P.wav","sfx/footsteps_flac/Fantozzi-StoneL1.flac","sfx/footsteps_flac/Fantozzi-StoneR1.flac"]}] and load them from Bundle.main.resourceURL/Assets/kit/<path>; if any file is missing, fall back to generated textures and a synthesized noise-burst shot so the game still runs. Rendering: one NSView with a layer. Each frame, raycast (DDA) into a preallocated 640x400 UInt32 buffer, split into vertical strips with DispatchQueue.concurrentPerform, and set it as the layer contents CGImage with nearest-neighbour scaling. Drive it with CVDisplayLink and a clamped delta time. No SwiftUI redraw or memory allocation per frame; draw the HUD into the buffer. Walls: the four textures, each downsampled once at launch to 128x128 (CGImageSource thumbnail), darker on one side and fogged by distance; Metal049A is the doors and the exit. Floor and ceiling: smooth gradients with distance fog. Enemies and pickups: billboard sprites drawn once at launch with CoreGraphics into 64x64 bitmaps (a Guard and a tougher Heavy with a walk cycle, hurt flash and death animation; health, ammo and armor pickups), depth-tested against a per-column z-buffer and sorted far to near. Gameplay: three hand-made 24x24 tile levels with rooms, corridors, sliding doors opened with E or Space near them, and an exit; clear a level by reaching the exit. Enemies stay idle until they see or hear you, then chase using BFS on the grid, shoot when in line of sight (accuracy drops with distance). Weapons: pistol (infinite ammo) and shotgun (spread, limited shells), switched with 1 and 2 or the scroll wheel; draw the weapon at the bottom of the screen with bob, recoil and a muzzle flash. Play the pistol wav starting at 1.4 s and the shotgun wav starting at 0.45 s, each cut after about one second. Alternate the two footstep sounds while walking. Add head bob, a screen shake and a red flash when hit, a hit marker, a crosshair, wall collision that slides along walls with a radius, and pickups that are collected on touch. Controls: click to capture the mouse (CGAssociateMouseCursorAndMouseDelta, hide the cursor), mouse look, WASD to move, Shift to run, left click or Control to fire, Esc to release the mouse and pause. Show a title screen, a pause menu with a mouse sensitivity slider, a game over screen with Restart, and a level complete screen with kills and time. HUD: health, armor, ammo, level, a Tab minimap, and an F key FPS counter. Open the window at 1280x800, with a full screen button.
What it cost
Every AI run that made this demo, one per line. Model: Claude Sonnet 5.5. Tokens are shown as (in / out). “In” counts everything the model read, including text it had already seen in the session at a reduced price.
| Initial prompt(1.78M in / 117k out) | $2.0633 | |
| + | Compile fix 1 (automatic)(290k in / 287 out) | $0.0767 |
| + | Compile fix 2 (automatic)(294k in / 1k out) | $0.0757 |
| + | Compile fix 3 (automatic)(296k in / 884 out) | $0.0722 |
| + | Follow-up 1: keys leak to the system(299k in / 1k out) | $0.0809 |
| + | Follow-up 2: clicks switch windows(304k in / 2k out) | $0.0965 |
| + | Follow-up 3: the view jumps(308k in / 1k out) | $0.0796 |
| + | Follow-up 4: smoother, sharper(1.18M in / 14k out) | $0.4641 |
| = | Total(4.76M in / 138k out) | $3.0090 |
About $3.01 in total. AI usage only: hosting and the Mac that compiled it are not included.
How it was made
See the exact prompt, the replies and the follow-up prompts that turned one prompt into a finished game.
Read the case study →Opening it for the first time
- Open the .dmg and drag Bunker 13 onto the Applications folder.
- Open it from Applications. macOS may say it can’t check the app for malicious software. Click Done.
- Open System Settings → Privacy & Security and click Open Anyway. This is needed once. Why this happens. To share an app without the warning, see how to notarize it.