Tag Archives: Cross Platform

Mac Client Good to Go!

I finished porting my engine to Mac earlier this morning. Only a small amount of work was required as most of the engine code is already platform agnostic. There were a few iOS-specific calls in the resource manager, such as use of UIImage, but changing them to OS X equivalents wasn’t a big deal. Those areas are in the bug tracker for refactoring though, especially for when the time comes to start putting out Windows versions. The other change was to use GLUT instead of the iPhone’s EAGL to actually display the OpenGL context.

To test things out, I ran an updated Server Build and connected to it with my iPhone, Mac and iPad simulator:

Running the whole simulation locally is also possible, and fully functional. Just one more screenshot for good measure, this time with the physics running on the client:

From here I plan to start working on a Windows client and server build as well. Stay tuned!



Rak ’em Up…

I’m at the point in my engine development where I need to start integrating some net code before I go any further. Like the physics support, networkable objects and net code in general are components I’d like to have as part of the engine’s core functionality rather than tacked on later. I’ve worked with a few network solutions in the past (OpenTNL and RedDwarf), but I decided to use RakNet this time. It’s free to use up to a certain revenue cap, and it’s cross-platform. Perfect!

RakNet only comes with projects for Visual Studio, not Xcode, so I started by loading it onto my desktop machine first. Everything worked out of the box and I was able to run some of the sample use cases without any problems. Setting up Xcode projects for Mac and iPhone were equally straightforward, and I was able to run a chat server on the PC and have my Mac and iPhone connect to it:

I haven’t started to integrate anything into my engine code base yet, but I’m going to start work tomorrow. I did take a look at RakNet’s ReplicaManager though, which sounds extremely useful and will definitely be something I use. It’s essentially a set of classes that will handle replicating objects from the server to the client, or between peers. It’ll be a good foundation for the networked objects in my engine.

All in all, I’m very impressed with RakNet so far.


Cross-Platform Games

Games on mobile platforms like iPhone and Android are getting better by the day, and with each new hardware release the limit on graphics capabilities is being pushed further. One of the top PC game engines, Unreal Engine, can now run on mobile devices; it was used to create the visually stunning Infinity Blade released at the end of last year. I gave Infinity Blade a spin the other day and it got me thinking about whether or not it would be feasible to for Windows, Mac and mobile gamers to play the same game in the same game world. In essence, an MMO that can be accessed not only from a desktop computer but from an iPhone, Droid or BB. For the rest of this article I’m going to refer to that concept as a “cross-platform” game, assuming that one platform consists of all desktop/laptop OSs and the other consists of mobile platforms.

I have no doubts as far as technology goes. The hard part of the situation is designing the game itself. You can’t just port WoW or EVE to iPhone and call it a day, nor can you write a Windows version of Shadow Cities or Infinity Blade. Each platform has its own benefits and drawbacks as far as the user experience goes, and a game that mixes users from different platforms has accommodate them. Consequently, I’ve broken the problem down in 3 main areas of interest.

1. Menus/UI

This is not an insurmountable problem, but it is definitely one of the larger issues to deal with in the development of a cross-platform  game. Traditional MMOs on PC platforms typically have plenty of menus, such as character sheets, inventories and chat and often many of these are displayed at one time. On a mobile display with <10 square inches of screen space, this isn’t entirely practical.

I think the ideal system would be somewhat like an TES:Oblivion-style interface, where the majority of the screen defaults to displaying the game world unless a menu is opened. On the PC/Mac platform menus would be access with typical keyboard shortcuts, while on the phone they would “slide out” from the sides of the screen. Menus would of course have to be designed to be extremely concise, with the understanding that an iPhone user will most likely be interacting with a menu or the game world, but not both at the same time.

2. Client-World Interaction

In a classic FPS game the player changes the view with his/her mouse, moves with WASD, runs with Shift and interacts with objects with E. Unfortunately this sort of experience cannot be efficiently emulated on a mobile platform. It’s been tried through a variety of methods, such as rendering a small joysticks on the screen, but the results are typically difficult to use. The bottom line is that FPS controls will not work on mobile devices.

Because of this, I think the best route to go is by implementing a point-and-click move and interaction system. Touching a location in the game world would initiate a path finding process that takes the user to the closest possible point, while touching an intractable object would open a small context menu with relevant actions for that object. This can work with a mouse or with a touch screen device, and wouldn’t give either platform an advantage over the other.

3.  Game Content

Given that the iPhone has significantly fewer resources and graphical capabilities when compared with a high-end desktop machine, some downsizing of textures/models and removal of effects has to take place. The smaller screens on mobile devices mean that less polygons are needed, which is helpful, but at the end of the day the mobile version of cross-platform game will properly end up looking less detailed than its desktop equivalent. There are plenty of ways to combat this though, such as decreasing view distance in exchange for an increase in nearby polygon counts, so I don’t think it’s as big of a concern.

In conclusion, I should mention I have no intention to develop such a game at this time. It’s certainly something I’d like to do though eventually, so I plan to continue fleshing out my ideas. I’ll continue to post some of them here as well as I go. That’s all for now though!


%d bloggers like this: