Advertisement Jump to content
Sign in to follow this  
gchris6810

Should I make my game engine cross platform?

This topic is 1858 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,

 

I started off trying to make my game engine completely cross platform from the start but now I have dug into it i'm starting to think it just isn't worth all the additional complexity and probable performance loss. Would it be better just to write the full game for windows and then port over to Linux and Mac?

 

Thanks.

Share this post


Link to post
Share on other sites
Advertisement

If making your engine cross-platform is causing you performance problems on your main platform (And you're not doing anything terribly advanced that's locked in to a particular set of drivers etc.) then you're doing something very wrong.

 

I would always say yes, but then I've never run into anything troublesome when supporting all three of those.

Share this post


Link to post
Share on other sites

The primary advantage of starting as a single-platform release (preferably the one with the largest or most-profitable user base) is that you get to discover whether the endeavor is successful on the platform with the highest potential reward, and derived from that, whether ports to other platforms would be worth the cost.

 

The trick then, if you might want to port to other platforms, is to not make any silly choices that make porting more difficult than it has to be -- whether to use OpenGL or DirectX, how to interface input, networking, and the file-system, or what the right level of abstraction is, even if you don't actually go an implement those non-primary paths. If you don't avoid painting yourself into a corner in this way, its very unlikely you could "port"--in reality, a near-total re-write--your game to another platform which has a smaller market and turn a profit.

 

Realistically this means that some of the implementation costs of cross-platform compatibility can be avoided, but the design costs have to be paid up-front as a practical matter. Granted, a run-away hit might be re-written for other platforms if cross-platform issues were never considered, but its rare. 

Share this post


Link to post
Share on other sites

If you pay some attention to stay crossplatform from the start its probably not more difficult. Just restrict yourself to only use libraries that are crossplatform already (may even save on time when selecting a library by cutting down on choices) and in the rare case there is none wrap the platform dependent calls yourself (possibly write those wrapper only for one platform at first) and only use the wrapper (I doubt you would loose much performance from this). Then with some luck porting may be as easy as providing another implementation of your thin wrappers and adapting the build system to use some other compiler (you should not have used compiler dependent things).

If you instead build your game on OS-dependent calls and put those everywhere in your code, you will be out of luck later and have to tell everyone porting is not feasible/too expensive/too much effort.

Edited by wintertime

Share this post


Link to post
Share on other sites

In general, don't make anything you're not using.  There are too many ideas and decisions which you'll only arrive at through practical use, which means that making without using will accumulate wasted work and required rework.

 

So don't make an engine without also making the game/content which will use it.  And by extension, don't make your engine cross platform unless you're making a cross platform game.

 

That being said, as has been suggested above, you should make your design as portable as you can even if you don't port it.  I suspect this will be good for design anyway, since isolating platform dependent code is a form of separating concerns.

Share this post


Link to post
Share on other sites

Thanks for all the suggestions everyone. I think that as it is my first proper game engine project I won't focus on the cross platform element, although the way I plan to code it would make it relatively conducive to porting when it is finished.

Share this post


Link to post
Share on other sites
Hi. Please when did you start making your game engine. I just need to know because i plan on making one (not soon) and since you're already making yours, it'll help me evaluate. Thanks:)

Share this post


Link to post
Share on other sites

I think you should more think on cross platform as PC-console rather than Windows-Mac . As I doubt it worths trouble for an indie if not designed that way at the beginning. But when console thing kicks in, it involves changes in gameplay, not only being platform agnostic.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!