4

I'm developing experimental multiplayer roguelike for iOS. Players will be connected via GameKit API and they'll be put in one dungeon. There is various actions that players can perform, so I want to make one device be a host, and to implement some sort of RPC for sending/receiving of this actions (and pretty complicated state of dungeon when game starts)

I need some compact and fast serialization. I'm choosing between protobuf and binary plists. Binary plists looks pretty simple to use for objc objects serialization/deserialization (this is important point, cause its experimental non commercial project), but it looks inefficient. Protobuf looks efficient, but totally alien. Any alternatives?

Edit: just found http://msgpack.org/. Looks like a way to go

Northern Bite
  • 83
  • 1
  • 6
darvin
  • 529
  • 5
  • 17

1 Answers1

1

Protocol buffer serialization should be faster than binary plist. Also, if you want to make the game again on android or any other platform then protocol buffers will be your friend. (platform independence)

Working with protocol buffers on ios can be a pain in the beginning. Just setting up the project with XCode takes up a lot of time. Initially i tried to work with objective c version of protobuf, but i had to drop it completely because of some limitations in the library.

I have now added the google source code directly on Xcode, ands its working perfectly. check out this answer. Through this you'll be able to start working with protobufs in your project easily.

Community
  • 1
  • 1
Tushar Koul
  • 2,830
  • 3
  • 31
  • 62