Post not yet marked as solved
It seems that SpriteKit doesn't batch the draw calls for textures in the same texture atlas. There are two different behaviors, based on how the SKTextureAtlas gets initialized:
The draw calls are not batched when the texture atlas is initialized using SKTextureAtlas(named:) (loading the texture atlas from data stored in the app bundle).
But the draw calls seem to be batched when the texture atlas is created dynamically using SKTextureAtlas(dictionary:).
The following images show the two different behaviors and the SpriteAtlas inside the Assets Catalog.
1. Draw calls not batched:
2. Draw calls batched:
The SpriteAtlas:
I created a sample Xcode 13 project to show the different behavior: https://github.com/clns/spritekit-atlas-batching.
I have tried this on the iOS 15 simulator on macOS Big Sur 11.6.1.
The code to reproduce is very simple:
import SpriteKit
class GameScene: SKScene {
override func didMove(to view: SKView) {
let atlas = SKTextureAtlas(named: "Sprites")
// let atlas = SKTextureAtlas(dictionary: ["costume": UIImage(named: "costume")!, "tank": UIImage(named: "tank")!])
let costume = SKSpriteNode(texture: atlas.textureNamed("costume"))
costume.setScale(0.3)
costume.position = CGPoint(x: 200, y: 650)
let tank = SKSpriteNode(texture: atlas.textureNamed("tank"))
tank.setScale(0.3)
tank.position = CGPoint(x: 500, y: 650)
addChild(costume)
addChild(tank)
}
}
Am I missing something?
Post not yet marked as solved
Hello!
I am working on an app that uses a native iOS as a base to show a 3D Room in Unity. I archive this by using:
https://docs.unity3d.com/Manual/UnityasaLibrary-iOS.html
I want to use iOS native because of the pencilKit support.
I am now looking for the best option to share data between the two instances. I am not sure if the better way is to just let the native Swift App talk to a Realm and just send in the data I want to store from Unity to Swift, or if its possible to let both apps talk to the same database.
The goal is to create a 3D Object in Unity (that has some properties like coordinates) and assign a PKDrawingFile to it.
Thank you for all your help,
Jakob
Post not yet marked as solved
When running on iPhone13 Pro Max (iOS15.1) and tapping the screen with several fingers in succession, it may go to 30fps at the moment of the tap.
self.displayLink = [CADisplayLink displayLinkWithTarget: self selector: @selector(repaintDisplayLink)];
[self.displayLink setPreferredFramesPerSecond:60];
// or
// [self.displayLink setPreferredFrameRateRange:CAFrameRateRangeMake(60,60,60)];
[self.displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
Unity and cocos2d-x are written with almost the same code, but the same phenomenon occurs.
It is not reproduced on iPhoneXS MAX(iOS15.1), iPhoneSE2, iPhone7, etc.
Also, if you set it to 120fps and run it, and then tap it continuously, the 120fps will turn into 60fps in the same way.
Post not yet marked as solved
Lag on call of duty mobile & phone heating issue in iphone Xr my device is under warranty initially it wasn't lagging until iOS 14 updates now the same is with iOS 15 please fix it my brightness declines on its own & I have taken the device to service center they deemed it working fine but my device throttles because of which I face fps drops desync & total screen freezing with ghost touches even my phone's overall performance is affected please optimise this game its a humble request I can't even play since 3 months & my device is barely 6 months old or atleast help me to get this device replaced the phone is even heating while charging & while playing the battery drains immensely I can't even play a single match because of these lags spikes & heating issues phone heats up like a hot iron just within 10 mins of gaming please do fix this I play competitive matches too but now I can't do fix this in the upcoming updates
Post not yet marked as solved
Hi! I recently moved from iphone 12 pro max to a new iPhone 13 pro max hoping to get 90fps on PUBG MOBILE. I can't believed what I have experienced. The 90 fps is so worst that iphone 12 pro max was far better. I buy the new phone just for 90fps but the game is so lag and also the screen is a kind of laggy. What Can I do??
Post not yet marked as solved
Hi, I'm developing game app in metal and trying to change shaders to use argument buffer.
Without argument buffer, frame capture shows the correct buffer/texture datas. But with argument buffer, frame capture shows broken buffers/textures(such as all green textures), even I can see the correct result while game running.
Is there any possibility that I'm missing to call important API for argument buffer?
I call useResource for buffers/textures in argument buffer.
Post not yet marked as solved
Hello,
I want to order theBestWhoop HDMI Male to USB-C Female Cable Adapter with Micro USB Power Cable.
But before i order it i have a question about it, I have now a macbook pro early 2013 with the next connections: (2x) thunderbolt 2 (support no 3440 x 1440 solution) (1x) HDMI port and (3x) USB 3.0. now i have bought a dell S3422DWG gaming monitor and want to use the full 3440 x 1440 solution but it give me only the option 1080P so i did some research about how it will work and everywhere on the ethernet it say use a USB C (thunderbolt 3) to DisplayPort 1.4 Cable. Now i have don't have a USB C (thunderbolt 3) connection in my macbook so i was looking for a solution and found this product. so i think if i put this dongle in my HDMI plug and use the cable from USB C (thunderbolt 3) to DisplayPort 1.4 Cable than it will maybe work.
Link: https://www.bestwhoop.com/products/bestwhoop-hdmi-male-to-usb-c-female-cable-adapter-with-micro-usb-power-cable?variant=40241638146207
Can somebody please help me?
Post not yet marked as solved
Hi does everyone know that why fantasy sports and sports betting cannot be in the same app?
Post not yet marked as solved
how to get the prefpared frame rate for current time?
Post not yet marked as solved
Recently i have install freefire game in iphone13 mobile and my software is updated with Ios15.4 version
Issue is when i try to play my game in Ultra graphics mode it start lagging and heating issue i dont know what happen with my mobile it was running smoothly and after update the software version it start lagging. Pixel also breaking while playing the game
Post not yet marked as solved
I'm new to iOS. What would be the right toolkit to create something like a swarm animation with thousands of objects on the screen moving at high speed?
Post not yet marked as solved
The same graphics program runs in the webview, and the iPhone 12Pro has 15+% more GPU usage than the iPhone 11Pro. In theory, the performance of the A14 should be stronger than that of the A13. Is it possible to increase the GPU overhead by 15+% just because there are more 45x96 pixels? The fragment profiling in XCode Instrument, please see the screenshot.
Post not yet marked as solved
For online gambling apps, web assets loaded into a native webview have to be hosted on Apple On Demand servers. Can these assets make subsequent web requests to load assets from other servers or would those assets also have to live on the Apple On Demand servers?
Post not yet marked as solved
Years ago I used to use the Apple Pencil to play pubg. I used to move with my left hand and use the pencil in my right to control the view and shoot. I played today for the first time in a while and the pencil no longer works if my hand is already using the left side. Please tell me there’s a fix for this!!