Build captivating gaming experiences for Apple platforms.

All subtopics

Post

Replies

Boosts

Views

Activity

Implementing a bouncing surface
I am trying to simulate a pinball game and I want to use PhysicsBody & PhysicsMotion to achieve that. I tuned the parameters around in PhysicsBodyComponent, but the result is not quite ideal for now. Imagine a fully inflated basketball bouncing high off the ground (ground vs basketball). I assign PhysicsBodyComponent and CollisionComponent to both basketball and the ground. For basket ball, I set it as: dynamic mode mass 1, inertia .one Material.Restitution 1 Angular Damping and Linear Damping to 0 AddForce to make the basketball move to hit the ground For ground, I set it as: static mode mass 1, inertia .zero Material.Restitution 1 Angular Damping and Linear Damping to 0 However, when the basket ball hit the ground, it isn't that bouncy, the basketball behaves like hitting to a cotton and the linear speed just dumps fast. Wonder how I could achieve the bouncing effect like real basketball vs ground.
4
0
923
Jul ’24
Particle Systems flicker when partly behind transparent objects
I am having a difficult time to create particle systems in Reality Composer Pro (visionOS beta 3). They tend to start to flicker and all particles disappear and reappear in semi-random intervals. I can clearly see that happening with one effect that I put inside a small box consisting of 4 transparent walls that has a solid floor. When I change the view angle the particle system starts to flicker when viewed from below its emission height. I tried all combinations of particle rendering: billboard->free, additive etc and it does not change anything. I am using the default particle image. Any help appreciated
2
0
521
Jul ’24
Game Center Notifications do not include GKMessageImage.png
Hello, Asking the following as, I was unable to find answers via search on the forum and in the documentation: Invitations sent via iMessage seem to work correctly with my custom image ( GKMessageImage.png ) however, notifications sent to Game Center Friends via invites generated in Game Center do not include the custom image ( GKMessageImage.png ). Questions: Is this expected behavior? Is there a different way to customize the image in the notification? Note the Game Center notification includes the App name correctly. I also noted in the WWDC session in 2016 ( saw video recently ) that there was some mention of no longer adding friends via Game Center. Is that currently true? Thanks in advance.
1
0
519
Jul ’24
GameKit/GameCenter the invitation process gets stuck on “Retrieving”
Hello, I try to invite a friend to play my app , however when the friend try to press invite link component via iMessage, it shows “Retrieving” and then disappear, nothing happens, it doesn't redirect to my app, what I'm missing? or doing wrong I can leave some part of my code import Foundation import GameKit extension RealTimeGame: GKLocalPlayerListener { /// Handles when the local player sends requests to start a match with other players. func player(_ player: GKPlayer, didRequestMatchWithRecipients recipientPlayers: [GKPlayer]) { print("\n\nSending invites to other players.") } /// Presents the matchmaker interface when the local player accepts an invitation from another player. func player(_ player: GKPlayer, didAccept invite: GKInvite) { // Present the matchmaker view controller in the invitation state. if let viewController = GKMatchmakerViewController(invite: invite) { viewController.matchmakerDelegate = self rootViewController?.present(viewController, animated: true) { } } } } also I don't have "<key>CFBundleURLTypes</key>" in my info.plist, I don't know I need that or not...
1
0
415
Aug ’24
Is anyone still using GKVoiceChat since it has been deprecated?
Hello, I would like to know if anyone has or still using the GKVoiceChat capabilities in their apps. I wanted to use it for my online game but I am coming across issues using it and wondering if their are alternatives?. The documentation mentions to use Share-play but that wont be possible with random online players. Any help will be appreciated!.
2
0
502
Aug ’24
View Matrix in Metal "Game" Sample code
I tried to understand the view matrix. The part from original code as below: private func updateGameState() { /// Update any game state before rendering uniforms[0].projectionMatrix = projectionMatrix let rotationAxis = SIMD3<Float>(1, 1, 0) let modelMatrix = matrix4x4_rotation(radians: rotation, axis: rotationAxis) let viewMatrix = matrix4x4_translation(0.0, 0.0, -8.0) uniforms[0].modelViewMatrix = simd_mul(viewMatrix, modelMatrix) rotation += 0.01 } If the view matrix is initialed in x = -0.5, as:let viewMatrix = matrix4x4_translation(-0.5, 0.0, -8.0) The cube in the MetalView will move left. I think it should move to right hand side because View Matrix is camera position, am I wrong?
0
0
332
Aug ’24
Determining SpriteKit Interaction using SKRenderer
Hey, Wondering how other developers have been able to determine the location of a mouse event or tap (ie NSEvent) when using MetalView (MKTView) with SKRenderer with a SpriteKit scene (.sks scene) for a 2D game. In the original scenario with SpriteKit, we could use SKViews convertPoint(fromView:) to determine where in the scene the user tapped. But with the SKRenderer we can no longer use convertPoint(fromView:) as its reliant on SKView being used and thus its making it difficult to determine. What I do have is: locationInWindow: NSPoint for showing me where in the MKTView which was touched Any ideas, would be great Many thanks
0
0
284
Sep ’24
converting .usdz to .obj results in flattened model
I'm using the Apple RoomPlan sdk to generate a .usdz file, which works fine, and gives me a 3D scan of my room. But when I try to use Model I/O's MDLAsset to convert that output into an .obj file, it comes out as a completely flat model shaped like a rectangle. Here is my Swift code: let destinationURL = destinationFolderURL.appending(path: "Room.usdz") do { try FileManager.default.createDirectory(at: destinationFolderURL, withIntermediateDirectories: true) try finalResults?.export(to: destinationURL, exportOptions: .model) let newUsdz = destinationURL; let asset = MDLAsset(url: newUsdz); let obj = destinationFolderURL.appending(path: "Room.obj") try asset.export(to: obj) } Not sure what's wrong here. According to MDLAsset documentation, .obj is a supported format and exporting from .usdz to the other formats like .stl and .ply works fine and retains the original 3D shape. Some things I've tried: changing "exportOptions" to parametric, mesh, or model. simply changing the file extension of "destinationURL" (throws error)
0
0
419
Sep ’24
Options to have MSAA in Tile-Based Deferred Renderer
Hi folks, I'm working on a Tile based Deferred renderer, similar to this Apple example. I'm wondering how to add MSAA to the renderer, and I see two choices: Copy the single-sampled texture at the end of the GBuffer/Lighting render pass to a multi-sampled texture and resolve from that Make all render targets (GBuffer) multi-sampled and deal with sampling/resolving all intermediate textures as well as the final, combined texture. Which is the proper approach, and are there any examples of how to implement it? Thanks!
0
0
267
Sep ’24