Post

Replies

Boosts

Views

Activity

Reply to How to get SKScene screen dimensions when using SpriteView
So, because I was completely stuck on this matter I requested code level support from Apple, and they came with this answer; The reason you are receiving NaN is that you are calling these methods before the underlying SKView has been actually presented by SwiftUI, which is an event that you have no visibility into, and no way to call code when it happens. However, when this event does occur, the SKScene’s view property will have it’s window set from nil to a UIWindow. Therefore, you could use KVO to observe when the window property is changed, and then make your calls to convertPoint once there is a non-nil window. Now , how the heck do I put an observer on SKScene to monitor change? I have 0 experience with Observe/KVO. I have tried : override func didMove(to view: SKView) {         view.observe(\.frame.maxX, options: .new ) { object, change in             print ("it has been changed")         } } this gives me an error "Fatal error: Could not extract a String from KeyPath Swift.KeyPath" and override func didMove(to view: SKView) {         view.observe(\.frame, options: .new ) { object, change in             print ("it has been changed")         } } but this doesn't seem to be called when it is changed. any help would be appreciated.
Jul ’21
Reply to Game Center real time match search failure serial number
This issue is extremely annoying, there is also very little to be found on google/bing and etc And the networking issue seems to be bigger when connected on 4G. I am trying to build a multiplayer real time game to learn Swift/SpriteKit and etc, but this is just unbelievably bad. If anyone can shed a bit of light on the matter that would be fantastic. On local WiFi I mostly get the error below ; [ERROR] AGPSessionRecvFrom:1954 0x10cd064d0 sack: SEARCH FAILURE SERIAL NUMBER (0000017A) FROM (28388F35)... Some of the errors I get when on 4G, after a while the connection is dropped : NOT ENOUGH TRANSMISSON WINDOW BUFFERS AVAILABLE! [ViceroyTrace]	[ERROR] OSPFParse_ParsePacketHeader:1087 bufferLength=38 is too small [ViceroyTrace]	[ERROR] OSPFParse_ParsePacketHeader:1092 Bad version [ViceroyTrace]	[ERROR] AGPSessionRecvFrom:1954 0x141208e50 sack: SEARCH FAILURE SERIAL NUMBER (00000000) FROM (12756BFB)... 2020-07-11 14:30:06.790292+0200 somesortofgame[12286:2400960] [ViceroyTrace]	[ERROR] RefreshAllocation:238 /Library/Caches/com.apple.xbs/Sources/AVConference/AVConference-1645.9.1.2/ICE.subproj/Sources/Relay.c:238: STUNEncodeMessage failed (80140008) 2020-07-11 14:30:06.790511+0200 somesortofgame[12286:2400960] [ViceroyTrace]	[ERROR] RelayRefreshProc:406 [ViceroyTrace]	[ERROR] ICEStopConnectivityCheck:2733 ICEStopConnectivityCheck() found no ICE check with call id (1242799261)
Jul ’20