Jump to content

  • Log In with Google      Sign In   
  • Create Account


Linux for development Windows games - how do it


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
9 replies to this topic

#1 bejtz   Members   -  Reputation: 103

Like
0Likes
Like

Posted 13 May 2013 - 06:36 AM

1st thing - if similar topic exist, can you past a link? I can't find it.

 

Like everyone, I want write game. It'll be isn't big, more like 'tech demo' or 'learn something new'. I want to use C++, some 2D library, game with top view. I'm using linux, coding in Java at work. But I want to deploy final product to Windows, in *.exe. What technology/tools (IDE or something else) allow me to do it? It's possible to complie and deploy 2D game in OpenGL without any change to Windows, even if game was written in Linux?

 

I know for now, that will be problem with IDE. I'm using Intellij for Java, but all C++ IDE on Linux are bad or worse, but I must chose one. I'm not happy, but I wasn't install Windows especially for it.


Edited by bejtz, 13 May 2013 - 06:45 AM.

Pierdol system, lecz rób to stylowo.


Sponsor:

#2 ColinDuquesnoy   Members   -  Reputation: 1071

Like
0Likes
Like

Posted 13 May 2013 - 07:34 AM

For my cross platform c++ development I use Qt Creator with CMake. This gives me an excellent IDE (good code completion, syntax highlighting,...) and a flexible and powerful build system. With this setup I can write my whole game on Linux and compile the code on windows with MinGW when the code is ready to release (most of the time this compiles out of the box without any errors) (You can even cross compile from Linux but I've never tried it)

 

PS: there is nothing wrong with the Qt creator build system (QMake), I just prefer CMake because my build steps can get pretty complicated (I automatically generates python bindings for my engine and CMake allow me to do that quite easily)


Edited by renega_666, 13 May 2013 - 07:35 AM.


#3 Aliii   Members   -  Reputation: 1339

Like
0Likes
Like

Posted 13 May 2013 - 08:29 AM

I tried GLFW. It works but its horror for anything more than a little 2D project. If you dont need GUI or you will write your own then create a class that will be responsible for the OS-specific stuff: creating the window, handling the system messages, etc.(Or use something like Qt as suggested) Once your project becomes bigger you will have to do that anyway. ....or switch to a cross-platform engine.

 

IDE: Im using NetBeans with GCC and it works fine. Except that the debugger is crap compared to VS.

 



#4 SeraphLance   Members   -  Reputation: 1277

Like
0Likes
Like

Posted 13 May 2013 - 09:29 AM

Do you have any Windows box at all?  It can be troublesome to develop for a platform you can't test on.

 

For my last cross-platform project, I just worked over two machines, and my project naturally became cross-platform.  It can encourage hacky solutions though if you're not disciplined about it (since the project just fails to build when you actually want to get work done).



#5 Sik_the_hedgehog   Crossbones+   -  Reputation: 1490

Like
0Likes
Like

Posted 13 May 2013 - 09:41 AM

It's possible to complie and deploy 2D game in OpenGL without any change to Windows, even if game was written in Linux?

Provided you stick to portable libraries, you should be able to (though differences in how filenames are handled can be annoying). In the project I'm working on when I tried building it on Windows the only couple of lines I needed to add was a few #includes I should have added and forgot. (didn't get a warning on Linux since some other headers were including those implicitly) I spent more time rebuilding all the libraries than building the game itself.

 

That said, I'm also clueless as to how do cross compiling (i.e. build the Windows executable with a Linux system). I have MinGW-w64 installed (a variant of MinGW that adds some headers and such that are missing from the normal version, as well as allowing 64-bit executables), but I have no idea from where to go. It seems like every library has a completely different way to be built for cross compiling, ugh.


Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.

#6 ByteTroll   Prime Members   -  Reputation: 1166

Like
0Likes
Like

Posted 13 May 2013 - 10:46 AM

I was forced to do this one time as an educational experience, and while I was able to do it, the amount of hassle that came along with it was unreal.  The best advice (assuming you have a windows box) is to program the windows specific code on native Windows.  Regardless, you are going to have to use a toolchain that supports the ".exe" file.  This is best done natively on Windows, but you might be able to use 'W.I.N.E' or something similar.

 

If you are using libraries that are cross-platform, and assuming you stick to cross-platform code, it should be as easy as just compiling on the new platform (I use the phrase "should be" lightly).

 

Do you have any Windows box at all?  It can be troublesome to develop for a platform you can't test on.

 

I missed this the first time, but this is a very real and valid point.  It is not good practice to test a game that you want to natively port to Windows in something like "W.I.N.E."  You really want a native system to test on.

@EDIT: Added to original answer.


Edited by ByteTroll, 13 May 2013 - 10:48 AM.

▬▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬▬▬▬▬
I see the future in 1's and 0's
▬▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬▬▬▬▬

"This is called programming. The art of typing shit into an editor/IDE is not programming, it's basically data entry. The part that makes a programmer a programmer is their problem solving skills." - Serapth

#7 bejtz   Members   -  Reputation: 103

Like
0Likes
Like

Posted 14 May 2013 - 03:49 AM

I've Windows, all version, from MSDN AA, but:

 

  • I hate cmd, but love bash (important at work) - it's more intuitive, user-friendly etc. IMO
  • I'm using Windows only for games, in my desktop PC. It has only Steam, communicator, Spotify and Chrome. It's like console;) But it's old machine (E7300, 4GB RAM DDR2 800), for work I've i5, 6GB RAM DDR3 (laptop). I don't like coding on desktop.
  • I don't like Visual Studio, for me is unintuitive, like Eclipse (Intellij ftw)

 

So Windows for me at work is... unnecessarysmile.png


Edited by bejtz, 14 May 2013 - 03:51 AM.

Pierdol system, lecz rób to stylowo.


#8 Karsten_   Members   -  Reputation: 1460

Like
0Likes
Like

Posted 14 May 2013 - 04:40 PM

We use a continuous integration server at work (Atlassian Bamboo) which attempts to build the software on all the platforms we are targetting. This is really useful because it prevents us from ignoring a platform for long periods of time. When it tries to build, it will fail and give us an email so that we can then go and do a better job of maintaining the port.

 

If you are an experienced UNIX/Linux developer, then you probably have a fairly good knowledge of writing portable software anyway to cater for the many different Linux / BSD distributions we use today. Using the Mingw toolchain (and certainly Cygwin) will create a sufficiently UNIX-like development environment for you to work in anyway (Arguably more UNIX-like than Ubuntu ;).


Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.


#9 Acharis   Crossbones+   -  Reputation: 3070

Like
0Likes
Like

Posted 17 May 2013 - 06:00 AM

Code::Blocks is crossplatform, it is decent enough.

 

Then you can run the Windows emulator and compile the final exe (the nice thing is that you would be able to use the same project since you would be usiung the same IDE for both systems).


Europe1300.eu - Historical Realistic Medieval Sim (BETA)


#10 Serapth   Crossbones+   -  Reputation: 5181

Like
0Likes
Like

Posted 18 May 2013 - 11:18 AM

I've Windows, all version, from MSDN AA, but:

  • I hate cmd, but love bash (important at work) - it's more intuitive, user-friendly etc. IMO
  • I'm using Windows only for games, in my desktop PC. It has only Steam, communicator, Spotify and Chrome. It's like console;) But it's old machine (E7300, 4GB RAM DDR2 800), for work I've i5, 6GB RAM DDR3 (laptop). I don't like coding on desktop.
  • I don't like Visual Studio, for me is unintuitive, like Eclipse (Intellij ftw)
So Windows for me at work is... unnecessary:)
CMD can easily be replaced, install Cygwin and you can run bash. Or better yet, learn powershell, a modern and powerful shell environment,

IntelliJ is available on Windows, but if you want a C++ IDE other than Visual C++, try Qt creator.

If you are targeting a platform, it's pretty much essential to run on that platform,




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS