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 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