Delve into the world of graphics and game development. Discuss creating stunning visuals, optimizing game mechanics, and share resources for game developers.

All subtopics
Posts under Graphics & Games topic

Post

Replies

Boosts

Views

Created

Setting massProperties on a USDZ-loaded entity corrupts its transform (position/scale → NaN)
Setting massProperties on a USDZ-loaded entity corrupts its transform (position/scale → NaN) Category: RealityKit / visionOS Environment: visionOS 26.x Summary: Modifying PhysicsBodyComponent.massProperties at runtime on an entity loaded from a .usdz file silently corrupts the entity's transform. The translation and scale components become NaN, while rotation remains valid. The corruption occurs during the next RealityKit scene update cycle (e.g., during an await suspension on the main actor). Steps to Reproduce: Author a .usda file with a RigidBody component including valid m_mass and m_inertia values Load the entity at runtime via Entity(named: "MyEntity.usdz", in: bundle) Read the existing PhysicsBodyComponent, modify massProperties, and set it back: if var physics = entity.components[PhysicsBodyComponent.self] { physics.massProperties = .init( mass: 1.944, inertia: SIMD3<Float>(0.013, 0.026, 0.016), centerOfMass: (position: .zero, orientation: .init()) ) entity.components.set(physics) } Add the entity to the scene Perform any await call (e.g., TextureResource(contentsOf:)) that yields to the main actor, allowing a RealityKit scene update to run Expected: The entity retains its position and scale with the updated mass/inertia values. Actual: The entity's transform becomes corrupted: Transform( scale: SIMD3<Float>(nan, nan, nan), rotation: simd_quatf(real: 1.0, imag: SIMD3<Float>(0.0, 0.0, 0.0)), // ← fine translation: SIMD3<Float>(-nan, -nan, -nan) ) Additional findings from investigation: The entity's physics mode does not matter — corruption occurs even when the entity is .kinematic Creating a new PhysicsBodyComponent(...) and replacing the existing one also triggers the bug Modifying other properties on the same component (linearDamping, angularDamping, material, mode) does not cause corruption — only massProperties triggers it The parent entity's transform remains valid The computed mass/inertia values themselves are valid (finite, positive) The corruption is silent — no error, no warning, no crash from RealityKit itself Workaround: Author mass and inertia values directly in the .usda file and do not modify massProperties at runtime: def RealityKitStruct "massFrame" { float3 m_inertia = (0.02, 0.02, 0.038) float m_mass = 2.5 def RealityKitStruct "m_pose" { } } Other PhysicsBodyComponent properties (damping, material, mode) can safely be modified at runtime.
0
0
191
1d
RealityKit custom component: `has()` returns `true` but typed subscript returns `nil` in SwiftPM test runner
swift test (SwiftPM CLI) fails to decode RealityKit custom components from USD files, even though entity.components.has(MyComponent.self) returns true. Typed access via entity.components[MyComponent.self] returns nil. This forces projects that use RealityKit custom components to use xcodebuild test exclusively. Minimal repro: github.com/mesqueeb/swiftpm-realitykit-custom-component-repro Repro steps git clone https://github.com/mesqueeb/swiftpm-realitykit-custom-component-repro cd swiftpm-realitykit-custom-component-repro swift test --filter componentsPresentButNotDecodableInSwiftTest Observed ✅ entity.components.has(ReproComponent.self) returns true ❌ entity.components[ReproComponent.self] returns nil Expected If has(...) returns true for a registered custom component, typed lookup should decode and return non-nil. Notes Running the same test via xcodebuild test works correctly The component is properly registered and the USDA file correctly references it This affects any project that relies on custom RealityKit components in tests — there is no swift test workaround Feedback ID: FB22099519 Environment: macOS 15.5, Xcode 16.4, Swift 6.1
1
0
519
6d
SwiftUI + SpriteKit interop: best practices for HUD overlays in a tile-based puzzle game?
Hey all, I'm building a tile-based puzzle game for iOS and have been experimenting with using SwiftUI for the HUD (score, timer, pause menu, settings sheet) layered on top of a SpriteView that hosts the actual gameplay scene. So far the integration has been smoother than I expected — SpriteView drops cleanly into a ZStack, and I can drive SwiftUI state from the SpriteKit scene via an ObservableObject shared between them. That said, I've run into a few rough edges that I'd love some input on. The biggest one is touch handling: when a SwiftUI overlay (like a semi-transparent pause button) sits over the SpriteView, taps near the edges of the button occasionally get swallowed by the underlying scene, even when the button's hit area looks correct in the view debugger. I've tried .contentShape(Rectangle()) and bumping the frame, which helps but doesn't fully eliminate it. Curious if anyone has landed on a reliable pattern here, especially for transient overlays like toast notifications that need to ignore touches everywhere except on the toast itself. The other thing I'm weighing is animation ownership. Right now, gameplay animations (tile slides, match effects) live in SpriteKit, and HUD animations (score pop, combo counter) live in SwiftUI with withAnimation. It works, but the two animation systems don't share a clock, so when I want a "tile matched → score increment" effect to feel synchronized, I end up dispatching from the SKScene back to the ObservableObject and hoping the frame timing lines up. Has anyone found a cleaner way to coordinate timing across the two, or is this just the cost of mixing the frameworks? Would also love to hear from anyone who has shipped a game with this hybrid setup — any gotchas around Scene Phase transitions, backgrounding, or memory pressure that bit you in production? Thanks!
0
0
734
6d
Possibilities of Overclocking Apple Silicon
I've been testing Apple Silicon devices in their desktop configurations on the Mac Studio and now retired Mac Pro and it seems like they're greatly bottlenecked by their clock speeds. For reference here's my testing results. Testing Results: Mac Studio M2 Max • 32GBs RAM • 30 core GPU • 1TB Storage CPU Utilization • 60% • 20W CPU Temperature • 47ºC GPU Utilization • 100% • 20W GPU Temperature • 55ºC Fan Speed • 50% Workload Duration • 2hrs Another point is that the clock speed on the M2 Max's CPU is 3.5 GHz and on the GPU it is 1.44 GHz at max performance. Which the Mac Studio has no trouble pushing. My question is how do I push those clock speeds higher? Cause 1.44 GHz at 55ºC is evidence for extensive headroom. I'm sure there are tools internally for testing the upper limits of the silicon, but it makes no sense why it would be set so low the Mac Studio is at no worries of melting. Is there any way to push the performance of my Mac Studio? FB22713867 - Possibilities of Overclocking Apple Silicon
1
0
188
1w
Metal, Vulkan, OpenGL & Godot
Greetings! I'm preparing to publish an app in Apple Store. It's a 2D Audio app made in Godot, already published in Google Store.. As we know, OpenGL is considered deprecated since iOS 12 / 2018 .. However given the current state of Metal, or Vulkan integration in Godot, and with the idea of bringing the Best possible experience on iOS.. I'm not completely sure what will be the best API to use as primary option.. -As good as Metal, or even Vulkan work in Godot; the fact of the matter is, each API has its strong and weak points.. -Metal: Native on iOS, fully compliant and supported. However it has two weak points: Initial Compilation Freeze - +5 sec. Performance Hit, (although negligible for final user) app uses 25% more CPU (on my iPhone 12). Battery drain? -Vulkan: In godot, Vulkan > MoltenVk > Metal More complex translation layer, but interestingly gives slightly better Performance than Metal.. Initial Compilation doesn't cause Freeze, because is lazy/delayed and performed while the app is starting. Uses 25% less CPU than Metal and gives slightly more stable Framerate. (iPhone 12) However, given the extra complexity it could be more prone to error, or Compatibility Problems, which are known and have been reported with older iOS devices (iPads come to mind..) Right? -OpenGL: No Initial Compilation Needed Max Performance, No CPU munch Universally supported, (in theory?) works Perfectly on my iPhone 12 with iOS 26.3 and 26.4.2 And all in all, gives the best Performance and user experience. -And that's pretty much the situation! Since the graphics API of choice, will have an effect and directly translate to User experience... what's then the best one? -This will be the first app I Publish on Apple Store, so as you can imagine I want to Comply with Apple as much as possible; and bring iOS users the best possible experience. However each one of the APIs seem to have a negative aspect.. Metal: 5sec Compilation Freeze Vulkan: Compatibility Problems? OpenGL: "Deprecated" In practical terms, right now, OpenGL gives the best Performance, and the best User Experience.. So what to do? -The Android version is published in Google Store in OpenGL Compat mode. Works perfectly. Even tho OpenGL has been Deprecated on iOS for 7+ years, it has survived all along, with no announced removal date from Apple. And it seems to work perfectly and be fully operational up to the latest iOS 26 version.. right? Maybe Apple is maintaining it for stability and compatibility reasons, even if they're no longer actively developing it? Butthee "deprecated" label sounds alarming, as if support could drop any day.. So what will be the best choice in this situation? -Will an app built primarily for OpenGL, (with Metal fallback) be Rejected right away in Apple Store? -Otoh Vulkan (via MoltenVK) could be a middle term solution, second best Performance, no Compilation Freeze.. But yeah, the Compatibility aspect is important; and while considerable improvements have been made in Godot's implementation, the current status or possible outcome is harder to assess.. Both Metal and OpenGL seem safer options in that sense..
5
0
907
1w
GKLeaderboard.submitScore succeeds in development but no production users appear on leaderboard
I'm building an iOS word game (Gramfall) and no production App Store users can see their own scores on any leaderboard, despite Game Center authentication succeeding and no errors being thrown. The same code works correctly in development and all 6 leaderboard submissions fire "Score submitted" notifications on my dev device. 6 leaderboards in App Store Connect (3 Classic all-time, 3 Recurring monthly) and all are Live Production App Store users: authenticated, scores submitted, no errors — scores never appear Development build: all 6 submissions confirmed via Settings → Developer → Notify About Score Submissions Affected users cannot see their own score on the leaderboard from their own device. This rules out privacy/visibility restrictions as a player should always see their own score. This suggests submissions are either silently failing or being accepted but not recorded in the production Game Center environment. What we have ruled out Leaderboard ID mismatch (Everything in App Store Connect matches) Authentication failure (GKLocalPlayer.local.isAuthenticated is true, app shows "Connected") All 6 leaderboards load with releaseState(rawValue: 1), isHidden: false Account-level restrictions effectively ruled out as it affects all users, not one account endGame() fires correctly, confirmed in dev Questions Is there a known difference in how GKLeaderboard.submitScore behaves between the sandbox and production Game Center environments that could cause silent failures? Is there any way for a submission to return no error yet still not be recorded in production? Code func submitGameResult(timeSeconds: Int, score: Int, longestWordLength: Int) { guard GKLocalPlayer.local.isAuthenticated else { return } Task { do { try await GKLeaderboard.submitScore(timeSeconds, context: 0, player: GKLocalPlayer.local, leaderboardIDs: ["gramfall.lb.time", "gramfall.lb.time.monthly"]) try await GKLeaderboard.submitScore(score, context: 0, player: GKLocalPlayer.local, leaderboardIDs: ["gramfall.lb.score", "gramfall.lb.score.monthly"]) try await GKLeaderboard.submitScore(longestWordLength, context: 0, player: GKLocalPlayer.local, leaderboardIDs: ["gramfall.lb.longestword", "gramfall.lb.longestword.monthly"]) } catch { print("[GameCenter] submitGameResult failed: \(error)") } } }
0
0
733
2w
Using setVertexBytes for index primitives
When using index primitives is there a method to provide the indices using a temp buffer like setVertexBytes? Right now I have to create a temp metal buffer even for a small number of vertices and toss it after rendering using drawIndexedPrimitives.
1
0
466
3w
Arrow key causes delta jump in spritekit.
Hello, I have a problem where my macOS (Sequoia) Spritekit game spikes delta during the first press of an arrow key. I've test this with a small program, code below: // // GameScene.swift import SpriteKit import GameplayKit class GameScene: SKScene { var lastTime: TimeInterval = 0 override func keyDown(with event: NSEvent) { print("---------------> delta keyDown: \(event.characters!) keyCode: \(event.keyCode)") } override func update(_ currentTime: TimeInterval) { // Called before each frame is rendered print("update begins") let dt: CGFloat if lastTime > 0 { dt = (CGFloat(currentTime - lastTime)) } else { dt = 1.0 / 60.0 } if dt > (1/30) { print("************************************ delta spike ", dt) } lastTime = currentTime print("dt: ", dt) print("update ends") } } Example output: update begins ************************************ delta spike 0.03381687504588626 dt: 0.03381687504588626 update ends update begins dt: 0.016670208307914436 update ends As you can see, when I press left arrow key in this case I get a big delta spike. There's no spike with further presses of the arrow key. Other keys, such as the common W A S D controls for games, do not cause this delta spike.
3
0
1.7k
3w
Blending walk and run animations in RealityKit
Hi everybody, I have 2 separate animations run.usdz and walk.usdz animation files which are loaded perfectly in Reality Composer Pro and in the RealityKit application. I want to gradually increase the speed of my player by switching blending weight values from 0.0 (walking) to 1.0 (full speed running). let rabbit = await RabbitBuilder.loadWalkingRabbit() let runningRabbit = await RabbitBuilder.loadRunningRabbit() rabbit.scale = SIMD3(0.05, 0.05, 0.05) runningRabbit.scale = SIMD3(0.05, 0.05, 0.05) let walkAnimation = rabbit.availableAnimations let runAnimation = runningRabbit.availableAnimations RabbitWalker.walkAnim = walkAnimation.first! RabbitWalker.runAnim = runAnimation.first! guard let walk = RabbitWalker.walkAnim, let run = RabbitWalker.runAnim else { return } let blendTree = BlendTreeAnimation<JointTransforms>( BlendTreeBlendNode(sources: [ BlendTreeSourceNode(source: walk.definition, name: "walk", weight: .value(1 - weight)), BlendTreeSourceNode(source: run.definition, name: "run", weight: .value(weight)) ]), name: "rabbitLocomotion", repeatMode: .repeat, offset: TimeInterval(elapsed) ) // I have runtime error after executing this line: "Cannot add incompatible timeline type to blend tree." guard let resource = try? AnimationResource.generate(with: blendTree) else { return } entity.playAnimation(resource) static func loadWalkingRabbit() async -> Entity? { do { let scene = try await Entity(named: "Scene", in: realityKitEnvironmentBundle) guard let rabbit = await scene.findEntity(named: "RabbitWalk") else { return nil } await rabbit.removeFromParent() return rabbit } catch { return nil } } static func loadRunningRabbit() async -> Entity? { do { let scene = try await Entity(named: "Scene", in: realityKitEnvironmentBundle) guard let rabbit = await scene.findEntity(named: "RabbitRun") else { return nil } await rabbit.removeFromParent() return rabbit } catch { return nil } } But when I run this code I have this error; Cannot add incompatible timeline type to blend tree. By the way I have looked to developer's sample codes from here but I couldn't find any relevant BlendTreeAnimation sample which blends 2 animations. I would very happy if someone could direct me to a solution. Regards.
4
0
378
4w
Cannot submit Game Center leaderboard – asks for app version although app is already live
Hi, I’m stuck with submitting a Game Center leaderboard and wanted to ask if others are seeing the same issue. My setup: App is already live on the App Store Game Center capability is enabled Leaderboard works perfectly in TestFlight (scores are submitted and visible) Problem: When I try to submit the leaderboard for review, I get: “A Game Center enabled app version must be added for review.” This is confusing because: The app already includes Game Center The app is already approved and published Apple documentation says Game Center components can be submitted without a new app version I also tried recreating the leaderboard and checking all settings, but the issue persists. Is this a known App Store Connect issue? Or is there something I’m missing? Thanks!
1
0
225
Apr ’26
Issue with Apple Search Ads Attribution Callback (SKAdNetwork / AdAttributionKit)
Dear Apple Developer Technical Support Team, We are currently integrating Apple Search Ads attribution (SKAdNetwork / AdAttributionKit) for our application, but we have been unable to receive any attribution callbacks from Apple. We would appreciate your assistance in diagnosing this issue. App Information: App ID: 1531290216 Bundle ID: com.volvapps.tk2.cn Callback Endpoint: Our server endpoint for receiving attribution postbacks is: https://volvgames.com/.well-known/skadnetwork/report-attribution Issue Description: We have conducted multiple tests under different scenarios, but in all cases, our server has not received any callback from Apple. Test Scenarios: ① Xcode Installation Test Built and launched the app directly via Xcode. Called the following APIs within the app: SKAdNetwork registerAppForAdNetworkAttribution SKAdNetwork updateConversionValue:value Result: No callback received on our server. ②On-Device Developer Mode Test (AdAttributionKit) Enabled AdAttributionKit Developer Mode on a physical iPhone. Configured a development postback using the app’s Bundle ID. Used either the provided developer postback URL or manually entered our endpoint. Created and triggered the postback via “Send Development Postback”. Result: No callback received. ③Additional Attempts Modified the callback URL from: https://volvgames.com/.well-known/skadnetwork/report-attribution to: https://volvgames.com/ Repeated tests under both Xcode and Developer Mode environments. Also attempted triggering postbacks after calling the attribution APIs within the app. Result: Still no callback received in all cases. Additional Question: We understand that certain files may be required for review or troubleshooting. However, we were unable to find where to upload attachments when submitting this request. We would like to provide the following files for your reference: info.plist AdAttribution.mm Could you please advise how we can submit these files to assist with the investigation? We would greatly appreciate any guidance or suggestions you may have regarding this issue. Please let us know if further information is required. Thank you for your support.
0
0
395
Apr ’26
SceneKit shader compile and cache issues? :(
I'm making an apple watch game and it's running so smooth and nice while developing but I ran into a showstopping problem that I wouldn't even have noticed until i deleted the app and reinstalled... Every first-run on a freshly installed copy of the game has major frame hitches as it loads assets. Every run after that has ZERO hitches and runs like butter. Even if i install a new version on top of the old one (which is why i never noticed this problem in my almost finished game) it runs smooth. Framerate issues come back if I delete and reinstall. I think it's compiling shaders or caching geometry but I haven't been able to trick it into doing the hard work during non-critical moments in the game. I've tried preloading assets in the main menu, loading at the start of the level, loading and rendering in a tiny part of the screen, rendering behind dialog boxes... it seems no matter what i can only get rid of the frame hitches after the game has been played through once... and I'm going to lose all customers on that first terrible impression even though the game is actually really good and fun when it's running properly... Any suggestions how i can prewarm/precompile the assets to avoid framerate hitches and freezes during gameplay? I thought I was so close to release but I feel this is un-shippable! I can send a link to my test flight build to anyone that wants to see the problem first hand. Also please note that I am artist-forward with a technical lean, but certainly not a real programmer, unfortunately. Jiovanie
1
0
177
Apr ’26
D3DMetal Extreme Over Synchronization Issues
Explanation Currently, D3DMetal’s GPU synchronization approach introduces significant compute overhead on the CPU. This specifically affects D3D12 games that use modern rendering pipelines on Apple Silicon. Specifically, I’ve tested Death Stranding 2 On the Beach for how it handles its rendering. And the results are extreme: frame times are suffering from a 42% decrease from synchronization. Although there are obviously other effects at play, such as the overhead introduced by Rosetta and Wine, both of them don’t introduce as much overhead as D3DMetal. This issue isn’t just specific to Death Stranding 2 On the Beach; most games running through D3DMetal suffer from this. Most games still seem to force synchronization to ~30 ms to reach the 30 fps amount. But it could be better with better synchronization, such as how DXMT handles it. Instead of doubling the work, it allows Metal to single-handedly track resource dependencies internally. This is in part due to the unfortunate bad mapping of D3D12 calls onto shared logic between D3D11 and D3D12. System M2 Max Mac Studio — 32 GBs — 30-core GPU macOS 26.4 Tahoe CrossOver 26.1 RC Death Stranding 2 On the Beach — Steam Assassin’s Creed Valhalla — Steam & Ubisoft Connect Thank you for your commitment. Another game that I recommend testing to really see this swell is Assassin’s Creed Valhalla. Feedback FB22426600 - D3DMetal Extereme Over Syncranization Issues
1
1
399
Apr ’26
SpriteKit FPS drops significantly on iOS 26.3.1 when touching screen, even in minimal scene
Title: SpriteKit FPS drops significantly on iOS 26.3.1 when touching screen, even in a minimal scene Summary: On a real device running iOS 26.3.1, FPS drops significantly in a very simple SpriteKit scene when touching or moving a finger on the screen. This happens even with a minimal setup where update(_:), touchesBegan, and touchesMoved are not overridden. Because the issue reproduces in a minimal scene, I suspect a performance regression in SpriteKit and/or iOS rather than in app-specific logic. Environment: OS: iOS 26.3.1 Device: iPhone 12 Xcode: 26.3 Build Configuration: Release Framework: SpriteKit FPS measurement: SKView.showsFPS = true Steps to Reproduce: Present a minimal SpriteKit scene. Enable SKView.showsFPS = true. Add only a very small number of nodes to the scene. Do not override update(_:), touchesBegan, or touchesMoved. Repeatedly tap the screen or move a finger around. Actual Result: The scene stays around 60 FPS when idle. FPS drops significantly when touching or moving a finger on the screen. The drop appears to get worse as the node count increases. The issue still reproduces even if touchesMoved is empty or not overridden at all. Expected Result: A minimal scene like this should remain close to 60 FPS even while touching the screen. At minimum, FPS should not drop this much when the app does not perform meaningful touch handling. Notes: Time Profiler does not point to a clear heavy app-specific function; instead, frame time worsens during touch interaction. Since this also reproduces in a minimal scene, I do not believe the root cause is only in my game logic. Similar reports exist describing SpriteKit framerate drops on recent iOS versions, including cases where the issue appears in very simple scenes. Minimal Reproducible Code: import SpriteKit final class TestScene: SKScene { override func didMove(to view: SKView) { backgroundColor = .black scaleMode = .resizeFill let textures = [ SKTexture(imageNamed: "title1"), SKTexture(imageNamed: "title2"), SKTexture(imageNamed: "title3"), SKTexture(imageNamed: "title4"), SKTexture(imageNamed: "title5"), ] let node = SKSpriteNode(texture: textures[0]) node.position = CGPoint(x: size.width * 0.5, y: size.height * 0.5) addChild(node) let anim = SKAction.animate( with: textures, timePerFrame: 8.0 / 60.0, resize: false, restore: false ) node.run(.repeatForever(anim)) } } import UIKit import SpriteKit final class GameViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() let skView = SKView(frame: view.bounds) skView.showsFPS = true skView.showsNodeCount = true skView.ignoresSiblingOrder = true skView.preferredFrameRate = 60 view.addSubview(skView) let scene = TestScene(size: skView.bounds.size) skView.presentScene(scene) } }
1
0
245
Apr ’26
Best Way to Use MetalFX in Unreal Engine 5.7 for macOS Port?
Hi everyone, We’re currently porting a high-fidelity AA+ PC title built on Unreal Engine 5.7 to macOS (Apple Silicon), and we’re looking for guidance from anyone with experience in this area. At the moment, the game is already runnable on Mac, but not yet at a playable level — we’re seeing performance around 10–15 FPS on an M4 device. We’re actively analyzing and defining the work needed to reach production-quality performance on macOS. One of the key areas we’re exploring is leveraging MetalFX to improve frame rate. However, it seems there’s no official MetalFX plugin or direct integration available for Unreal Engine. Has anyone here successfully integrated MetalFX into a UE5 rendering pipeline, or found a recommended approach to do so? Any insights on best practices, workflows, or references (docs, samples, etc.) would be greatly appreciated. Thanks in advance!
3
0
746
Mar ’26
Setting massProperties on a USDZ-loaded entity corrupts its transform (position/scale → NaN)
Setting massProperties on a USDZ-loaded entity corrupts its transform (position/scale → NaN) Category: RealityKit / visionOS Environment: visionOS 26.x Summary: Modifying PhysicsBodyComponent.massProperties at runtime on an entity loaded from a .usdz file silently corrupts the entity's transform. The translation and scale components become NaN, while rotation remains valid. The corruption occurs during the next RealityKit scene update cycle (e.g., during an await suspension on the main actor). Steps to Reproduce: Author a .usda file with a RigidBody component including valid m_mass and m_inertia values Load the entity at runtime via Entity(named: "MyEntity.usdz", in: bundle) Read the existing PhysicsBodyComponent, modify massProperties, and set it back: if var physics = entity.components[PhysicsBodyComponent.self] { physics.massProperties = .init( mass: 1.944, inertia: SIMD3<Float>(0.013, 0.026, 0.016), centerOfMass: (position: .zero, orientation: .init()) ) entity.components.set(physics) } Add the entity to the scene Perform any await call (e.g., TextureResource(contentsOf:)) that yields to the main actor, allowing a RealityKit scene update to run Expected: The entity retains its position and scale with the updated mass/inertia values. Actual: The entity's transform becomes corrupted: Transform( scale: SIMD3<Float>(nan, nan, nan), rotation: simd_quatf(real: 1.0, imag: SIMD3<Float>(0.0, 0.0, 0.0)), // ← fine translation: SIMD3<Float>(-nan, -nan, -nan) ) Additional findings from investigation: The entity's physics mode does not matter — corruption occurs even when the entity is .kinematic Creating a new PhysicsBodyComponent(...) and replacing the existing one also triggers the bug Modifying other properties on the same component (linearDamping, angularDamping, material, mode) does not cause corruption — only massProperties triggers it The parent entity's transform remains valid The computed mass/inertia values themselves are valid (finite, positive) The corruption is silent — no error, no warning, no crash from RealityKit itself Workaround: Author mass and inertia values directly in the .usda file and do not modify massProperties at runtime: def RealityKitStruct "massFrame" { float3 m_inertia = (0.02, 0.02, 0.038) float m_mass = 2.5 def RealityKitStruct "m_pose" { } } Other PhysicsBodyComponent properties (damping, material, mode) can safely be modified at runtime.
Replies
0
Boosts
0
Views
191
Activity
1d
RealityKit custom component: `has()` returns `true` but typed subscript returns `nil` in SwiftPM test runner
swift test (SwiftPM CLI) fails to decode RealityKit custom components from USD files, even though entity.components.has(MyComponent.self) returns true. Typed access via entity.components[MyComponent.self] returns nil. This forces projects that use RealityKit custom components to use xcodebuild test exclusively. Minimal repro: github.com/mesqueeb/swiftpm-realitykit-custom-component-repro Repro steps git clone https://github.com/mesqueeb/swiftpm-realitykit-custom-component-repro cd swiftpm-realitykit-custom-component-repro swift test --filter componentsPresentButNotDecodableInSwiftTest Observed ✅ entity.components.has(ReproComponent.self) returns true ❌ entity.components[ReproComponent.self] returns nil Expected If has(...) returns true for a registered custom component, typed lookup should decode and return non-nil. Notes Running the same test via xcodebuild test works correctly The component is properly registered and the USDA file correctly references it This affects any project that relies on custom RealityKit components in tests — there is no swift test workaround Feedback ID: FB22099519 Environment: macOS 15.5, Xcode 16.4, Swift 6.1
Replies
1
Boosts
0
Views
519
Activity
6d
SwiftUI + SpriteKit interop: best practices for HUD overlays in a tile-based puzzle game?
Hey all, I'm building a tile-based puzzle game for iOS and have been experimenting with using SwiftUI for the HUD (score, timer, pause menu, settings sheet) layered on top of a SpriteView that hosts the actual gameplay scene. So far the integration has been smoother than I expected — SpriteView drops cleanly into a ZStack, and I can drive SwiftUI state from the SpriteKit scene via an ObservableObject shared between them. That said, I've run into a few rough edges that I'd love some input on. The biggest one is touch handling: when a SwiftUI overlay (like a semi-transparent pause button) sits over the SpriteView, taps near the edges of the button occasionally get swallowed by the underlying scene, even when the button's hit area looks correct in the view debugger. I've tried .contentShape(Rectangle()) and bumping the frame, which helps but doesn't fully eliminate it. Curious if anyone has landed on a reliable pattern here, especially for transient overlays like toast notifications that need to ignore touches everywhere except on the toast itself. The other thing I'm weighing is animation ownership. Right now, gameplay animations (tile slides, match effects) live in SpriteKit, and HUD animations (score pop, combo counter) live in SwiftUI with withAnimation. It works, but the two animation systems don't share a clock, so when I want a "tile matched → score increment" effect to feel synchronized, I end up dispatching from the SKScene back to the ObservableObject and hoping the frame timing lines up. Has anyone found a cleaner way to coordinate timing across the two, or is this just the cost of mixing the frameworks? Would also love to hear from anyone who has shipped a game with this hybrid setup — any gotchas around Scene Phase transitions, backgrounding, or memory pressure that bit you in production? Thanks!
Replies
0
Boosts
0
Views
734
Activity
6d
Possibilities of Overclocking Apple Silicon
I've been testing Apple Silicon devices in their desktop configurations on the Mac Studio and now retired Mac Pro and it seems like they're greatly bottlenecked by their clock speeds. For reference here's my testing results. Testing Results: Mac Studio M2 Max • 32GBs RAM • 30 core GPU • 1TB Storage CPU Utilization • 60% • 20W CPU Temperature • 47ºC GPU Utilization • 100% • 20W GPU Temperature • 55ºC Fan Speed • 50% Workload Duration • 2hrs Another point is that the clock speed on the M2 Max's CPU is 3.5 GHz and on the GPU it is 1.44 GHz at max performance. Which the Mac Studio has no trouble pushing. My question is how do I push those clock speeds higher? Cause 1.44 GHz at 55ºC is evidence for extensive headroom. I'm sure there are tools internally for testing the upper limits of the silicon, but it makes no sense why it would be set so low the Mac Studio is at no worries of melting. Is there any way to push the performance of my Mac Studio? FB22713867 - Possibilities of Overclocking Apple Silicon
Replies
1
Boosts
0
Views
188
Activity
1w
Metal, Vulkan, OpenGL & Godot
Greetings! I'm preparing to publish an app in Apple Store. It's a 2D Audio app made in Godot, already published in Google Store.. As we know, OpenGL is considered deprecated since iOS 12 / 2018 .. However given the current state of Metal, or Vulkan integration in Godot, and with the idea of bringing the Best possible experience on iOS.. I'm not completely sure what will be the best API to use as primary option.. -As good as Metal, or even Vulkan work in Godot; the fact of the matter is, each API has its strong and weak points.. -Metal: Native on iOS, fully compliant and supported. However it has two weak points: Initial Compilation Freeze - +5 sec. Performance Hit, (although negligible for final user) app uses 25% more CPU (on my iPhone 12). Battery drain? -Vulkan: In godot, Vulkan > MoltenVk > Metal More complex translation layer, but interestingly gives slightly better Performance than Metal.. Initial Compilation doesn't cause Freeze, because is lazy/delayed and performed while the app is starting. Uses 25% less CPU than Metal and gives slightly more stable Framerate. (iPhone 12) However, given the extra complexity it could be more prone to error, or Compatibility Problems, which are known and have been reported with older iOS devices (iPads come to mind..) Right? -OpenGL: No Initial Compilation Needed Max Performance, No CPU munch Universally supported, (in theory?) works Perfectly on my iPhone 12 with iOS 26.3 and 26.4.2 And all in all, gives the best Performance and user experience. -And that's pretty much the situation! Since the graphics API of choice, will have an effect and directly translate to User experience... what's then the best one? -This will be the first app I Publish on Apple Store, so as you can imagine I want to Comply with Apple as much as possible; and bring iOS users the best possible experience. However each one of the APIs seem to have a negative aspect.. Metal: 5sec Compilation Freeze Vulkan: Compatibility Problems? OpenGL: "Deprecated" In practical terms, right now, OpenGL gives the best Performance, and the best User Experience.. So what to do? -The Android version is published in Google Store in OpenGL Compat mode. Works perfectly. Even tho OpenGL has been Deprecated on iOS for 7+ years, it has survived all along, with no announced removal date from Apple. And it seems to work perfectly and be fully operational up to the latest iOS 26 version.. right? Maybe Apple is maintaining it for stability and compatibility reasons, even if they're no longer actively developing it? Butthee "deprecated" label sounds alarming, as if support could drop any day.. So what will be the best choice in this situation? -Will an app built primarily for OpenGL, (with Metal fallback) be Rejected right away in Apple Store? -Otoh Vulkan (via MoltenVK) could be a middle term solution, second best Performance, no Compilation Freeze.. But yeah, the Compatibility aspect is important; and while considerable improvements have been made in Godot's implementation, the current status or possible outcome is harder to assess.. Both Metal and OpenGL seem safer options in that sense..
Replies
5
Boosts
0
Views
907
Activity
1w
I do not use currentTime:TimeInterval as the basis for in-game time.
If you are developing a network game, it is best to use server time as the basis for game time. If you are developing a standalone game, it is best to use the rendering frame count as the basis for game time.
Replies
0
Boosts
0
Views
783
Activity
2w
GKLeaderboard.submitScore succeeds in development but no production users appear on leaderboard
I'm building an iOS word game (Gramfall) and no production App Store users can see their own scores on any leaderboard, despite Game Center authentication succeeding and no errors being thrown. The same code works correctly in development and all 6 leaderboard submissions fire "Score submitted" notifications on my dev device. 6 leaderboards in App Store Connect (3 Classic all-time, 3 Recurring monthly) and all are Live Production App Store users: authenticated, scores submitted, no errors — scores never appear Development build: all 6 submissions confirmed via Settings → Developer → Notify About Score Submissions Affected users cannot see their own score on the leaderboard from their own device. This rules out privacy/visibility restrictions as a player should always see their own score. This suggests submissions are either silently failing or being accepted but not recorded in the production Game Center environment. What we have ruled out Leaderboard ID mismatch (Everything in App Store Connect matches) Authentication failure (GKLocalPlayer.local.isAuthenticated is true, app shows "Connected") All 6 leaderboards load with releaseState(rawValue: 1), isHidden: false Account-level restrictions effectively ruled out as it affects all users, not one account endGame() fires correctly, confirmed in dev Questions Is there a known difference in how GKLeaderboard.submitScore behaves between the sandbox and production Game Center environments that could cause silent failures? Is there any way for a submission to return no error yet still not be recorded in production? Code func submitGameResult(timeSeconds: Int, score: Int, longestWordLength: Int) { guard GKLocalPlayer.local.isAuthenticated else { return } Task { do { try await GKLeaderboard.submitScore(timeSeconds, context: 0, player: GKLocalPlayer.local, leaderboardIDs: ["gramfall.lb.time", "gramfall.lb.time.monthly"]) try await GKLeaderboard.submitScore(score, context: 0, player: GKLocalPlayer.local, leaderboardIDs: ["gramfall.lb.score", "gramfall.lb.score.monthly"]) try await GKLeaderboard.submitScore(longestWordLength, context: 0, player: GKLocalPlayer.local, leaderboardIDs: ["gramfall.lb.longestword", "gramfall.lb.longestword.monthly"]) } catch { print("[GameCenter] submitGameResult failed: \(error)") } } }
Replies
0
Boosts
0
Views
733
Activity
2w
Using setVertexBytes for index primitives
When using index primitives is there a method to provide the indices using a temp buffer like setVertexBytes? Right now I have to create a temp metal buffer even for a small number of vertices and toss it after rendering using drawIndexedPrimitives.
Replies
1
Boosts
0
Views
466
Activity
3w
Arrow key causes delta jump in spritekit.
Hello, I have a problem where my macOS (Sequoia) Spritekit game spikes delta during the first press of an arrow key. I've test this with a small program, code below: // // GameScene.swift import SpriteKit import GameplayKit class GameScene: SKScene { var lastTime: TimeInterval = 0 override func keyDown(with event: NSEvent) { print("---------------> delta keyDown: \(event.characters!) keyCode: \(event.keyCode)") } override func update(_ currentTime: TimeInterval) { // Called before each frame is rendered print("update begins") let dt: CGFloat if lastTime > 0 { dt = (CGFloat(currentTime - lastTime)) } else { dt = 1.0 / 60.0 } if dt > (1/30) { print("************************************ delta spike ", dt) } lastTime = currentTime print("dt: ", dt) print("update ends") } } Example output: update begins ************************************ delta spike 0.03381687504588626 dt: 0.03381687504588626 update ends update begins dt: 0.016670208307914436 update ends As you can see, when I press left arrow key in this case I get a big delta spike. There's no spike with further presses of the arrow key. Other keys, such as the common W A S D controls for games, do not cause this delta spike.
Replies
3
Boosts
0
Views
1.7k
Activity
3w
Blending walk and run animations in RealityKit
Hi everybody, I have 2 separate animations run.usdz and walk.usdz animation files which are loaded perfectly in Reality Composer Pro and in the RealityKit application. I want to gradually increase the speed of my player by switching blending weight values from 0.0 (walking) to 1.0 (full speed running). let rabbit = await RabbitBuilder.loadWalkingRabbit() let runningRabbit = await RabbitBuilder.loadRunningRabbit() rabbit.scale = SIMD3(0.05, 0.05, 0.05) runningRabbit.scale = SIMD3(0.05, 0.05, 0.05) let walkAnimation = rabbit.availableAnimations let runAnimation = runningRabbit.availableAnimations RabbitWalker.walkAnim = walkAnimation.first! RabbitWalker.runAnim = runAnimation.first! guard let walk = RabbitWalker.walkAnim, let run = RabbitWalker.runAnim else { return } let blendTree = BlendTreeAnimation<JointTransforms>( BlendTreeBlendNode(sources: [ BlendTreeSourceNode(source: walk.definition, name: "walk", weight: .value(1 - weight)), BlendTreeSourceNode(source: run.definition, name: "run", weight: .value(weight)) ]), name: "rabbitLocomotion", repeatMode: .repeat, offset: TimeInterval(elapsed) ) // I have runtime error after executing this line: "Cannot add incompatible timeline type to blend tree." guard let resource = try? AnimationResource.generate(with: blendTree) else { return } entity.playAnimation(resource) static func loadWalkingRabbit() async -> Entity? { do { let scene = try await Entity(named: "Scene", in: realityKitEnvironmentBundle) guard let rabbit = await scene.findEntity(named: "RabbitWalk") else { return nil } await rabbit.removeFromParent() return rabbit } catch { return nil } } static func loadRunningRabbit() async -> Entity? { do { let scene = try await Entity(named: "Scene", in: realityKitEnvironmentBundle) guard let rabbit = await scene.findEntity(named: "RabbitRun") else { return nil } await rabbit.removeFromParent() return rabbit } catch { return nil } } But when I run this code I have this error; Cannot add incompatible timeline type to blend tree. By the way I have looked to developer's sample codes from here but I couldn't find any relevant BlendTreeAnimation sample which blends 2 animations. I would very happy if someone could direct me to a solution. Regards.
Replies
4
Boosts
0
Views
378
Activity
4w
Can Apple please add Nintendo Switch 2 Pro Controller support? This is a very popular controller.
Hi Apple, Can you please add support for the Nintendo Switch 2 Pro Controller? The first one is supported but the Switch 2 has been out nearly a year now and a lot of people want to use these controllers with macOS and iOS. Can you please consider adding support? Thank you.
Replies
1
Boosts
0
Views
496
Activity
4w
Xcode 26.4 Simulator Won't Load Game Center Data
For apps that support Game Center, calling presentViewController on a GKGameCenterViewController yields no data for leaderboards or achievements, regardless of which iOS version you're simulating (works fine on device, but doesn't work in simulator).
Replies
0
Boosts
0
Views
192
Activity
Apr ’26
Cannot submit Game Center leaderboard – asks for app version although app is already live
Hi, I’m stuck with submitting a Game Center leaderboard and wanted to ask if others are seeing the same issue. My setup: App is already live on the App Store Game Center capability is enabled Leaderboard works perfectly in TestFlight (scores are submitted and visible) Problem: When I try to submit the leaderboard for review, I get: “A Game Center enabled app version must be added for review.” This is confusing because: The app already includes Game Center The app is already approved and published Apple documentation says Game Center components can be submitted without a new app version I also tried recreating the leaderboard and checking all settings, but the issue persists. Is this a known App Store Connect issue? Or is there something I’m missing? Thanks!
Replies
1
Boosts
0
Views
225
Activity
Apr ’26
Noob ios 26 for game mobile legend só lag 🤮🤮
Why you don’t fix that ?
Replies
1
Boosts
0
Views
380
Activity
Apr ’26
Issue with Apple Search Ads Attribution Callback (SKAdNetwork / AdAttributionKit)
Dear Apple Developer Technical Support Team, We are currently integrating Apple Search Ads attribution (SKAdNetwork / AdAttributionKit) for our application, but we have been unable to receive any attribution callbacks from Apple. We would appreciate your assistance in diagnosing this issue. App Information: App ID: 1531290216 Bundle ID: com.volvapps.tk2.cn Callback Endpoint: Our server endpoint for receiving attribution postbacks is: https://volvgames.com/.well-known/skadnetwork/report-attribution Issue Description: We have conducted multiple tests under different scenarios, but in all cases, our server has not received any callback from Apple. Test Scenarios: ① Xcode Installation Test Built and launched the app directly via Xcode. Called the following APIs within the app: SKAdNetwork registerAppForAdNetworkAttribution SKAdNetwork updateConversionValue:value Result: No callback received on our server. ②On-Device Developer Mode Test (AdAttributionKit) Enabled AdAttributionKit Developer Mode on a physical iPhone. Configured a development postback using the app’s Bundle ID. Used either the provided developer postback URL or manually entered our endpoint. Created and triggered the postback via “Send Development Postback”. Result: No callback received. ③Additional Attempts Modified the callback URL from: https://volvgames.com/.well-known/skadnetwork/report-attribution to: https://volvgames.com/ Repeated tests under both Xcode and Developer Mode environments. Also attempted triggering postbacks after calling the attribution APIs within the app. Result: Still no callback received in all cases. Additional Question: We understand that certain files may be required for review or troubleshooting. However, we were unable to find where to upload attachments when submitting this request. We would like to provide the following files for your reference: info.plist AdAttribution.mm Could you please advise how we can submit these files to assist with the investigation? We would greatly appreciate any guidance or suggestions you may have regarding this issue. Please let us know if further information is required. Thank you for your support.
Replies
0
Boosts
0
Views
395
Activity
Apr ’26
Deaf friend
I just wonder what to do futures iPhone will change update
Replies
1
Boosts
0
Views
289
Activity
Apr ’26
SceneKit shader compile and cache issues? :(
I'm making an apple watch game and it's running so smooth and nice while developing but I ran into a showstopping problem that I wouldn't even have noticed until i deleted the app and reinstalled... Every first-run on a freshly installed copy of the game has major frame hitches as it loads assets. Every run after that has ZERO hitches and runs like butter. Even if i install a new version on top of the old one (which is why i never noticed this problem in my almost finished game) it runs smooth. Framerate issues come back if I delete and reinstall. I think it's compiling shaders or caching geometry but I haven't been able to trick it into doing the hard work during non-critical moments in the game. I've tried preloading assets in the main menu, loading at the start of the level, loading and rendering in a tiny part of the screen, rendering behind dialog boxes... it seems no matter what i can only get rid of the frame hitches after the game has been played through once... and I'm going to lose all customers on that first terrible impression even though the game is actually really good and fun when it's running properly... Any suggestions how i can prewarm/precompile the assets to avoid framerate hitches and freezes during gameplay? I thought I was so close to release but I feel this is un-shippable! I can send a link to my test flight build to anyone that wants to see the problem first hand. Also please note that I am artist-forward with a technical lean, but certainly not a real programmer, unfortunately. Jiovanie
Replies
1
Boosts
0
Views
177
Activity
Apr ’26
D3DMetal Extreme Over Synchronization Issues
Explanation Currently, D3DMetal’s GPU synchronization approach introduces significant compute overhead on the CPU. This specifically affects D3D12 games that use modern rendering pipelines on Apple Silicon. Specifically, I’ve tested Death Stranding 2 On the Beach for how it handles its rendering. And the results are extreme: frame times are suffering from a 42% decrease from synchronization. Although there are obviously other effects at play, such as the overhead introduced by Rosetta and Wine, both of them don’t introduce as much overhead as D3DMetal. This issue isn’t just specific to Death Stranding 2 On the Beach; most games running through D3DMetal suffer from this. Most games still seem to force synchronization to ~30 ms to reach the 30 fps amount. But it could be better with better synchronization, such as how DXMT handles it. Instead of doubling the work, it allows Metal to single-handedly track resource dependencies internally. This is in part due to the unfortunate bad mapping of D3D12 calls onto shared logic between D3D11 and D3D12. System M2 Max Mac Studio — 32 GBs — 30-core GPU macOS 26.4 Tahoe CrossOver 26.1 RC Death Stranding 2 On the Beach — Steam Assassin’s Creed Valhalla — Steam & Ubisoft Connect Thank you for your commitment. Another game that I recommend testing to really see this swell is Assassin’s Creed Valhalla. Feedback FB22426600 - D3DMetal Extereme Over Syncranization Issues
Replies
1
Boosts
1
Views
399
Activity
Apr ’26
SpriteKit FPS drops significantly on iOS 26.3.1 when touching screen, even in minimal scene
Title: SpriteKit FPS drops significantly on iOS 26.3.1 when touching screen, even in a minimal scene Summary: On a real device running iOS 26.3.1, FPS drops significantly in a very simple SpriteKit scene when touching or moving a finger on the screen. This happens even with a minimal setup where update(_:), touchesBegan, and touchesMoved are not overridden. Because the issue reproduces in a minimal scene, I suspect a performance regression in SpriteKit and/or iOS rather than in app-specific logic. Environment: OS: iOS 26.3.1 Device: iPhone 12 Xcode: 26.3 Build Configuration: Release Framework: SpriteKit FPS measurement: SKView.showsFPS = true Steps to Reproduce: Present a minimal SpriteKit scene. Enable SKView.showsFPS = true. Add only a very small number of nodes to the scene. Do not override update(_:), touchesBegan, or touchesMoved. Repeatedly tap the screen or move a finger around. Actual Result: The scene stays around 60 FPS when idle. FPS drops significantly when touching or moving a finger on the screen. The drop appears to get worse as the node count increases. The issue still reproduces even if touchesMoved is empty or not overridden at all. Expected Result: A minimal scene like this should remain close to 60 FPS even while touching the screen. At minimum, FPS should not drop this much when the app does not perform meaningful touch handling. Notes: Time Profiler does not point to a clear heavy app-specific function; instead, frame time worsens during touch interaction. Since this also reproduces in a minimal scene, I do not believe the root cause is only in my game logic. Similar reports exist describing SpriteKit framerate drops on recent iOS versions, including cases where the issue appears in very simple scenes. Minimal Reproducible Code: import SpriteKit final class TestScene: SKScene { override func didMove(to view: SKView) { backgroundColor = .black scaleMode = .resizeFill let textures = [ SKTexture(imageNamed: "title1"), SKTexture(imageNamed: "title2"), SKTexture(imageNamed: "title3"), SKTexture(imageNamed: "title4"), SKTexture(imageNamed: "title5"), ] let node = SKSpriteNode(texture: textures[0]) node.position = CGPoint(x: size.width * 0.5, y: size.height * 0.5) addChild(node) let anim = SKAction.animate( with: textures, timePerFrame: 8.0 / 60.0, resize: false, restore: false ) node.run(.repeatForever(anim)) } } import UIKit import SpriteKit final class GameViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() let skView = SKView(frame: view.bounds) skView.showsFPS = true skView.showsNodeCount = true skView.ignoresSiblingOrder = true skView.preferredFrameRate = 60 view.addSubview(skView) let scene = TestScene(size: skView.bounds.size) skView.presentScene(scene) } }
Replies
1
Boosts
0
Views
245
Activity
Apr ’26
Best Way to Use MetalFX in Unreal Engine 5.7 for macOS Port?
Hi everyone, We’re currently porting a high-fidelity AA+ PC title built on Unreal Engine 5.7 to macOS (Apple Silicon), and we’re looking for guidance from anyone with experience in this area. At the moment, the game is already runnable on Mac, but not yet at a playable level — we’re seeing performance around 10–15 FPS on an M4 device. We’re actively analyzing and defining the work needed to reach production-quality performance on macOS. One of the key areas we’re exploring is leveraging MetalFX to improve frame rate. However, it seems there’s no official MetalFX plugin or direct integration available for Unreal Engine. Has anyone here successfully integrated MetalFX into a UE5 rendering pipeline, or found a recommended approach to do so? Any insights on best practices, workflows, or references (docs, samples, etc.) would be greatly appreciated. Thanks in advance!
Replies
3
Boosts
0
Views
746
Activity
Mar ’26