Posts

Post not yet marked as solved
0 Replies
985 Views
Hello, I have an @EnvironmentObject variable that publishes 30 times per second but the view that depends on that data must be limited to 20 frames per second. The publishing rate cannot be controlled, so I must control the rate at which SwiftUI refreshes that view in order to achieve the desired effect. I tried using TimelineView(.periodic(from: .now, by: 1/20)), but the restriction gets ignored due to the published data; I also considered Combine's timer, but it isn't based on real time. Are there any other methods I can use to force SwiftUI to refresh certain views at certain real time intervals, in essence controlling its FPS?
Posted
by wmk.
Last updated
.
Post not yet marked as solved
0 Replies
986 Views
About a month ago I asked whether I could use HDR in SpriteKit. This wasn't a well-phrased question since HDR seems to mean different things in different questions, which probably led to my question going unanswered. What I meant to ask was whether it's possible to use assets that have a color gamut that many modern devices are capable of displaying (XDR is somewhat standard among mid- to high-end devices). In other words: Is SpriteKit keeping up with the hardware? If not, what framework options do I have that can quickly display large Rec. 2020 images? Do any of the Core frameworks offer this capability?
Posted
by wmk.
Last updated
.
Post not yet marked as solved
0 Replies
691 Views
I'm looking to use high-quality and large images as animated sprites via SpriteKit. Right now the default maximum size of a texture atlas is 4096*4096, which is at least an order of magnitude below what I need. There's an option to create custom maximum sizes, but the tiny default and the age of the SpriteKit framework is giving me second thoughts even though I'd very much like to stick with an Apple framework and not have to rely on another party like Unity. Before I invest my time and energy into SpriteKit I'd like to know whether the decade-old framework, running on modern hardware (A11 and newer), can support massive texture atlases while maintaining decent performance (~30 FPS). If not, is it possible to implement something similar in less antiquated frameworks, such as RealityKit (non-AR). Thanks in advance for your time.
Posted
by wmk.
Last updated
.
Post not yet marked as solved
0 Replies
1.3k Views
I'm looking to use high-quality and large images as animated sprites via SpriteKit. Is it possible to display sprites with HDR colors in SpriteKit? What about SpriteKit via SceneKit or RealityKit? I've looked all around and it seems as though *.PNG is the only accepted image format, and it doesn't seem to have HDR support.
Posted
by wmk.
Last updated
.
Post marked as solved
1 Replies
1k Views
My project involves no camera passthrough and relies heavily on sprites, but I've been discouraged from using the aging (and possibly dying) SpriteKit or SceneKit as my rendering engine by Apple engineers (here) so I'm exploring other options. Is it possible to display 2D sprites fluidly using this framework in a non-AR context? Is it possible to create, say, a 2D platformer using just RealityKit?
Posted
by wmk.
Last updated
.
Post marked as solved
6 Replies
2.5k Views
Hello, I'd like to know whether Multipeer Connectivity (MPC) between two modern iOS devices can support cross-streaming of video content at low latency and relatively high resolution. I learned from Ghostbusters that crossing the streams is a bad idea, but I need this for my app so I'm going to ignore their sage advice. The application I have in mind involves one iOS device (A) live-streaming a feed to another iOS device  (B) running the same app. At the same time, B is live streaming its own feed to A. Both feeds don't need to be crystal clear, but there has to be low latency. The sample code for "Streaming an AR Experience" seems to contain some answers, as it's based on MPC (and ARKit), but my project isn't quite AR and the latency seems high. If MPC isn't suitable for this task (as my searches seem to indicate), is it possible to have one device set up a hotspot and link the two this way to achieve my cross-streaming ambitions? This seems like a more conservative method, assuming the hotspot and its client behave like they're wifi peers (not sure). I might start a new thread with just this question if that's more appropriate. A third idea that's not likely to work (for various reasons) is data transfer over a lightning-lightning or lightning-usb-c connection. If I've missed any other possible solutions to my cross-streaming conundrum, please let me know. I've been reading around this subject on this forum as well and would be hugely grateful if Eskimo would grace me with his wisdom.
Posted
by wmk.
Last updated
.
Post not yet marked as solved
0 Replies
535 Views
Hello, I'm a Canadian living in Hong Kong who has attempted to enroll in the developer program. After submitting my Canadian passport as identification, I was told it's not valid ID for the region (Hong Kong) and that I should submit something else.  I have several concerns that I would like answers to so I can figure out how to proceed: I'm very likely to move back to Canada in the near future and would like to know if there are any issues associated with switching between App Store regions? Issues like having to pay for enrollment twice, or legal/regulatory problems, or anything else? Another concern I have is my app being somehow subjected to censorship or some regulation that escapes my common sense, since Hong Kong is part of China.  My apps are not political but this is still a point of concern given the recent crackdowns on its tech and education sectors--it's not entirely unthinkable that something will strike down my app out of the blue, for no fault of my own. My app is intended for a global audience, but I fear having my developer account tied to Hong Kong (China) will come back to haunt me in some way. Am I fretting over nothing? There's also the payment issue--can payouts from my app be sent to an bank account of my choosing, or does it have to be in the region I'm tied to? Thank you in advance for your time.
Posted
by wmk.
Last updated
.