Blog

Imperium updates

I haven’t been working too much on Imperium since the spring, I’ve been busy with all kinds of other projects and also been a bit demotivated at the lack of progress. That’s how it goes, but lately I’ve been working a bit on moving the online code to use Photon Realtime instead of my own solution. What I had worked quite ok, but it was only for play on a local Wifi network, i.e. where Bonjour would work for service discovery. My own could would not work at all outside a local LAN. Instead of making a separate solution for Internet play I will scrap my own solution and move fully to Photon.

Photon as a service is still an unknown to me, but many games use it and many have recommended it over the years. However, to make an iOS game with Photon is not the most pleasant experience. The SDK is a mess and the docs are more or less non existing. You can grok quite a bit by looking at the C# docs, but there are no docs available for the Objective-C version. The SDK is partially in C++ and the Objective-C wrapper is very ugly to be honest. For some reason something as basic as named parameters have been removed. Using the Objective-C SDK requires a fair deal of guesswork and trying to understand things based on the single simple demo application that is available.

If the SDK is not ideal I have to applaud the developer support. The support has been quite awesome and all my questions and problems were solved very fast. Without the great support I would probably have dropped Photon in favor of something else, but now I’ve learnt the basics and will try to make it all work.

So far I have basic game selection working. One player sets up the game and the other selects the created game from a list. This seems to work quite ok but there is a lot of state and errors to handle and keep track of. No doubt there still are bugs. 🙂 The next step is to translate my own binary serialization code to something that Photon can use. It would have been very nice if I could simply have used my own NSData serialization code as-is, but that was of course not to be. I need to update it a bit to work with what Photon can serialize. Weird that it can not handle a simple NSData byte dump. Oh well, not a big task.

Phew. Back to work.

Comments are closed.

Post Navigation