Jump to content

Distributing C++

jacobingalls

Hi,

I have been using C++ to work on a project, but then it struck me, i don't know how to get my code to my users. Right now it is a simple openGl game, but i hope that it will be a full blown indie title. I would like the game to be distributed to Windows, Mac, and Ubuntu in particular. 

 

My hope is to build it via jenkins on my ubuntu server, but digging around it seems like the binaries must be built on the final computer.

 

I am doing this for fun, and as of yet, i have not found a good, cross platform way.

 

Thanks in advance.

Link to comment
Share on other sites

Link to post
Share on other sites

The easiest way to ensure compatibility would be to construct the game in a cross platform game engine.  Short of that I would wonder if you could cross compile to a different OS. I know you can do so for different architectures. I've never done it but google should help you down that path fine.

My rig: 2600k(4.2 GHz) w/ Cooler Master hyper 212+, Gigabyte Z68-UD3H-B3, Powercolor 7870 xt(1100/1500) w/AIO mod,

8GB DDR3 1600, 120GB Kingston HyperX 3K SSD, 1TB Seagate, Antec earthwatts 430, NZXT H2

Verified max overclock, just for kicks: http://valid.canardpc.com/show_oc.php?id=2609399

Link to comment
Share on other sites

Link to post
Share on other sites

you could have a virtual machine for each OS, and compile your game three times

for linux, you could even just distribute the source and put a makefile in it that will automate the compilation progress (that's how it's usually done under linux)

and of course pay attention to write cross-os code, so you should avoid os-specific instructions, or provide three os-specific instructions that will be choosen at compile time by compiler directives

Link to comment
Share on other sites

Link to post
Share on other sites

for linux, you could even just distribute the source and put a makefile in it that will automate the compilation progress (that's how it's usually done under linux)

For normal programs maybe, I don't know of any real game that gave out its source at the same time it is released. It's usually like a decade later after it has been long since irrelevant.

 

I don't know about Mac but MinGW can be used to compile for Linux from Windows or from Linux to Windows.

Though like Ciccioo said, a VM would be a good idea since each one needs to be tested separately anyway.

1474412270.2748842

Link to comment
Share on other sites

Link to post
Share on other sites

For normal programs maybe, I don't know of any real game that gave out its source at the same time it is released. It's usually like a decade later after it has been long since irrelevant.

 

I don't know about Mac but MinGW can be used to compile for Linux from Windows or from Linux to Windows.

Though like Ciccioo said, a VM would be a good idea since each one needs to be tested separately anyway.

Generally anything that wants to interact with anything to do with OSX needs to be built on OSX. Which would normally involve renting an OSX server.

Otherwise as you said, MinGW can compile for multiple platforms.

Arch Linux on Samsung 840 EVO 120GB: Startup finished in 1.334s (kernel) + 224ms (userspace) = 1.559s | U mad windoze..?

Link to comment
Share on other sites

Link to post
Share on other sites

Ogre3D (3D rendering engine) has support for Windows/Linux and OSX, with plugins for sound, physics, UI etc.

You really need to build on top of it to make it a proper game engine though, so it's versatile at a cost of man hours.

Examples of games on Ogre: Torchlight series

Edit:

Oh, it's free to use, pretty open and can be worked on in most IDEs afaik.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×