View Full Version : Linux users, help me with this idea?
Ricardo C
09-03-2005, 01:33 AM
(I would have posted this in the Development forum, but since it's still just a tentative project, I figure it should be here for now)
Lately, I've gotten more and more into Linux. For several reasons, I've become frustrated with Windows (XP is too sluggish on my system, 98 hates my sound card, Vista looks set to have the most draconian DRM ever, etc), and more and more fond of a few of the distros I've tried.
I'm currently wrapping up a project on GameStudio, which is a Windows-only development environment, but since my next game is meant to be 2D only, I'm not married to GS for it. I know ggambett (and I think a couple other people) develops exclusively on Linux and even builds the Windows executables on it, so here's what I'd like to try: Using Slax's module tools, I'd like to build a development-centric version of it, loaded with tools for game developers, focusing on cross-platform support.
What would you guys consider to be the essential tools for such a distro? I really would like to stay true to Slax's reputation as the "pocket OS", so I'm not looking to cram my version with every tool and app known to man, just a package enabling developers to create a full game able to run on Linux and Windows at least. Perhaps there could be a 2D and a 3D version of it? There's already cross-platform engines available, such a Hephaestus and Crystal Space. What do you think?
ggambett
09-03-2005, 10:18 AM
You don't need a lot of stuff... gcc should already come with the distro, runtime libraries for SDL probably too. Add Blender or another 3D modeller, GQView (similar to ACDSee), a decent text editor/IDE (Eclipse for Java or C++, or KDEvelop, although I use Anjuta which does syntax highlighting only)
For the cross compiling stuff, install WINE, install the freely downloadable (but not sure if freely distributable) Visual C++ toolkit, SDL for Windows, the DirectX SDK, the Platform SDK, and NSIS.
To make things even easier I wrote a small script that converts g++ command line parameters to CL.EXE command line parameters, so to cross compile I just have to change g++ for msvc-g++ and everything Just Works (TM) :
#!/usr/bin/python
STANDARD_PARMS = " /DWIN32 /D__MSVC__ /nologo /EHa /GR /GA /G6 "
hReplace = {
" -O3 " : " /Ox ",
" -o " : " /Fo",
" -c " : " /c ",
" -L" : " /LIBPATH:",
" -l" : " ", }
import sys, os
lParms = sys.argv[1:]
bIsEXE = 0
if "-o" in lParms:
nIdx = lParms.index("-o")
if lParms[nIdx+1].find("exe") != -1:
hReplace[" -o "] = " /Fe"
bIsEXE = 1
sParms = " " + reduce(lambda x,y : x+" "+y, lParms) + " "
for sKey in hReplace.keys():
sParms = sParms.replace(sKey, hReplace[sKey])
if not bIsEXE:
lToks = sParms.split()
lToks = filter(lambda x : not "/LIBPATH" in x, lToks)
sParms = reduce(lambda x,y : x+" "+y, lToks)
sParms = STANDARD_PARMS + sParms
sCmd = "wine cl " + sParms
sys.exit(os.system(sCmd))
Did a similar thing with ar, which calls LIB.EXE
Bad Sector
09-03-2005, 10:41 AM
You can put the binaries from mingw crosscompiler (GCCfor linux that creates windows executables) and SDL libraries/runtimes for linux and win32 versions of GCC. You can also put Blender and you MUST put GIMP :-).
A sound editor should also be nice.
ggambett
09-03-2005, 11:21 AM
I used MinGW before and it does work, but I think it isn't worth the effort. Just use the VC++ toolkit and you get 100% compatibility with everything else. You're much more likely to find libraries compatible with VC++ than with GCC. For example the DirectX SDK.
By the way, MinGW EXEs crashed TryMedia's wrapper. Since iWin, Big Fish, Yahoo, and TryGames use their wrapper, it's a good idea to have EXEs that don't crash it :) Just switching to VC++ solved the problem.
Ryan Clark
09-03-2005, 11:41 AM
By the way, MinGW EXEs crashed TryMedia's wrapper.Hm, we're using MinGW and our builds don't seem to crash with the TryMedia wrapper. We've been up on BigFish for a number of days now...
Maybe you were using an older version of MinGW?
Bad Sector
09-03-2005, 03:20 PM
I don't use libraries that don't support GCC :-)
And i managed at the past to use Direct3D9 via MinGW by creating the COM+ objects by hand... so not really a problem :-)
The only issue i have with MinGW is that msvcrt.dll is not included with Win95 by default but i don't really care for W95...
Ricardo C
09-05-2005, 02:34 AM
Thanks for the replies so far :)
I think including the DirectX SDK would be legally impossible. If MS is already having users verify the legality of their copy of Windows, I doubt they'll allow users to bundle it in with another OS altogether.
I'd like to keep this project as free as possible, no strings attached, no legal grey areas. I had thought of including PyGame and Py2EXE, but from what I've seen Py2EXE does not run under Linux, even using WINE. If anyone has any info to the contrary, I'd love to hear it.
The art creation tools are pretty much nailed down, since that's where I'm most experienced:
GIMP
Wings3D
Blender
Image viewer to be determined
Audacity
Midi composer to be determined
A tile editor would be nice, if I can find a decent one. Same goes for an icon editor.
I'd like to include the Crystal Space 3D engine. And maybe even the Quake engines, if I stumble upon a foolproof compiling scheme for Q3A, since most of the advise i've found online has been shaky at best.
MinGW seems to be the best bet for a compiler, in order to avoid any potential unsavory MS entanglements. Since I plan to submit my "Game Slax" to Slax's creator (he hosts a few specialized editions already, so maybe he'll be interested), as well as hosting it on my own site, I really want to keep the cease and desist letters far away ;)
Python + PyGame are in, as is SDL. Allegro might be a nice option, too.
Any other ideas?
princec
09-05-2005, 03:14 AM
Not banging the same old drum or anything here... but... try Java out. Preferably under Eclipse. Maybe with LWJGL. It'll make your life and the transition much simpler than worrying about the vagaries of commandline differences between C++ compilers and linkers and libraries and so on.
Cas :)
Ricardo C
09-05-2005, 10:53 AM
That would be a very good idea indeed :) Could I bother you to list the essentials, though? My knowledge of Java is about the same as my knowledge of neurosurgery. What would need to be included in order to enable users to build a finished program, including a Windows executable?
princec
09-05-2005, 10:59 AM
You need:
1. Java SDK from java.sun.com (I use Java 5.0 but compile down to 1.4.2)
2. Eclipse, from Eclipse.org (3.2m1 seems to be working great for me)
3. Possibly LWJGL from lwjgl.org (and yours truly) to do OpenGL and other gamey things
There are then various ways and levels of deviousness of making executables for distribution. The basic way to do it is ship the entire JRE embedded into your game with a simple launcher batch file that runs javaw.exe with your game jars as parameters. Then you can write your own .exe launcher if you like (I've got source handy for that), and you can get even more devious by deleting bits of the Java runtime you don't want and Moleboxing the lot up etc. etc.
Mac deployment is relatively trivial too when you've got the right bits (just ask and I can give you the bits and bobs).
However I don't actually know how to do a Linux deployment coz I've not got linux :) Elias of Oddlabs might be able to help you there. I just use Webstart.
Cas :)
Ricardo C
09-05-2005, 12:07 PM
Thanks, Cas, I really appreciate it :) I'm going to try it out for myself and see how far along I can get before bugging you again ;)
Robert Cummings
09-05-2005, 02:17 PM
that blitzmax works on linux too. and the bonus is that you're developing on one platform for 3.
Ricardo C
09-05-2005, 02:42 PM
I know, and it will probably be my next purchase :) But I just thought it'd be cool to have a completely free package you could redistribute. I guess part of what's motivating this is that when I first became interested in making games, the pertinent information, although plentiful, was scattered to the four winds. The idea of an ISO image you can burn and end up with full-fledged OS and all the necessary tools to create a full game is very appealing to me, and I'd bet it would be a hit with newcomers, too.
GBGames
09-05-2005, 09:05 PM
I've been learning how to use the Kyra Sprite Engine. http://kyra.sf.net
That would be cool to include. When I was looking up C++ Game APIs, I came across Game Blade as well, but I don't remember why I decided to look more in-depth into Kyra over it.
Oh, and for editors, make sure you include vim, kate, and emacs to avoid upsetting someone in the editor wars. B-)
Ricardo C
09-06-2005, 12:52 AM
Kyra looks great! Thanks for bringing it up :)
As for the IDE wars... I think you're right. Wouldn't want to wake up next to a horse's head with a note from the emacs camp :D
vBulletin v3.6.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.