Archived

This topic is now archived and is closed to further replies.

Very newbish Linux question

This topic is 5535 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

I''m in the process of making a game for the Win32 platform in DirectX. I know very little about Linux but I want my game to be playable on Linux. I have no idea where to start. All I do know is there''s no way a DirectX program is going to run in Linux efficiently, if at all. So, what do I need to do? My guess is write it over in a Linux C++ compiler in OpenGL (also know very little about this but I''m guessing it''s portable). Am I right? Point me in the right direction, please. p.s. What are some good Linux C++ compilers? I know that has to have been asked a billion times but, as we all know, the search tool is broken. ---- AIDS

Share this post


Link to post
Share on other sites
quote:
Original post by TheAIDSVirus
So, what do I need to do? My guess is write it over in a Linux C++ compiler in OpenGL (also know very little about this but I''m guessing it''s portable). Am I right?

To be honest, it''d be easier if you didn''t have to rewrite it at all; by using a single codebase using OpenGL and something like SDL, for example. That''s what I''m doing (I do the development and testing in *nix and cross compile releases to Windows).

Also, remember that Linux runs on more than just x86 platforms, so watch out for endian issues and 32-bit assumptions if you plan on supporting more than just x86 systems.

quote:
Original post by TheAIDSVirus
What are some good Linux C++ compilers? I know that has to have been asked a billion times but, as we all know, the search tool is broken.

GCC (a compiler suite for "C, C++, Objective C, Fortran, Java, and Ada") is more or less the compiler you''ll use under most unixes. It will come with most Linux distros (and if it doesn''t, you can probably download the binaries from gcc.gnu.org or a site related to your distro).

Share this post


Link to post
Share on other sites
Thanks for the input. I''ll definitely have to keep the endian issues in mind, although I''m not sure if I''ll be supporting non-x86 platforms.

I''m not too worried about the two codebases. I want the flexibility of more than one codebase. (ie. people can select OpenGL or DirectX on Win32 systems) Also, I want the experience with both languages.



----
AIDS

Share this post


Link to post
Share on other sites
And one other thing to know. The vast majority of Linux distributions already come with gcc as a standard install package. So, most likely, you already have the stuff on your Linux box.


God was my co-pilot but we crashed in the mountains and I had to eat him...
Landsknecht

Share this post


Link to post
Share on other sites
Thanks. I''m runnin Red Hat Linux 8.0 and just realized that. That raises another question though. Does GCC have an IDE? Will I have the bell-and-whistle-like environment with things like syntax coloring or is it a command line compiler?

----
AIDS

Share this post


Link to post
Share on other sites
GCC by itself is a command line compiler. Do some searching, and you''ll find IDE''s for it. The most common (I think) is KDevelop, which is available if you use the KDE window system.

Share this post


Link to post
Share on other sites
Also have a look at XEmacs, it''s an editor with syntax highlighting, the possibility to run a compiler/debugger/whatever ... and many more gadgets

It''s the most flexible text editor I know, and I use it on a regular basis for writing Solaris/Linux programs in any programming language.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
There''s also Anjuta. Check out anjuta.sourceforge.net

Share this post


Link to post
Share on other sites
If you want to have different renderers on windows you project size will grow reasonable. (develop a render interface and implement for both, DX and OGL, state handling ....). You might want to use available cross-platform solutions (like OGRE (ogre.sf.net), NebulaDevice (nebuladevice.sf.net), NeoEngine (neoengine.sf.net), CrystalSpace, Nive3d (http://www.faktiss.net))

- cheers,
Stephan



OpenMountains | Open source snowboard simulation - some day.

Share this post


Link to post
Share on other sites
quote:
Original post by TheAIDSVirus
Thanks. I''m runnin Red Hat Linux 8.0 and just realized that. That raises another question though. Does GCC have an IDE? Will I have the bell-and-whistle-like environment with things like syntax coloring or is it a command line compiler?

----
AIDS


Under windows I use the Dev-C++ IDE with the gcc compiler.
Using gcc under windows makes it easier to port applications
to linux.

Share this post


Link to post
Share on other sites