Is master data available in Swift Sprite Kit?

I have a game that I am creating that uses arrays, many of them. To be more concise in my code, and because swift won't compile long arrays (at least for me), I would like to store my values ​​in the database. Is the master data not available in the Sprite bundle? If not, what are the alternatives? I did a google search but had no luck finding anything.

Thanks in advance!

+3


source to share


2 answers


As a result, I created a new swift project with core data (not game) and copying the core data logic from AppDelegate to my games app delegate. I created a datamodel by right clicking new <> and put in the data structure I wanted. This actually worked for me and now I have no problem. Thanks to all who responded.



+3


source


It is true that when you create a spritekit project, it does not give you the ability to use the master data. However, it is possible to directly add the main database and also create the main data files. There are other methods for saving scores in games, such as saving in a .plist file, which I use to keep high scores in my games.



+2


source







All Articles