Author Topic: FS2_Open Linux Mini Howto  (Read 77606 times)

0 Members and 2 Guests are viewing this topic.

Offline bKtHeG

  • 25
    • http://www.rtk-games.net
The best would be sending it to me via email but uploading it somewhere would be ok too.

Regarding the userdir creation: I think the code allready did this before...

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Alright, I'll make the patch and send it your way.

As far as the userdir thing it wasn't created explicitly but only as a by-product of CFILE (cfwrite will create leading directories) that I can see.  I added this to main() in the icculus.org stuff to avoid a couple of problems (cmdline, some osregistry stuff) that I may or may not have delt with since then, I don't really remember.  Either way it was just a safety catch to guarantee that the directory existed first thing before any code tried to access it.

FSO doesn't handle the command line the exact same way as the icculus.org code (which is more like the original) so it may not ever have any of the same issues.  I have already changed the cmdline code once to fix a weird (and obvious) memory error that I introduced and to fix the problem of single args and double args getting mixed up.  I didn't port osregistry to CFILE until after the userdir code was working and that was because it was going to be easier in the long run and to fix numerous crashes to came up once userdir was added.

I still don't know the FSO code that well so if it's not needed feel free to take it out.

 
One word.  DVD.
For great justice.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
a): that isn't one word it's three letters, each of wich stand for a diferent word
b): what does that have to do with the Linux build
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline bKtHeG

  • 25
    • http://www.rtk-games.net
New version: here

Changes:
* Last cvs version
* auto-language detection (taylor) - this is a really nice thing. My german version now works for the first time (before this no fs2_open version was able to display all characters)
* cmdline.cfg is now loaded from the home-config-dir (taylor)
* The user directory is created automatically (taylor)
* Fullscreen support (taylor)
* Default config values (taylor)
* -ng (nograb) changed to -nograb
* started working on some changes to bmpman (using devIL for loading). But this is unuseable at the moment (extremly early stage)

I think these are all changes. Somebody should correct me if something is missing.

 

Offline Xyzop

  • 23
Hello, this is my first post ever at HLP.

I just built fs2_open in linux today and plays okay, no crashes so far.

I noticed something with the afterburners. It doesn't deplete the afterburner "fuel". I'm not sure if this known or not or if this is related to the other afterburner bug.

Also, most of the models seem really bright. I'm not sure if I need an extra VP file or not. Please yell at me if I should RTFM.

I'm curious if avifile could be used to play the movie avi files for this linux port.

Thank you for a really nice port! You guys are doing a nice job!

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Xyzop:  The afterburner thing is a bug.  I had forgotten about fixing this previously and had deleted the changes when I installed the previous source release and forgot to tell bKtHeG.  Oops.  :D

Anyway, for the fix edit code/ship/afterburner.cpp line 370 and change:
if (objp != Player_obj) {
to
if (objp == Player_obj) {

That should get things working again.  If it doesn't work for you let me know.

The models are bright to me too but I think it's just some incomplete parts of the OpenGL code.  Though it could just be that I need to RTFM too so maybe someone else can give a definite answer.

For the movies I'm looking at avifile and libxine at the moment.  libxine actually has a MVE decoder which is a plus, though it hasn't ever decoded anything correctly for me (which sort of invalidates the plus).  Another plus for libxine is that it can render to various backends (SDL and an alpha/beta OpenGL) which should make it easier to play movies in-game without having to switch back to the desktop to play.  I haven't looked at avifile in a while so I don't know it's current capabilities.  It's on my list to look at both of them though and figure out which would be easiest to implement and maintain long term.

 

Offline Xyzop

  • 23
Cool, afterburners working fine now.

Ok, I'll try looking into the opengl code. I have some experience with opengl code. I seem to remember having a similar problem with a project I was working on. I've also just noticed when flying through the nebula (around the 4th or 5th mission), the nebula texture(s) do not scale correctly. Maybe mipmapping is not enabled. The Aquitane looks pink too.

Yeah, xine doesn't play the MVEs correctly for me either. I think there is some preliminary MVE decoding code in the icculus.org code. However, I'm not sure about the legality of it. Avifile should work fine. It renders through SDL but not OpenGL.

 

Offline Xyzop

  • 23
Oh, I just found this thread about the media VPs. It does seem to fix the brightness for most of the models. However, some models seem to suddenly get really bright when closing in on them. So apparently it's not really an opengl issue.

I'm still looking into the nebula issue(s).

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
I've got very little OGL experience so if you can do anything to help that would be great.  Another OGL problem you may want to look into as well is the line and shade code which is mainly used in the help.  Grab the icculus.org, go to the mainhall and hit F1, then try the same thing in FSO and you'll see what I mean.

I've reworked the MVE code for icculus.org to render to OGL which makes it *much* faster and fixed a lot of memory problems.  It's been ported to CFILE to make it easier to find the movies and numerous decoder bug fixes have been made.  This isn't in icculus.org CVS yet because it still lacks some audio code.  Currently I've gotten all of the OpenAL code in except for a way to manage the audio buffers that are needed (10, 9K buffers to work correctly).  It's on my list of things to do.  I'm not sure about the legality either but it's been in public CVS for over a year and a half without protest so we'll see.

I downloaded the new avifile version so I'll take a look at it.

 

Offline Xyzop

  • 23
:( I can't find the problem with the main hall help. The line and shade code look almost identical. Maybe the problem lies elsewhere. I'll keep investigating.

Oh, I just noticed that some ships have infinite afterburners. It's hell trying to keep up with super fast shivans :p

The nebula looks a little better if I turn up the nebula detail, but it's still a little blocky.

EDIT: (typo)
« Last Edit: November 23, 2003, 03:00:47 pm by 1543 »

 

Offline Xyzop

  • 23
I finally figured out what was going on with the help stuff. Apparently there is a check to see if a texture is cached in the gr_opengl_tmapper_internal_* functions. If it's not cached, then it returns. Since textures are not used when drawing the lines and the shading, it would "return" way before attempting to draw the lines and shading. Checking to see if the flag TMAP_FLAG_TEXTURED is enabled before checking for a cached texture allows the lines and shading to be draw.

I should have a patch ready after I take out my debugging mprintf's.

So is email the way to send patches here?

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Awesome!

You can e-mail patches to me ([email protected]) if you want and I'll send them to bKtHeG.  Beyond that I'm not sure what to do with them yet (Bobboau?).  A quick brain fart and I seem to remember a link to a bugzilla around here somewhere if you want to try and find that.  I probably need to take a look at the bugzilla as well.

Some of my patches, like this one, aren't all that Linux related so I'm not sure if bKtHeG really wants them.  I've fixed a couple of little crash bugs (like when sound is disabled) and quickly modified the movie player to search for movies with cf_find_file_location() so that the movies don't have to be in the current directory.  And on the topic of movies I do think that avifile looks the best at this point.  It looks like it can work a lot like the icculus.org MVE player by decoding a single frame and passing it on to a video handler which displays it (using SDL in libmve and OpenGL in my current icculus.org version).

 

Offline Xyzop

  • 23
Here's the link for the fs2 scp bugzilla page:
http://fs2source.warpcore.org/bugzilla/index.cgi

 

Offline Xyzop

  • 23
Oh, if you do get something going with avifile, I'd be happy to test it. :D

 

Offline tr909

  • 24
Taylor, reading this thread and seeing your posts here: does this mean that your freespace2 work is focussing more on freespaceOpen now? (instead of the icculus.org version) And does this mean the Mac version (tigital) might also include the FreeSpaceOpen engine?

  

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
tr909:

My primary focus is still icculus.org for now.  Since the icculus.org port is mostly just a port of the original game and not full of enhancements like FSO there is an end to it.  The icculus.org project is literally missing 2 or 3 portions of code before all of the todo list items are completed.  All of the missing parts are a least started by myself or tigital and we are working together to get everything done faster.

Those parts that are missing though are the same ones that FSO needs so I'm working on the code for icculus.org and then spending a few minutes to get that same code working in FSO.  The largest block of unfinished code in the icculus.org project is the audio streaming code but it has been started.  When all of my current code is done and in icculus.org CVS then I am going to focus all of my attention on FSO.

tigital is getting ready to release beta3 of the OSX code and if that goes as well as I think it will I believe he is going to get it into icculus.org CVS.  After that he does want to work on FSO as well so I'm guessing that he is going to be around here a bit more.  If he ends up not having enough time to get the OSX version working for FSO then I'll bring the code over and get it working.

 

Offline Xyzop

  • 23
bKtHeG: I think I found a way to get the DXTC format (e.g., DXT1,DXT3,DXT5) from DevIL using:
Code: [Select]
ilGetIntegerv(IL_DXTC_DATA_FORMAT,&dxtc_format);
then check if 'dxtc_format' equals IL_DXT[1,3,5] and set 'type' accordingly.

Also there is a small typo in code/bmpman/bmpman.cpp, line 1082:
Code: [Select]
#ifndef USE_DEVL

I haven't tested fs2open with DevIL enabled yet. I'll give it a try later.

 
libxine's MVE stuff probably doesn't work because it's based on the old 8bpp movie code used in d2x.  The only non-Interplay code I know of that plays 16bpp MVEs (like FS2 uses) is in the icculus.org CVS.  It required some moderately significant changes.

libxine for MVE would be an ok way to go for people that have a configure script.

 

Offline Azoele

  • 24
    • http://LorenzoDelPace.tripod.com
Can't geto fs2 to compile with pthread error
/usr/lib/libopenal.a(posixthreads.o)(.text+0x1e0): In function `Posix_AtForkThread':
threads/posixthreads.c:109: undefined reference to `pthread_atfork'
collect2: ld returned 1 exit status
make[1]: *** [fs2] Error 1
make[1]: Leaving directory `/home/azoele/Desktop/fs2_open/code'
make: *** [all-recursive] Error 1


This is the errores I get.
I got openal from CVS and compiled/installed it, and this is the only error I get...

Anybody's got a clue? I can't wait to play FS2 on Linux with audio, since the Win version keeps giving me memory errors either with stock executable and with FS2Open.exe 3.5.5...

Thanks,

Lorenzo
"Talk sense to a fool and he calls you fool" Euripide