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

Inexplicable Metal crash ever since iOS 26.5 beta 4
Hi all, I'm working on updating my audio visualizer app. I'm adding new visualizers based on Metal 4 compute shaders. They worked in iOS 26.4 and iOS 26.5 up until beta 3. However, after that, the visualizers started crashing the phone and forcing a restart. On the latest version of iOS 26.5, the crash is still there. I submitted feedback, but haven't heard anything back just yet. I was wondering if others have faced this same issue, and if there are any workarounds. Here is my repo if you want to look at the code (forgive me if it's sloppy, I'm quite new to graphics programming and Metal): https://github.com/aabagdi/VisualMan/tree/main Thank you!
4
0
643
3d
Please, implement the new GameSave framework on tvOS
Hi, I have a game which is available on iOS and tvOS and the gameplay is basically the same on both platforms. I'd like to enable my players to seamlessly continue their play sessions on all available platforms. Unfortunately, the new GameSave framework is not available on tvOS and neither is the old GKSavedGame API. I'm asking you to enable the new GameSave framework in a future version of tvOS. Thank you. I've also reported via Feedback Assistant with Feedback Number: FB22791051
1
0
538
5d
New GameSave API unexpected behavior
Hi, I'm implementing the new iOS 26 GameSave API in my game and I'm seeing an unexpected behavior when I try to handle custom conflict resolution. Here's what happens: directoryState.conflictedVersions is nil when directoryState.state is GSSyncStateConflicted. According to the API docs, this should never happen because there is no way to resolve the conflict. Here's the setup: I have 2 devices. Device 1 - iPad 10G iOS 26.5, and Device 2 - iPhone SE 3G iOS 26.5 and I run the same code on both devices. I disable the WiFi on device 2 to create a conflict I open the directory using [GSSyncedDirectory openDirectoryForContainerIdentifier: nil] Run [dir finishSyncingWithCompletionHandler:] After the callback returns I check dir.directoryState.state If the state is GSSyncStateReady, GSSyncStateOffline, or GSSyncStateLocal I write some data in a file and close the dir. I re-enable the WiFi on Device 2 and run the same code Now, on Device 2 dir.directoryState.state is GSSyncStateConflicted, as expected, but dir.directoryState.conflictedVersions is NIL and there is no way to continue and resolve the conflict. I'm expecting dir.directoryState.conflictedVersions to contain an array of GSSyncedDirectoryVersion objects as described in the API docs. One interesting bit is that if I replace [dir finishSyncingWithCompletionHandler:] with [dir finishSyncing: window completionHandler:] the UI conflict resolution works as expected. I'm using Objective C to call the API, if that matters. I've also reported via Feedback Assistant with Feedback Number: FB22790831
0
0
373
5d
SpriteKit's Continued Support
Hi, Can Apple provide some reassurance on the continued support for SpriteKit in the coming years? At WWDC 2025, Apple deprecated SceneKit, which was alarming for a SpriteKit fan and user. I'm aware Apple doesn't comment on future plans. However, committing to a specific framework for larger projects is a significant investment in time (and money). Developers need to know whether to continue investing in proprietary technology that could be deprecated at any time. Some reassurance regarding SpriteKit's future would go a long way. I have moved my project from SpriteKit to RealityKit. RealityKit is certainly interesting, but I'd gladly switch back to SpriteKit. SpriteKit has things going for it that no other Apple framework provides: Live drawing of shapes, paths, text, video, and images at 120 FPS across all Apple devices. RealityKit offers no procedural drawing API equivalent to shape nodes. Particles and physics fields are very easy and fun to play with. The rigid body engine has a good feel. By comparison, RealityKit sleeps too aggressively, and doesn't have spring joints. SpriteKit is lightweight and runs well on older devices. In an ideal world, I'd also love to see SpriteKit improved: A deterministic physics engine Metal shader support Soft shadows for lights One can dream. Thank you!
1
3
453
6d
Turn-based Matches and App Versioning
In my turn-based app, existing matches created with a newer version (5.1.2) are not showing up in the MatchMaker ViewController (or even when I call GKTurnBasedMatch loadMatchesWithCompletionHandler) on a device running version 5.1. (Newer version is run from Xcode download to device). Note that in AppStoreConnect, I have the earliest compatible version set at 4.5. This was not a problem before using the (now mandatory) SDK 26 (Xcode 26.4 to be exact).
0
0
56
6d
Minimal working example for TCTouchController + SpriteKit SKRenderer + Metal?
Hi, I’m trying to use the new TouchController framework together with a custom Metal rendering pipeline using SpriteKit’s SKRenderer. Right now there seems to be almost no real documentation or end-to-end example showing how the framework is intended to work. Or is it just my own inexperience that I cant get it to work? My setup is: MTKView custom Renderer SKRenderer SKScene rendering SpriteKit manually through: skRenderer.render(withViewport:commandBuffer:renderPassDescriptor:) I managed to get: Metal rendering working SpriteKit rendering through SKRenderer TCTouchController connecting successfully But I still struggle to get the actual controls to render reliably on screen. Is there any minimal working example showing: MTKView SKRenderer TCTouchController rendering controls with render(using:) all together in one pipeline? Even a very small sample project would help a lot. Thanks!
2
0
151
1w
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.
1
0
442
1w
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
577
2w
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
913
2w
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
242
2w
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
958
3w
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
763
4w
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
515
4w
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
Apr ’26
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
410
Apr ’26
iPhone Failed to pair Xbox One gamepad after updating to iOS 26.5
One of my users updated his iPhone 16 Pro to iOS 26.5, and Apple TV to tvOS 26.5, both of them unable to pair a Microsoft Xbox One (Model 1708) gamepad, before updating (updated from iOS 18.x) it works normally. He also got an old iPhone on iOS 16.7 which was working fine with that gamepad. Any one met the same issue? feedback no. FB22809309
Replies
1
Boosts
0
Views
373
Activity
2d
Inexplicable Metal crash ever since iOS 26.5 beta 4
Hi all, I'm working on updating my audio visualizer app. I'm adding new visualizers based on Metal 4 compute shaders. They worked in iOS 26.4 and iOS 26.5 up until beta 3. However, after that, the visualizers started crashing the phone and forcing a restart. On the latest version of iOS 26.5, the crash is still there. I submitted feedback, but haven't heard anything back just yet. I was wondering if others have faced this same issue, and if there are any workarounds. Here is my repo if you want to look at the code (forgive me if it's sloppy, I'm quite new to graphics programming and Metal): https://github.com/aabagdi/VisualMan/tree/main Thank you!
Replies
4
Boosts
0
Views
643
Activity
3d
Please, implement the new GameSave framework on tvOS
Hi, I have a game which is available on iOS and tvOS and the gameplay is basically the same on both platforms. I'd like to enable my players to seamlessly continue their play sessions on all available platforms. Unfortunately, the new GameSave framework is not available on tvOS and neither is the old GKSavedGame API. I'm asking you to enable the new GameSave framework in a future version of tvOS. Thank you. I've also reported via Feedback Assistant with Feedback Number: FB22791051
Replies
1
Boosts
0
Views
538
Activity
5d
New GameSave API unexpected behavior
Hi, I'm implementing the new iOS 26 GameSave API in my game and I'm seeing an unexpected behavior when I try to handle custom conflict resolution. Here's what happens: directoryState.conflictedVersions is nil when directoryState.state is GSSyncStateConflicted. According to the API docs, this should never happen because there is no way to resolve the conflict. Here's the setup: I have 2 devices. Device 1 - iPad 10G iOS 26.5, and Device 2 - iPhone SE 3G iOS 26.5 and I run the same code on both devices. I disable the WiFi on device 2 to create a conflict I open the directory using [GSSyncedDirectory openDirectoryForContainerIdentifier: nil] Run [dir finishSyncingWithCompletionHandler:] After the callback returns I check dir.directoryState.state If the state is GSSyncStateReady, GSSyncStateOffline, or GSSyncStateLocal I write some data in a file and close the dir. I re-enable the WiFi on Device 2 and run the same code Now, on Device 2 dir.directoryState.state is GSSyncStateConflicted, as expected, but dir.directoryState.conflictedVersions is NIL and there is no way to continue and resolve the conflict. I'm expecting dir.directoryState.conflictedVersions to contain an array of GSSyncedDirectoryVersion objects as described in the API docs. One interesting bit is that if I replace [dir finishSyncingWithCompletionHandler:] with [dir finishSyncing: window completionHandler:] the UI conflict resolution works as expected. I'm using Objective C to call the API, if that matters. I've also reported via Feedback Assistant with Feedback Number: FB22790831
Replies
0
Boosts
0
Views
373
Activity
5d
SpriteKit's Continued Support
Hi, Can Apple provide some reassurance on the continued support for SpriteKit in the coming years? At WWDC 2025, Apple deprecated SceneKit, which was alarming for a SpriteKit fan and user. I'm aware Apple doesn't comment on future plans. However, committing to a specific framework for larger projects is a significant investment in time (and money). Developers need to know whether to continue investing in proprietary technology that could be deprecated at any time. Some reassurance regarding SpriteKit's future would go a long way. I have moved my project from SpriteKit to RealityKit. RealityKit is certainly interesting, but I'd gladly switch back to SpriteKit. SpriteKit has things going for it that no other Apple framework provides: Live drawing of shapes, paths, text, video, and images at 120 FPS across all Apple devices. RealityKit offers no procedural drawing API equivalent to shape nodes. Particles and physics fields are very easy and fun to play with. The rigid body engine has a good feel. By comparison, RealityKit sleeps too aggressively, and doesn't have spring joints. SpriteKit is lightweight and runs well on older devices. In an ideal world, I'd also love to see SpriteKit improved: A deterministic physics engine Metal shader support Soft shadows for lights One can dream. Thank you!
Replies
1
Boosts
3
Views
453
Activity
6d
Game Center Notifications Stopped Working
I recompiled my turn-based app to the (now mandatory) SDK 26 (Xcode 26.4 to be exact), and Game Center is no longer sending notifications of turn changes or game invites to either my iPad Air running 15.8.8 or my iPhone SE3 running 26.4.2.
Replies
1
Boosts
0
Views
158
Activity
6d
Turn-based Matches and App Versioning
In my turn-based app, existing matches created with a newer version (5.1.2) are not showing up in the MatchMaker ViewController (or even when I call GKTurnBasedMatch loadMatchesWithCompletionHandler) on a device running version 5.1. (Newer version is run from Xcode download to device). Note that in AppStoreConnect, I have the earliest compatible version set at 4.5. This was not a problem before using the (now mandatory) SDK 26 (Xcode 26.4 to be exact).
Replies
0
Boosts
0
Views
56
Activity
6d
Minimal working example for TCTouchController + SpriteKit SKRenderer + Metal?
Hi, I’m trying to use the new TouchController framework together with a custom Metal rendering pipeline using SpriteKit’s SKRenderer. Right now there seems to be almost no real documentation or end-to-end example showing how the framework is intended to work. Or is it just my own inexperience that I cant get it to work? My setup is: MTKView custom Renderer SKRenderer SKScene rendering SpriteKit manually through: skRenderer.render(withViewport:commandBuffer:renderPassDescriptor:) I managed to get: Metal rendering working SpriteKit rendering through SKRenderer TCTouchController connecting successfully But I still struggle to get the actual controls to render reliably on screen. Is there any minimal working example showing: MTKView SKRenderer TCTouchController rendering controls with render(using:) all together in one pipeline? Even a very small sample project would help a lot. Thanks!
Replies
2
Boosts
0
Views
151
Activity
1w
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
1
Boosts
0
Views
442
Activity
1w
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
577
Activity
2w
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
913
Activity
2w
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
242
Activity
2w
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
958
Activity
3w
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
823
Activity
3w
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
763
Activity
4w
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
515
Activity
4w
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
Apr ’26
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
410
Activity
Apr ’26
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
553
Activity
Apr ’26
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
236
Activity
Apr ’26