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

All subtopics

Post

Replies

Boosts

Views

Activity

cannot find Game Porting Toolkit in the developer site
I've ended up on here following the instructions from the installer for the community extender of AGPT, hoping to provide it the DMG for the official apple GPTK but when I followed the link in the installer, it wasn't there. I searched "GPTK and Game Porting Toolkit" to no avail. I'm running Sonoma on a 2023 M2 pro MBP with 32gb RAM, plenty powerful and up to date enough for me to have a genuine reason to use this tool. what gives? was it taken offline? if so, why?
1
0
1.7k
Jan ’24
How can we move the player within a RealityKit/RealityView scene?
How can we move the player within a RealityKit/RealityView scene? I am not looking for any animation or gradual movement, just instantaneous position changes. I am unsure of how to access the player (the person wearing the headset) and it's transform within the context of a RealityView. The goal is to allow the player to enter a full space in immersive mode and explore a space with various objects. They should be able to select an object and move closer to it.
2
1
979
Jan ’24
USDZ is not getting the job done for AR on ios. Are there plans to utilize WebXR in future versions of ios for phones and ipads?
USDZ is not getting the job done for AR on ios. Are there plans to utilize WebXR in future versions of ios for phones and ipads, so that developers might leverage all the capabilities that the GLB file format provides? By embracinng WebXR, Android is providing a much better environment to build AR experiences. As content creators, we would like to support all of our users with a common code stack and workflow. Thanks for any insights.
1
0
534
Jan ’24
Did RealityView syntax change?
All of a sudden (like when XCode 15.2 left beta yesterday?) I can't build attachments into my RealityView: var body: some View { RealityView { content, attachments in // stuff } attachments: { // stuff } Produces "No exact matches in call to initializer" on the declaration line (RealityView { content, attachments in). So far as I can tell, this is identical to the sample code provided at the WWDC session, but I've been fussing with various syntaxes for an hour now and I can't figure out what the heck it wants.
2
0
720
Jan ’24
I want to pass array data from Swift to Metal's fragment shader in Uniform
I am trying to pass array data in Uniform from Swift to Metal's fragment shader. I am able to pass normal Float numbers that are not arrays with no problem. The structure is as follows struct Uniforms { var test: [Float] } The values are as follows let floatArray: [Float] = [0.5] As usual, we are going to write and pass the following As mentioned above, normal Float values can be passed without any problem. commandEncoder.setFragmentBytes(&uniforms, length: MemoryLayout<Uniforms>.stride, index: 0) The shader side should be as follows 
// uniform struct Uniforms { float test[1]; }; Fragment Shader // in fragment shader float testColor = 1.0; // for statement for (int i = 0; i < 1; i++) { testColor *= uniforms.test[i]; } float a = 1.0 - testColor; return float4(1.0,0.0,0.0,a); I thought that 0.5 in the array was passed, but no value is passed.
I think I am writing something wrong, but how should I write it?
0
0
497
Jan ’24
Entity not reacting to light and not casting shadow in VIsionOS Simulator
Hi Guys, I've been trying to put my model to react to light in visionOS Simulator by editing the component in Reality Composer Pro and also modifying it by code, but I can only put the shadow if I put it as an usdz file, it's not as reflective as when I see it on reality converter or reality composer pro, does someone have this problem too? RealityView { content in if let bigDonut = try? await ModelEntity(named: "bigdonut", in: realityKitContentBundle) { print("LOADED") // Create anchor for horizontal placement on a table let anchor = AnchorEntity(.plane(.horizontal, classification: .table, minimumBounds: [0,0])) // Configure scale and position bigDonut.setScale([1,1,1], relativeTo: anchor) bigDonut.setPosition([0,0.2,0], relativeTo: anchor) // Add the anchor content.add(anchor) // Enable shadow casting but this does not work bigDonut.components.set(GroundingShadowComponent(castsShadow: true)) } }
1
0
590
Jan ’24
I got error related to Metal Framework when running the flutter application
The error is: "Error Domain=MTLLibraryErrorDomain Code=3 ":1:10: fatal error: cannot open file './metal_types': Operation not permitted #include "metal_types"" On my Mac mini (with intel chip), I run flutter application in VScode lldb debugger and got this error, flutter application cannot draw its UI and shows a blank white window. My Xcode version is latest version 15.2. Flutter application can run normally in Mac mini M1 in VSCode lldb debugger, and can run normally without debugger in Mac mini Intel chip. In Metal framework and Core Graphic framework location, there is no file named "metal_types". Before, it didn't happen. I could run normal in vscode lldb debugger on Mac mini intel chip and M1. Anyone knows anythings, please comments. Thank you!
0
0
582
Jan ’24
MacOS cannot send and receive Game Center multiplayer Invitation
I'm trying to implement multiplayer invitation from game center for macos, ios, tvos following this https://developer.apple.com/documentation/gamekit/finding_multiple_players_for_a_game?language=objc Implementation works for tvos and ios, I can invite my friends, Start Game and continue sending data. But macos still doesn't work at all. I tried using build that works on iOS to invite macos player, but my mac cannot even receive the invitation notification from game center (game is installed already on mac). While from mac, my invitation process is stuck here until it's failed Is there any specific setting on macos to enable game center invitation?
2
0
645
Jan ’24
any example based on SpriteKit for getting started ?
Background: This is a question asking for a good example of SpriteKit from a very new iOS developer who is investigating for starting an iOS 2D game project. As I explored in the official apple development doc, to dev a 2D game SpriteKit is the very framework I am looking for. There have been some clear and succinct words for any API and class documented in the reference spec when I started a project in Xcode. However I haven't been able to finish the project as having no any general idea about what is always needed of a typical game using the framework. Question: As an experienced Java Spring programmer I believe that I am needed a brief example to get started with the SpriteKit framework which provides me an idea of necessary steps for a 2D game.
2
0
1.1k
Jan ’24
Rotation of child entities in USDZ - how to set rotation origin? i.e. a joint
Hi, I have a series of child entities in a USDZ file that I would like to be able to rotate relative to a joint point between one another. I believe the functionality I am looking for was available in SceneKit with SCNPhysicsHingeJoint. How would I go about replicating this functionality in RealityKit? The current output of a rotation applied is relative to the model origin as a whole. (see below) Thanks! Freddie
1
0
395
Jan ’24
SpriteKit in Vision OS can't detect touch input
Hello everyone I am porting my existing 2d game writing by spritekit to visionOS and I am creating a SpriteView in WindowGroup let currentScene = BattleScene.newGameScene(gameMode: "endless", dataContext: dataController.container.viewContext) SpriteView(scene: currentScene) .ignoresSafeArea(.all) .frame(width: currentScene.frame.width, height: currentScene.frame.height, alignment: .center) .onReceive(NotificationCenter.default.publisher(for: GameoverNotification)) { _ in stopAllAudio() } .onTapGesture { location in let viewPosition = location let touchLocation = CGPoint(x: viewPosition.x, y: viewPosition.y) print("touch on vision window: ", touchLocation.x, touchLocation.y) } .glassBackgroundEffect() //WindowGameView() // .environment(\.managedObjectContext, dataController.container.viewContext) // .environment(model) // .environment(pressedKeys) } .windowStyle(.automatic) .defaultSize(width: 0.5, height: 1.0, depth: 0.0, in: .meters) run it and it turns out the scene can't receive tap event. but it works normal if I run it with my ios target (vision Os designd for ipad) is there anything I missed?
0
0
720
Jan ’24
Animate RealityKit Component Property
Is it possible to animate some property on a RealityKit component? For example, the OpacityComponent has an opacity property that allows the opacity of the entities it's attached to, to be modified. I would like to animate the property so the entity fades in and out. I've been looking at the animation API for RealityKit and it either assumes the animation is coming from a USDZ (which this is not), or it allows properties of entities themselves to be animated using a BindTarget. I'm not sure how either can be adapted to modify component properties? Am I missing something? Thanks
3
0
911
Jan ’24
Loading .usdz materials in Reality Composer Pro
Hello All - I'm receiving .usdz files from a client. When previewing the .usdz file in Reality Converter - the materials show up as expected. But when I load the .usdz in Reality Composer Pro, all the materials show up as grey. I've attached an image of the errors I'm get inside Reality Converter, to help trouble shoot. What steps can I take to get these materials working in my Reality Composer Pro project? Thanks!
2
0
749
Jan ’24
Animated USD file | Starting position of the USD is not the same as first frame of animation
Hello all, I am building for visionOS with another engineer and using Reality Composer Pro to validate usd files. The starting position of my animated usdz, its position when it's first loaded, is not the same as the first frame of the animation on the usdz file For testing, I am using the AR Quick Look asset 'toy_biplane_idle.usdz' which demonstrates the same 'error' we're currently getting with our own usdz files. When the usdz is loaded, it is on the ground plane - But when the aniamtion is played, the plane 'snaps' to the position of the first frame of the animation - This 'snapping' behavior is giving us problems. We want the user ot see this plane in its static 'load' position with the option to play the animation. But we dont want it to snap when the user presses play Is it possible to load the .usdz in the position specified by the first frame of the animation? What is the best way to fix this issue. Thanks!
1
0
624
Jan ’24
Mesa with LLVM on MacOS
Hi, I have a MacBook Pro with an Intel Iris Plus Graphics 640, which gives maximum 4.1 OpenGL context. Thus, I would like to use Mesa as an alternative for getting higher contexes e.g. 4.5 or 4.6. I don’t care about performance in this phase. I have built Mesa with LLVM (llvm-config… etc…) but even by placing the built libGL.dylib in the same folder with executable or setting DYLD_LIBRARY_PATH or DYLD_INSERT_LIBRARIES, I am not able to get the Mesa renderer. Does Apple support this overriding of libGL with a custom one? Any help/guidance would be really appreciated. Thanks
1
0
669
Jan ’24