TabletopKit

RSS for tag

Build spatial, multiplayer experiences around a table with TabletopKit. Discuss questions here.

Posts under TabletopKit tag

9 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Synchronizing Physics in TableTopKit
I am working on adding synchronized physical properties to EntityEquipment in TableTopKit, allowing seamless coordination during GroupActivities sessions between players. Treating EntityEquipment's state to DieState is not a way, because it doesn't support custom collision shapes. I have also tried adding PhysicsBodyComponent and CollisionComponent to EntityEquipment's Entity. However, the main issue is that the position of EntityEquipment itself does not synchronize with the Entity's physics body, resulting in two separate instances of one object. struct PlayerPawn: EntityEquipment { let id: ID let entity: Entity var initialState: BaseEquipmentState init(id: ID, entity: Entity) { self.id = id let massProperties = PhysicsMassProperties(mass: 1.0) let material = PhysicsMaterialResource.generate(friction: 0.5, restitution: 0.5) let shape = ShapeResource.generateBox(size: [0.4, 0.2, 0.2]) let physicsBody = PhysicsBodyComponent(massProperties: massProperties, material: material, mode: .dynamic) let collisionComponent = CollisionComponent(shapes: [shape]) entity.components.set(physicsBody) entity.components.set(collisionComponent) self.entity = entity initialState = .init(parentID: .tableID, pose: .init(position: .init(), rotation: .zero), entity: self.entity) } } I’d appreciate any guidance on the recommended approach to adding synchronized physical properties to EntityEquipment.
0
4
123
5d
Synchronizing Physical Properties of EntityEquipment in TableTopKi
I am working on adding synchronized physical properties to EntityEquipment in TableTopKit, allowing seamless coordination during GroupActivities sessions between players. Current Approach and Limitations I have tried setting EntityEquipment's state to DieState and treating it as a TossableRepresentation object. This approach achieves basic physical properties synchronized across players. However, it has several limitations: No Collision Detection Between Dice: Multiple dice do not collide with each other. Shape Limitations: Custom shapes, like parallelepipeds, cannot be configured. Below is my existing code for Base Entity Equipment without physical properties: struct CubeWithPhysics: EntityEquipment { let id: ID let entity: Entity var initialState: BaseEquipmentState init(id: ID, entity: Entity) { self.id = id self.entity = entity initialState = .init(parentID: .tableID, pose: .init(position: .zero, rotation: .zero), entity: self.entity) } } I’d appreciate any guidance on the recommended approach to adding synchronized physical properties to EntityEquipment.
4
4
325
2w
Creating tabletop games - Build Failure
The sample code project Tabletopkit Sample found at the article Creating tabletop games here fails to compile with the following errors in Xcode 16 beta 6. error: [xrsimulator] Component Compatibility: Billboard not available for 'xros 1.0', please update 'platforms' array in Package.swift error: [xrsimulator] Exception thrown during compile: compileFailedBecause(reason: "compatibility faults") error: Tool exited with code 1
3
0
479
Aug ’24
TabletopKit sample code won't build on Xcode 16 beta 4
The TabletopKit sample app builds fine with Xcode 16 beta 1. https://developer.apple.com/documentation/tabletopkit/tabletopkitsample I updated to the new beta 4 and downloaded an updated version of the Tabletopkit sample code but am now getting this error. Tabeletopkit Sample 1 issue SwiftUI.ToolbarContent:3:51 Main actor-isolated static method '_makeContent(content:inputs:resolved:)' cannot be used to satisfy nonisolated protocol requirement Add '@preconcurrency' to the 'ToolbarContent' conformance to defer isolation checking to run time '_makeContent(content:inputs:resolved:)' declared here If I go back to beta 1 it still builds OK. I tried its suggestion but it still won't build. Is there a workaround? I didn't see it listed.
2
6
631
Jul ’24
Rendering EntityEquipment in TabletopKit
Hi, I've been implementing a tabletop game over the last couple of weeks. One thing that I'm struggling with it getting an EntityEquipment to render. I've followed the instructions in the documentation: https://developer.apple.com/documentation/tabletopkit/entityequipment But still no luck. Any insights what I might be missing are highly appreciated. Note: I've also watched the WWDC24 talk https://developer.apple.com/videos/play/wwdc2024/10091/ several times and downloaded the example but while the pawns render in the example perfectly. In my own implementation of a pawn nothing renders.
1
0
503
Jul ’24
Tabletopkit Game between players at same location
Does the current version of TabletopKit support having two or more game players to be at the same physical location? In these cases, the players would not want to see a Facetime persona around the table but instead should be able to see the physical player. Any other remote players would be able to see the personas of those players since they are not at that location. There are a couple of issues in this scenario (shared position of the board, players' location around the table, etc.), but they should be solvable. Thank you!
1
1
525
Jun ’24