Post

Replies

Boosts

Views

Activity

Comment on Concurrent Processing of SKSpriteNode Copied Data in SpriteKit
Apologies for not getting back to you earlier. I haven't done anything with this for most of the last week. I did end up reading the parameters individually in a loop and this works fine. Given how SpriteKit operates, it would be great if Apple provided a way to copy node data to an array or similar that could be used on a background thread for data processing. Could simplify things a lot for complex processing.
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’22
Comment on SwiftUI: Assign the height of the screen safe area in pixels to a constant
Again carriage returns have been removed. The reply above was well spaced out before I submitted it. This sentence should be 2 lines below the previous 2 sentences. This time I used 'Shift-Enter' instead of just 'Enter' as with the last reply. Other than that I don't know why spacing has been removed. I'm sending this on a PC and not a Mac, so maybe that's why?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’21
Comment on SwiftUI: Assign the height of the screen safe area in pixels to a constant
Hi Claude, Thanks very much for your reply. Does the number of pixels it returns only have a resolution of 2-3 pixels (ie.1 point) or is the fractional part retained giving a result to the pixel? In any case for now I have moved forward using points. In normal use both are more than sufficient, however it will be possible to zoom small sections of the screen and I would prefer to maintain as much detail as possible. Regarding my original post, it was broken into 4 separate paragraphs when I wrote it. When I pressed SUBMIT the carriage returns were removed giving the result you see. I was quite annoyed by this at the time but assumed there was no alternative. I've hit ENTER twice between each paragraph in this reply. Hopefully this will resolve it. This is the first post I've created so apologies for that. If I knew a way to edit the original I would!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’21
Comment on Concurrent Processing of SKSpriteNode Copied Data in SpriteKit
Apologies for not getting back to you earlier. I haven't done anything with this for most of the last week. I did end up reading the parameters individually in a loop and this works fine. Given how SpriteKit operates, it would be great if Apple provided a way to copy node data to an array or similar that could be used on a background thread for data processing. Could simplify things a lot for complex processing.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on Concurrent Processing of SKSpriteNode Copied Data in SpriteKit
Just discovered the 'inout' keyword too! Didn't have to redefine t1Vehicle with this, however I still can't access it's properties. Have included this in code above. Suspect it's somehow linked to the way I defined "[NodeData]" although I have no idea how.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on Concurrent Processing of SKSpriteNode Copied Data in SpriteKit
Following a search on the error, I tried adding the following line in front of the sort:         var t1Vehicle = t1Vehicle The error then disappeared. Problem is I can't seem to access its properties such as position and size. Even without the line above, this seems to be the case :(
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on Concurrent Processing of SKSpriteNode Copied Data in SpriteKit
Based on what you're saying I'll probably just read node parameters in a loop on the main thread & copy these into an array before processing on a background thread. Thought there'd have been a better way. Won't get a chance to do this until tomorrow. Will let you know how it goes. Cheers!
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on SwiftUI: Assign the height of the screen safe area in pixels to a constant
Again carriage returns have been removed. The reply above was well spaced out before I submitted it. This sentence should be 2 lines below the previous 2 sentences. This time I used 'Shift-Enter' instead of just 'Enter' as with the last reply. Other than that I don't know why spacing has been removed. I'm sending this on a PC and not a Mac, so maybe that's why?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’21
Comment on SwiftUI: Assign the height of the screen safe area in pixels to a constant
Hi Claude, Thanks very much for your reply. Does the number of pixels it returns only have a resolution of 2-3 pixels (ie.1 point) or is the fractional part retained giving a result to the pixel? In any case for now I have moved forward using points. In normal use both are more than sufficient, however it will be possible to zoom small sections of the screen and I would prefer to maintain as much detail as possible. Regarding my original post, it was broken into 4 separate paragraphs when I wrote it. When I pressed SUBMIT the carriage returns were removed giving the result you see. I was quite annoyed by this at the time but assumed there was no alternative. I've hit ENTER twice between each paragraph in this reply. Hopefully this will resolve it. This is the first post I've created so apologies for that. If I knew a way to edit the original I would!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’21