Graphics and Games

RSS for tag

Build captivating gaming experiences for Apple platforms.

Posts under Graphics and Games tag

41 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Metal (Compositor Services) or RealityKit on visionOS
I am develop visionOS app. I am now very interested in Metal and Compositor Services, but I have not explored them in depth. I know that Metal has a higher degree of control freedom. I am wondering if using Compositor Services will have fewer functions than RealityKit in AR technology (such as scene reconstruction and understanding, hover effect, etc.).
3
0
68
1d
RC Pro Timeline Notification Not Received in Xcode
I'm having a heck of a time getting this to work. I'm trying to add an event notification at the end of a timeline animation to trigger something in code but I'm not receiving the notification from RC Pro. I've watched that Compose Interactive 3D Content video quite a few times now and have tried many different ways. RC Pro has the correct ID names on the notifications. I'm not a programmer at all. Just a lowly 3D artist. Here is my code... import SwiftUI import RealityKit import RealityKitContent extension Notification.Name { static let button1Pressed = Notification.Name("button1pressed") static let button2Pressed = Notification.Name("button2pressed") static let button3Pressed = Notification.Name("button3pressed") } struct MainButtons: View { @State private var transitionToNextSceneForButton1 = false @State private var transitionToNextSceneForButton2 = false @State private var transitionToNextSceneForButton3 = false @Environment(AppModel.self) var appModel @Environment(\.dismissWindow) var dismissWindow // Notification publishers for each button private let button1PressedReceived = NotificationCenter.default.publisher(for: .button1Pressed) private let button2PressedReceived = NotificationCenter.default.publisher(for: .button2Pressed) private let button3PressedReceived = NotificationCenter.default.publisher(for: .button3Pressed) var body: some View { ZStack { RealityView { content in // Load your RC Pro scene that contains the 3D buttons. if let immersiveContentEntity = try? await Entity(named: "MainButtons", in: realityKitContentBundle) { content.add(immersiveContentEntity) } } // Optionally attach a gesture if you want to debug a generic tap: .gesture( TapGesture().targetedToAnyEntity().onEnded { value in print("3D Object tapped") _ = value.entity.applyTapForBehaviors() // Do not post a test notification here—rely on RC Pro timeline events. } ) } .onAppear { dismissWindow(id: "main") // Remove any test notification posting code. } // Listen for distinct button notifications. .onReceive(button1PressedReceived) { (output) in print("Button 1 pressed notification received") transitionToNextSceneForButton1 = true } .onReceive(button2PressedReceived.receive(on: DispatchQueue.main)) { _ in print("Button 2 pressed notification received") transitionToNextSceneForButton2 = true } .onReceive(button3PressedReceived.receive(on: DispatchQueue.main)) { _ in print("Button 3 pressed notification received") transitionToNextSceneForButton3 = true } // Present next scenes for each button as needed. For example, for button 1: .fullScreenCover(isPresented: $transitionToNextSceneForButton1) { FacilityTour() .environment(appModel) } // You can add additional fullScreenCover modifiers for button 2 and 3 transitions. } }
3
0
34
1w
Game is rejected due to Safety - Objectionable Content
Hello everyone, i created a game that is related to doctor operation simulator. In this game, user perform different operations on different organs like face, elbow, foot etc. Game is live on play store and here is the link: https://play.google.com/store/apps/details?id=com.nexthope.doctor.hospital.surgery.games&hl=en_US&gl=US But it was rejected by app store review team. Similar games are already there on app store. Please help me on this issue.
1
0
127
2w
UE 5.4 Game Instantly Crash on iOS devices on Testflight
Hi, I'm working on a game for the past few years using first Unreal Engine 4, and now Unreal Engine 5.4.4. I'm experiencingan unusual crash on startup on some devices . The crash is so fast that I'm barely able to see the launching screen sometimes because the app closes itself before that. I got a EXC_CRASH (SIGABRT) so I know that it's a null pointer reference, but I can't quite wrap my head about the cause, I think that's something messed up in the packaging of the app, but here is where I'm blocked, I'm not that accustomed with apple devices. If someone has some advise to give, please, any help will be very valuable. Many thanks. Log : Crash Log on Ipad
0
0
332
Feb ’25
The Unity application crashes due to KERN_PROTECTION_FAILURE and GC_clear_stack_inneb why?
Crash dump: `Crashed Thread: 0 tid_103 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGILL) Exception Codes: KERN_PROTECTION_FAILURE at 0x000000016d3bfea0 Exception Codes: 0x0000000000000002, 0x000000016d3bfea0 Termination Reason: Namespace SIGNAL, Code 4 Illegal instruction: 4 Terminating Process: Unity [7873] VM Region Info: 0x16d3bfea0 is in 0x169bbc000-0x16d3c0000; bytes after start: 58736288 bytes before end: 351 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL mapped file 169b00000-169ba8000 [ 672K] rw-/rwx SM=PRV Object_id=4d22156e GAP OF 0x14000 BYTES ---> STACK GUARD 169bbc000-16d3c0000 [ 56.0M] ---/rwx SM=NUL stack guard for thread 0 Stack 16d3c0000-16dbbc000 [ 8176K] rw-/rwx SM=SHM thread 0 Thread 0 Crashed:: tid_103 Dispatch queue: com.apple.main-thread 0 libsystem_platform.dylib 0x1932ee7ac _platform_memset + 108 1 libmonobdwgc-2.0.dylib 0x33977abdc GC_clear_stack_inner + 60 2 libmonobdwgc-2.0.dylib 0x33977abf8 GC_clear_stack_inner + 88 3 libmonobdwgc-2.0.dylib 0x33977abf8 GC_clear_stack_inner + 88 4 libmonobdwgc-2.0.dylib 0x33977abf8 GC_clear_stack_inner + 88 5 libmonobdwgc-2.0.dylib 0x33977abf8 GC_clear_stack_inner + 88 6 libmonobdwgc-2.0.dylib 0x33977abf8 GC_clear_stack_inner + 88 7 libmonobdwgc-2.0.dylib 0x33977abf8 GC_clear_stack_inner + 88 8 libmonobdwgc-2.0.dylib 0x33977abf8 GC_clear_stack_inner + 88 9 libmonobdwgc-2.0.dylib 0x33977abf8 GC_clear_stack_inner + 88 10 libmonobdwgc-2.0.dylib 0x33977abf8 GC_clear_stack_inner + 88 11 libmonobdwgc-2.0.dylib 0x33977abf8 GC_clear_stack_inner + 88 12 libmonobdwgc-2.0.dylib 0x33976b518 GC_clear_stack + 76 13 libmonobdwgc-2.0.dylib 0x33973c074 mono_gc_alloc_obj + 112 14 libmonobdwgc-2.0.dylib 0x3396e0db4 mono_object_new_specific_checked + 72 15 libmonobdwgc-2.0.dylib 0x3396e116c ves_icall_object_new_specific + 28`
2
0
310
Feb ’25
Equipment collision issue in TabletopKit
Hey! I'm facing an issue with Equipment collision when adding and moving TabletopKit equipment with different pose rotations. Let me share a very simple TabletopKit setup as an example: Table struct Table: Tabletop { var shape: TabletopShape = .rectangular(width: 1, height: 1, thickness: 0.01) var id: EquipmentIdentifier = .tableID } Board struct Board: Equipment { let id: EquipmentIdentifier = .boardID var initialState: BaseEquipmentState { .init( parentID: .tableID, seatControl: .restricted([]), pose: .init(position: .init(), rotation: .zero), boundingBox: .init(center: .zero, size: .init(1.0, 0, 1.0)) ) } } Equipment struct Object: EntityEquipment { var id: ID var size: SIMD2<Float> var position: SIMD2<Double> var rotation: Float var entity: Entity var initialState: BaseEquipmentState init(id: Int, size: SIMD2<Float>, position: SIMD2<Double>, rotation: Float) { self.id = EquipmentIdentifier(id) self.size = size self.position = position self.rotation = rotation self.entity = objectEntity self.initialState = .init( parentID: .boardID, seatControl: .any, pose: .init( position: .init(x: position.x, z: position.y), rotation: .degrees(Double(rotation)) ), entity: entity ) } } Setup class GameSetup { var setup: TableSetup init(root: Entity) { setup = TableSetup(tabletop: Table()) setup.add(equipment: Board()) setup.add(seat: PlayerSeat()) let object1 = Object( id: 2, size: .init(x: 0.1, y: 0.1), position: .init(x: 0.1, y: -0.1), rotation: 0 ) let object2 = Object( id: 3, size: .init(x: 0.2, y: 0.1), position: .init(x: -0.1, y: -0.1), rotation: 90 ) setup.add(equipment: object1) setup.add(equipment: object2) } } ‎ The issue When I add two equipment entities with different rotation poses, the collisions between them behave oddly. If one is 90º and the other 0º, for example, the former will intersect with the latter as if its bounding box was not rotated as you can see below: But if both equipment have the example rotation (e.g. 0 or 90º), though, then there's no collision issue at all, which seems to indicate their bounding box were correctly rotated: ‎‎ I'd really appreciate some help understanding if this is a bug or if I'm just missing something. Thanks in advance!
3
0
732
Feb ’25
Unexpected Behavior: PointerEvents do not permit simultaneous pencil and multitouch at the same time. Discussing Workarounds
For many years, I've noticed that although in native code I can handle continuous and simultaneous Apple pencil and touch inputs using UIKit, Safari and WKWebView's PointerEvents only seem to allow you to use one input type at a time. i.e. Apple Pencil down blocks touch input until lifted and touch input blocks Apple Pencil input. It's as though requiresexclusivetouchtype has been set in the underlying webkit implementation. There's decades of research (e.g. https://dl.acm.org/doi/10.1145/1866029.1866036 ) and several existing native applications in production showing that multimodal inputs open-up many unique and useful applications and interactions. Even a simple "hold object with finger" + "draw with stylus" controls are the norm. I recently built a native application using multimodal simultaneous inputs, but this is impossible to port to web due to the unexpected behavior of PointerEvents (and touch events, and mouse events; any variant exhibits the same behavior). I've researched and attempted to apply every possible flag, change, and css code to get this working, but I think the behind-the-scenes implementation is what's blocking the simultaneous touch types. This is unexpected and undesired behavior because it's inconsistent with the native behavior. If it's unintended, it's a big priority to fix for creating better user experiences on the iPad. If it's intended, I do not believe that's reasonable (even if it might be more complex and used for more advanced applications). Please expose a way to support simultaneous touch types in iPadOS/iOS in both Safari and WKWebView. At minimum, may we have a discussion on how to support the desired behavior? The simplest solution I can think of is to provide a webkit-platform-specific boolean in Safari and WKWebView called requiresExclusiveTouchType, which is set to False by default to keep the current behavior, and settable to True to get the more flexible behavior I'm expecting.
2
0
531
Jan ’25
WKWebView 120hz Support
I'm developing an application that needs smooth framerates within a wkwebview that interacts with native code. However, requestAnimationFrame by default is still throttled to 60hz even if all my target devices (the iPad Pro for example) have supported 120hz for a long time already. I noticed that the latest Safari in 18.3 beta supports unlocked framerates, but that's only under Safari feature flags. To my knowledge, these flags do not apply to WKWebView. Is there a way to enable unlocked framerate in WKWebView via requestAnimationFrame? (Calling JS at a faster rate from the native code side will not work, almost definitely, since WKWebView will still render at its own rate.) This is an experimental application for internal use and I'm okay if there are temporary beta solutions available.
1
0
494
Jan ’25
Why doesn't mac opengl support alpha textures?
I have used the Mac M1 and M4. Developing OpenGL projects on machines running macOS 15.2 and 13.6. Call the OpenGL library functions of Mac. glTexImage2D If you use GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_ALPHA these three textures, you will get an error gl 500. It makes me unable to draw normally on Mac. What's the reason for this? Don't they support it?
2
0
566
Jan ’25
Game Center Achievement "Global Players" Always Showing 0% Issue
Hello, I’m the developer of the “ StepSquad” app. Our app uses the Game Center achievement feature, but we’ve been encountering a problem: the “Global Players” metric always shows 0%, even though there are friends who have already achieved these achievements. Initially, I thought it might be because the app was newly launched. However, it’s now been over two months since release, and it’s still showing 0%. If anyone has any insight into this issue, please leave a comment.
0
0
479
Jan ’25
Operation not permitted loading image in SDL2 with Xcode
Hello, I am making a project in SDL, and with that I am using SDL_Image. I am doing all of this on Xcode. I've been able to initialize everything just fine, but issues spring up when I try to load an image. When I give the code a path to look for an image: Unable to load image! IMG_Error: Couldn't open [Insert image path here]: Operation not permitted I get that error. Keep in mind "Unable to load image" is a general error I put in the code should loading said image fail, the specific error which I called with IMG_GetError() is what we really need to know. I've seen before that this might occur if a program does not have full disk access. Because of this, I've tried giving Xcode full disk access, but this didn't work and I still got the same error.
1
0
598
Jan ’25
App review says - Objectionable content to the core gameplay loop for a party game.
Hey All, I would appreciate suggestions on how to resolve this problem as this is my first time publishing app on iOS store. So, I made a party game which simulates a user urinating into ****** and you have shoot some targets in ****** by controlling motion sensor. During testing on test flight no problem was shown but during official rollout, App store review says it's to remove the content which is basically the whole gameplay. I submitted a reply clarifying everything but it seems they have an automated response which was same as previous one. On the other hand, there's a similar game on app store with somewhat same idea. Can someone please guide me how to approach this problem. My game is published on Android without any problem but here.
1
0
354
Jan ’25
Camera zoom in to 3D point in SceneKit scene
I would like to implement zoom functionality in my SceneKit game: when the user performs the pinch gesture on a point on the screen, the scene zooms in to make that point larger. Until now I simply changed SCNCamera.focalLength, but this simply zooms in to the center of what is currently visible on screen. Is it somehow possible to implement the zoom functionality described above by perhaps interactively rotating the camera at the same time towards the pinched point? Is there a formula for this? I would like to avoid suddenly rotating the camera to face the pinched point when the pinch gesture begins and then zoom in while the pinch is in progress.
0
0
513
Dec ’24
MDLAsset loads texture in usdz file loaded with wrong colorspace
I have a very basic usdz file from this repo I call loadTextures() after loading the usdz via MDLAsset. Inspecting the MDLTexture object I can tell it is assigning a colorspace of linear rgb instead of srgb although the image file in the usdz is srgb. This causes the textures to ultimately render as over saturated. In the code I later convert the MDLTexture to MTLTexture via MTKTextureLoader but if I set the srgb option it seems to ignore it. This significantly impacts the usefulness of Model I/O if it can't load a simple usdz texture correctly. Am I missing something? Thanks!
3
2
736
Dec ’24