Question about Core Data and games..

Posts: 5
Joined: 2007.08
Post: #1
Hello, Im kinda new here, so I'll lay down the baiscs. I have been dabbling in programming for a couple of years, I started on C, moved on to Objectve-C/Cocoa, where I taught myself a little bit about OpenGL. Although I still feel a little lost in alll the Cocoa API to be honest.

Ok, on to my question. So I have been reading through a little bit of the Core Data programming guide, and I did a little test app, and it seemed varrry easy to enter in and display all kinds of values. Im not entirely sure how I could go about it quite yet, but it seems like a technology like that would make creating content for a game quite easy to do... I guess my only question is, does anyone have any idea if it would be a fast enough system to actually make it worth it to utilize in a game?
Quote this message in a reply
Posts: 567
Joined: 2004.07
Post: #2
creating content, I'm not so sure about. To be honest, the settings saved in a game might be easier accomplished with a simple plist; I think core data is a bit of an overkill. But, saving settings is hardly the thing you need to worry about when optimizing.

It's not magic, it's Ruby.
Quote this message in a reply
Posts: 3,591
Joined: 2003.06
Post: #3
I think it'd be kinda interesting to give CoreData a try for a game. Maybe it could be fast enough for a small scene graph, who knows? I haven't tried it but I've definitely thought about it. That said, I have a hunch that it wouldn't be the best route to take overall, but that's just a hunch. Try it and find out!
Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #4
I tried to use CoreData for geometry data (matrices, etc.) and found it to be a colossal pain in the rear end.

Maybe it'd be OK for some radically different genre of game (text adventure, maybe) but I definitely didn't think there was any potential in the area I tried.
Quote this message in a reply
Posts: 5
Joined: 2007.08
Post: #5
I think I was a little unclear what I meant by content, I was thinkin in terms of like an RPG style game, where you will have hundreds of items that all share the same basic elements, like for instance, maybe a Name, Durability, Weight, and a set of numbers that represents how much they change each skill or whatever.

Or possibly even for like a map editor for a 2d grid based game, have Core Data manage a list of tiles, which keeps track of each tile's name, and the path to its texture file, then you use that info to populate your list of possible tiles to use/paint onto your map.

Either way, with Core Data I can make a list of those items, and edit all the value real fast and easy like, and it automatically stores it for you in whatever format you choose, which is why I just cant help but think It could help out in game development somehow.

Anyhow, I am definitely finding it to be a "colossal pain in the rear end" to really, truly, deeply understand exactly how it all interfaces together(object graph, controllers for your views, and your custom classes) so I dont know if it is really worth the aggravation... and the possible issues with speed. But either way, I think Im still gonna look into this a little further, even if it ends up being useless on the gaming end of the programming spectrum
Quote this message in a reply
Posts: 8
Joined: 2005.07
Post: #6
Another reason to stay away from CoreData is that you'll lock yourself into the Mac for good... which may be okay where you are right now, but overuse of platform specific libraries can lead to self-hated down the line.

So: please no-one mention how we locked Unity into the Mac by using Cocoa...

Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Question on AI and board games Taxxodium 3 5,325 Oct 8, 2004 01:44 PM
Last Post: Taxxodium
  Tetris, Brickout and other games question Taxxodium 16 11,302 Nov 17, 2002 02:17 PM
Last Post: DaFalcon