UFO:Alien Invasion

Technical support => Mac => Topic started by: TwoADay on September 17, 2007, 12:47:09 am

Title: Getting Started (Mac OS X
Post by: TwoADay on September 17, 2007, 12:47:09 am
I can't start the game. I've unpacked the items, copied to my applications, and double-clicked. No dice. I tried launching via the Command Line. Here's what I got:

Adding game dir: ./base
Added packfile ./base/0base.pk3 (5 files)
Added packfile ./base/0maps.pk3 (388 files)
Added packfile ./base/0media.pk3 (5 files)
Added packfile ./base/0models.pk3 (874 files)
Added packfile ./base/0pics.pk3 (1730 files)
Added packfile ./base/0snd.pk3 (121 files)
Added packfile ./base/0ufos.pk3 (63 files)
using /Users/xxx/.ufoai/2.1.1/base for writing
Adding game dir: /Users/xxx/.ufoai/2.1.1/base
execing default.cfg
couldn't exec config.cfg
execing keys.cfg
Hostname: xxx-computer.local
IP: 192.168.0.100
..added 3 maps to the mapcycle
...could not set to language: en
...could not set to system language
Console initialized.

------- sound initialization -------
Loading snd_sdl sound driver
...library search path: '.'
Soundsystem: SDL.
SDL version: 1.2.9
SDL audio driver is "coreaudio".
Bits: 16
Frequency: 48000
Samples: 4096
Channels: 2
sound sampling rate: 48000
------- Loading ref_sdl.dylib -------
LoadLibrary ("./ref_sdl.dylib")
ref_gl version: GL 0.12
setting mode 6: 1024 768
SDL version: 1.2.9
SDL audio device shut down.
recursive shutdown
Error: (SDLGL) SDL SetVideoMode failed: Error setting OpenGL fullscreen: invalid drawable


Am I missing something else here? I'm running a MacBook Core Duo, 2 Ghz, 1 GB RAM. Thanks for any help you all might provide.
Title: Re: Getting Started (Mac OS X
Post by: Mattn on September 17, 2007, 08:51:28 am
it's only a guess, but your sdl version is quite old - 1.2.12 is the latest, try to update (you need at least 1.2.10)
Title: Re: Getting Started (Mac OS X
Post by: Mattn on September 17, 2007, 08:58:06 am
btw. it would be cool if you could maybe also test the latest version that is in our source repository (svn)

we are close to a new version. but we need more mac testers to ensure, that the game is working on this plattform, too
are you using a ppc or intel mac?
Title: Re: Getting Started (Mac OS X
Post by: Mattn on September 17, 2007, 10:25:20 am
information on how to compile for macos: http://ufoai.ninex.info/wiki/index.php/Compile_for_Mac
Title: Re: Getting Started (Mac OS X
Post by: TwoADay on September 18, 2007, 12:05:42 am
btw. it would be cool if you could maybe also test the latest version that is in our source repository (svn)

we are close to a new version. but we need more mac testers to ensure, that the game is working on this plattform, too
are you using a ppc or intel mac?

Thanks for the response. I'm using an intel mac. I'd be up for helping the testing process, although I must admit that I don't have much experience in testing open-source software, so my ability at compiling code is...non-existent, essentially.  Additionally, I don't have a whole lot of free time, so my usefulness as a tester may be limited, since I would only have time to play for a couple hours a week (likely about 2 to 4, but if I find the game very addicting, I could probably sink up to 10 a week)

I'll try to find a more up-to-date build to run. Thanks again. Send me a PM if you're still interested in having me do some testing.
Title: Re: Getting Started (Mac OS X
Post by: Mattn on September 18, 2007, 09:23:30 am
if you need help with compiling, let us know. because if there are still questions open, the wiki article could need more work => thus ask everything that is unclear. then we can help you and update the wiki article, too
Title: Re: Getting Started (Mac OS X
Post by: TwoADay on September 23, 2007, 03:54:54 pm
Sorry about the late reply: I looked at the directions page on the wiki. At the top, it says it doesnt work at this time... :-\

Even then however, I would need more detailed instructions pretty much across the whole process than what is detailed on that page.

I also looked around for a more recent build, and didn't find one on sourceforge - unless Im supposed to download more than one file, which would explain a lot. There seems to be a bunch of things listed on sourceforge, but it isn't too clear what things are needed, and what's included in the ufoai-2.1.1_macosx_installer.

Thanks for the help and such, I'm truly interested in getting this running, but as I've said before, I don't really have too much time to try out and figure things out.
Title: Re: Getting Started (Mac OS X
Post by: Mattn on September 23, 2007, 08:09:33 pm
well, you have to get the svn trunk checkout and install the macports and the needed libs that are shown in the above listed wiki article

the just run
Code: [Select]
./configure --with-openal=no
make

that should be all to run the game
Title: Re: Getting Started (Mac OS X
Post by: alexis on September 28, 2007, 11:51:04 pm
Hi,

I have a mac ppc (Mac OS 10.4.10.)
I have succeeded in compiling UFOAI but I had to make some workarounds (symlinks, in fact) to have some OpenGL headers files been found (on a mac they are located in /System/Library/Frameworks/OpenGL.framework/Versions/A/Headers). I may also have installed additional libraries from different sources (SDL, OpenAL, well I don't remember... but not systematically installed with macports.)


Title: Re: Getting Started (Mac OS X
Post by: Mattn on September 29, 2007, 12:36:23 am
that's great news - the menus are working for you?

we still have an endian bug in our Grid_* functions - you can't walk to any level bigger than 1 - the cursor just disappears. I don't have an big endian system around here to test and fix thing, would be nice if you could maybe have a look. We definitly need more mac users and maybe (if you have the time) developers.
Title: Re: Getting Started (Mac OS X
Post by: alexis on September 29, 2007, 06:30:52 pm
Yes, the menus are working.
I can launch a game, and the interface (geoscape, bases, equipment, etc.) seems to work.

I have compiled some few maps and I have launched africa04d from the console. Then I got this error:
ERROR: Grid_CheckForbidden: unknown forbidden-size: 0
In fact, when I read static qboolean Grid_CheckForbidden in cmodel.c, I don't understand the following line:
forbidden_size = *(p + 1);
because there is a test y == (*p)[1] two lines later, "y" can't be the same as "forbidden_size"...

I have launched UFOAI with Shark, the profiling tool from Apple. On my machine, the most time-consuming functions called during the geoscape display are S_RawSamples (4.6%), Q_strncmp (3.6%), ShortSwap (1.5%), and R_FindImage (1.4%).  NB: Q_strncmp is simply a call to strncmp: you should #define or inline it, or directly call strncmp...

How can I use rsync instead of recomputing all maps? (btw: are maps byte-order independant?)
I tried this:
sudo rsync -avz rsync://mattn.ninex.info/ufo base/maps/
@ERROR: Unknown module 'ufo'
Title: Re: Getting Started (Mac OS X
Post by: Mattn on September 29, 2007, 10:05:57 pm
rsync is currently not working, please try to download the mappack from http://mattn.ninex.info - it's up-to-date right now.
Title: Re: Getting Started (Mac OS X
Post by: Mattn on September 29, 2007, 10:09:46 pm
maps are working on every plattform, they are all stored in little endian and converted at run time. just the checksum may differ if you compile the maps on different architectures - because they are using floating points, which of course differ from plattform to plattform. but using the mappack is safe

i will look into the grid_checkforbidden thing tomorrow

S_RawSamples is called from the sound renderer thread, btw.
Title: Re: Getting Started (Mac OS X
Post by: alexis on September 29, 2007, 11:32:39 pm
I can confirm that forbidden_size is badly handled in Grid_CheckForbidden: if I replace switch(forbidden_size) with switch(1) (which is the expected value), it works.

I have tested a map, and there is still two big problems (that were already there on 2.1):
- the mouse can't access some cells (I saw this on levels bigger than 1, but this is not the case for all the cells of such levels). In fact, the blue or green box isn't displayed on those cells, but soldiers and aliens can go there.
- soldiers and aliens can see thru walls, so aliens spend their reacting time to shoot on walls in direction of the soldiers, and sometimes kill themselves this way.

I have launched UFOAI in debug mode and I think I have found something concerning the first bug. Consider this part of code in CL_ActorMouseTrace:

   restingLevel = Grid_Fall(&clMap, testPos, fieldSize);
   /* hack to prevent cursor from getting stuck on the top of an invisible
      playerclip surface (in most cases anyway) */
   PosToVec(testPos, pA);
   VectorCopy(pA, pB);
   pA[2] += UNIT_HEIGHT;
   pB[2] -= UNIT_HEIGHT;
   CM_TestLineDM(pA, pB, pC);
   VecToPos(pC, testPos);
   restingLevel = min(restingLevel, Grid_Fall(&clMap, testPos, fieldSize));

When the bug occurs, the ending restingLevel value is 0 (the first Grid_Fall call returns 3, which is correct). This explains why no cursor box is displayed. I don't have the time to look further, but I hope this can help.