View Full Version : A Question about Cross-Platform Programming
MisterPoppet
05-26-2006, 02:03 PM
Okay, before I finishing choosing some tools and API's and Such, I want to know a little bit from the programmers here about cross-platform games. Is it possible to write a game source that has cross-platform capabilities so that all you need to do is compile it on the OS you want, or is there a considerable amount of extra work involved?
Really, this is a bit of a bugger. I've never been a fan of a game that was just for this OS or that OS. And, a lot of enigines (especially graphics engines) tout their ability to be cross platform. I just would like to know how easy that would be to implement. Thanks.
-Bryan-
HopeDagger
05-26-2006, 03:29 PM
Okay, before I finishing choosing some tools and API's and Such, I want to know a little bit from the programmers here about cross-platform games. Is it possible to write a game source that has cross-platform capabilities so that all you need to do is compile it on the OS you want, or is there a considerable amount of extra work involved?
Well, there's two ways that one can go about doing it. The first being easier than the latter. :P
1) Use purely cross-platform libraries. There are quite a few of them for just about any task (graphics, I/O, sound, etc), so using these will enable you do merely perform a recompile on the new platform -- possibly with a few fairly minor changes -- and you're good to go.
2) Use platform-specific implementations per-OS. Many commercial games have done this: write the game with DirectX, then port it using SDL/OpenGL to other platforms. This is a pain and requires you to rewrite huge portions of your code in two (or more!) different libraries. Look up #if and #endif preprocessor directives (if you're using C/C++) if you want to go this route, so you don't need to comment out large chunks of code.
Good luck!
MisterPoppet
05-26-2006, 07:08 PM
Thanks, HopeDagger. I was planning on using only things that are cross-platform. I feel a bit more confident in my decisions now.
-Bryan-
JoustinaJerard
06-06-2008, 11:18 PM
Aloha, guys!
I'm newbie on onrpg.com . And I do not know your rules about writing articles.
Tell me please if category this available to talk about sports?
Is it possible to download somewhere on this forum any video files?
Sincerely, me! :-)
Gauge
06-06-2008, 11:45 PM
do #1, it is by far the easiest way.
openGL and SDL is all you'll ever need :P
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.
SEO by
vBSEO 3.2.0