Building FLAT

Building FLAT

Postby MCMic » 28 Jul 2012, 16:17

Hello,

I wanted to test FLAT which was featured on the blog : http://freegamer.blogspot.fr/2012/07/fl ... ps-is.html

I pulled the git, installed allegro, executed the gcc command from the INSTALL text file, I got no errors and a FLAT binary appeared in the out folder, but when I launch it, nothing happens…
Not a window, not a word, not a sound, nothing, it does not end up either, it just runs…

Any idea about how to get something out of it?
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: Building FLAT

Postby Cheeseness » 29 Jul 2012, 07:55

Hi there!

My name is Cheese and I'm one of the original developers of FLAT. I've had one other person mention something similar. Strace suggested it may have been pulse related, but I wasn't able to resolve the issue for them. Interestingly, they were able to get the 32 bit post-7dfps release build that I compiled running.

The 7dfps.org website is currently down, but here's a link to our last build with bundled libraries if you'd like to test that (the source hasn't had any notable changes since then). It's 32 bit because I don't have a 64 bit OS ^_^

If you are able to track down the cause of your problem, I'd be keen to know what it is and implement any workarounds we can find :)
User avatar
Cheeseness
 
Posts: 11
Joined: 29 Jul 2012, 07:13
Location: Australia

Re: Building FLAT

Postby MCMic » 30 Jul 2012, 16:17

Same thing with your binary, it does nothing.
What do you mean by "pulse related" ? pulse audio? (That can't be it because I only use ALSA for handling sound)
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: Building FLAT

Postby Cheeseness » 30 Jul 2012, 16:30

Interesting! Which script were you using to launch it?

Yeah, the other person's strace mentioned pulseaudio stuff, but the pastebin has since expired and I haven't been able to get in tough with them again.

SteelRaven7 (one of the other FLAT developers) suggests that this could be caused by having the devel packages installed but not the libraries themselves.
User avatar
Cheeseness
 
Posts: 11
Joined: 29 Jul 2012, 07:13
Location: Australia

Re: Building FLAT

Postby MCMic » 30 Jul 2012, 17:15

Hum, I was launching the binary it self.
I tried flat_libs.sh, it said ./FLAT: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
I got :
/usr/lib/libpng.a
/usr/lib/libpng.so
/usr/lib/libpng15.a
/usr/lib/libpng15.so
/usr/lib/libpng15.so.15
/usr/lib/libpng15.so.15.11.0


I tried flat_nolibs.sh, it did the same as the binary, launching but doing nothing.
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: Building FLAT

Postby Cheeseness » 30 Jul 2012, 17:30

I guess I should have bundled libpng as well (this is one of the reasons I was keen to open source) >_<

The big problem is that we don't have much error handling. I'm guessing that allegro is failing early on in its initialisation and it's not outputting anything, allowing the app to exit normally.

Are you familiar with using strace or gdb?

I'm about to head to bed for the evening, but I normally hang out in #FLAT on freenode.net. If you need, we can try to work through the problem and see how far we get.
User avatar
Cheeseness
 
Posts: 11
Joined: 29 Jul 2012, 07:13
Location: Australia

Re: Building FLAT

Postby MCMic » 30 Jul 2012, 17:39

I'm familiar with gdb, not strace.
But I usually use gdb when a program crashes, this one is not ^^

You should have better error handling (at least it should yell something at me).
Regarding dependencies, I'm using ArchLinux, and not all allegro things in the README were in the packages so I guessed the missing ones were bundled in the main package. But maybe some are missing. (though I think the g++ line would have fail if some of the -l options were not found)
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: Building FLAT

Postby qubodup » 30 Jul 2012, 17:51

I'm on arch as well and all I needed was allegro (v5), the other allegro stuff is included in that package, I believe.

EDIT: I'm now testing on my 32bit (Arch Linux) netbook from git and nothing seems to happen (no window, no error message). I'm on a 1024x600 screen and I can imagine that the screen resolution is the reason for the 'freeze'.

EDIT: I replaced all three occurrences of "1280" with "1024" (and in the same lines 720 with 600) and recompiled but the problem remains.
User avatar
qubodup
Global Moderator
 
Posts: 1671
Joined: 08 Nov 2009, 22:52
Location: Berlin, Germany

Re: Building FLAT

Postby MCMic » 30 Jul 2012, 18:02

Backtrace for gdb (I used ctrl+C after waiting a long time)
#0 0xb7fdd424 in __kernel_vsyscall ()
#1 0xb7c989d0 in ppoll () from /lib/libc.so.6
#2 0xb78960db in pa_mainloop_poll () from /lib/libpulse.so.0
#3 0xb7896889 in pa_mainloop_iterate () from /lib/libpulse.so.0
#4 0xb7edcb1d in ?? () from /lib/liballegro_audio.so.5.0
#5 0xb7ed4721 in ?? () from /lib/liballegro_audio.so.5.0
#6 0xb7ed46c2 in ?? () from /lib/liballegro_audio.so.5.0
#7 0x08062e2f in GraphicsManager::initialize (this=0x8080328, resx=1280, resy=720) at src/GraphicsManager.cpp:89
#8 0x08062b15 in GraphicsManager::GraphicsManager (this=0x8080328, _resx=1280, _resy=720) at src/GraphicsManager.cpp:29
#9 0x08058825 in Game::initialize (this=0x807bc40) at src/Game.cpp:190
#10 0x080633e9 in main (argc=1, argv=0xbffff2a4) at src/main.cpp:32


PS: Oh, and I'm using a 32bits system

[EDIT] the trace above is done with the git version, built with g++ -g
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: Building FLAT

Postby qubodup » 30 Jul 2012, 18:05

MCMic what screen resolution and graphics driver do you use?

On my netbook (FLAT does not run) I have 1024x600, intel graphics (open source), ALSA.
On my desktop (FLAT runs) I have 1920x1200, ati graphics (open source), PulseAudio (yes!)

EDIT: gdb on my netbook (after having applied with 1024x600 in the source)...
{l Code}: {l Select All Code}
$ gdb ./FLAT
GNU gdb (GDB) 7.4.1
This GDB was configured as "i686-pc-linux-gnu".
Reading symbols from /home/qubodup/src/git/FLAT/out/FLAT...(no debugging symbols found)...done.
(gdb) r
Starting program: /home/qubodup/src/git/FLAT/out/FLAT
warning: Could not load shared library symbols for linux-gate.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
[New Thread 0xb7341b40 (LWP 1736)]
^C
Program received signal SIGINT, Interrupt.
0xb7fdd424 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fdd424 in __kernel_vsyscall ()
#1  0xb7c929d0 in ppoll () from /lib/libc.so.6
#2  0xb79250db in pa_mainloop_poll () from /lib/libpulse.so.0
#3  0xb7925889 in pa_mainloop_iterate () from /lib/libpulse.so.0
#4  0xb7ed6b1d in ?? () from /lib/liballegro_audio.so.5.0
#5  0xb7ece721 in ?? () from /lib/liballegro_audio.so.5.0
#6  0xb7ece6c2 in ?? () from /lib/liballegro_audio.so.5.0
#7  0x08062df7 in GraphicsManager::initialize(int, int) ()
#8  0x08062add in GraphicsManager::GraphicsManager(int, int) ()
#9  0x080587ef in Game::initialize() ()
#10 0x080633b1 in main ()


EDIT2: I tested 2012_06_24_FLAT_windows.zip on a friend's 5 years old netbook by Medion (might be a in-Germany trademark) MD 97160 with N270 Intel Atom 1.60GHz, 1GB RAM, Win XP Home Edition Version 2002 Service Pack 3 at 1024x600 (apparently 1024x768 is supported by the screen/driver but I didn't use it).
The game window starts, inside the screen is only black. The window seems moved to the left/top (can't see window manager controls) and music plays. After a few seconds, audio in a da-da-da fashion and I see a no-explanation windows "problem" window (do you want to report this?). The music keeps playing without problems though.
User avatar
qubodup
Global Moderator
 
Posts: 1671
Joined: 08 Nov 2009, 22:52
Location: Berlin, Germany

Re: Building FLAT

Postby MCMic » 30 Jul 2012, 18:17

I have 1440x900.
I use catalyst from here : http://aur.archlinux.org/packages.php?ID=59996
I use ALSA for the sound and I did not know I had libpulse installed ^^
I seems to be required by a lot of things (including allegro)
Maybe allegro is only compliant with systems running pulseaudio :(
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: Building FLAT

Postby Cheeseness » 31 Jul 2012, 13:45

qubodup {l Wrote}:gdb on my netbook (after having applied with 1024x600 in the source)...
{l Code}: {l Select All Code}
$ gdb ./FLAT

This looks to be the same trace that the other person showed me. I'm guessing that the problem is likely to be occurring when the audio addon is initialised in GraphicsManager.cpp (this is now line 94). I've updated the source to have a few more outputs during startup. It's not really going to solve this problem, but at least it will be outputting something >_<

qubodup {l Wrote}:The game window starts, inside the screen is only black. The window seems moved to the left/top (can't see window manager controls) and music plays. After a few seconds, audio in a da-da-da fashion and I see a no-explanation windows "problem" window (do you want to report this?). The music keeps playing without problems though.


If you're inclined, feel free to report it. I don't have access to a Windows machine to test with, so it'd be up to somebody else to attempt to sort that out.
There was somebody who commented on the 7DFPS profile for FLAT who said that they had had a problem (it may have been similar - I can't check at the moment as they've exceeded their bandwidth), but we weren't able to get much in the way of details.

qubodup {l Wrote}:On my netbook (FLAT does not run) I have 1024x600, intel graphics (open source), ALSA.
On my desktop (FLAT runs) I have 1920x1200, ati graphics (open source), PulseAudio (yes!)

MCMic {l Wrote}:Maybe allegro is only compliant with systems running pulseaudio :(


Interesting. If this is the case, that's pretty sad (I haven't been able to find much indication of that on the Allegro site, though) :(
User avatar
Cheeseness
 
Posts: 11
Joined: 29 Jul 2012, 07:13
Location: Australia

Re: Building FLAT

Postby MCMic » 31 Jul 2012, 18:12

Yep, I'm getting:
{l Code}: {l Select All Code}
$ ./out/FLAT
Initialising Allegro...
Initialising Allegro primitives addon...
Initialising Allegro image addon...
Initialising Allegro font addon...
Initialising Allegro TTF addon...
Initialising Allegro audio addon...
^C
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: Building FLAT

Postby qubodup » 31 Jul 2012, 21:57

Also stops after "initialising allegro audio addon here.

It might be just faulty ALSA drivers being shipped with Arch Linux at the moment.

http://www.allegro.cc/forums/thread/610454 seems to be related.
User avatar
qubodup
Global Moderator
 
Posts: 1671
Joined: 08 Nov 2009, 22:52
Location: Berlin, Germany

Re: Building FLAT

Postby Cheeseness » 01 Aug 2012, 07:55

qubodup {l Wrote}:Also stops after "initialising allegro audio addon here.

It might be just faulty ALSA drivers being shipped with Arch Linux at the moment.

http://www.allegro.cc/forums/thread/610454 seems to be related.


Hmm, doubly interesting!

Does the workaround here help? http://www.allegro.cc/forums/thread/610415

Create a file called allegro5.cfg in the same folder as the FLAT binary, and add the following
{l Code}: {l Select All Code}
[audio]
driver=openal
User avatar
Cheeseness
 
Posts: 11
Joined: 29 Jul 2012, 07:13
Location: Australia

Re: Building FLAT

Postby MCMic » 01 Aug 2012, 16:50

Cheeseness {l Wrote}:Does the workaround here help? http://www.allegro.cc/forums/thread/610415

Create a file called allegro5.cfg in the same folder as the FLAT binary, and add the following
{l Code}: {l Select All Code}
[audio]
driver=openal

After creating the file I got this:
{l Code}: {l Select All Code}
$ ./FLAT
Initialising Allegro...
Initialising Allegro primitives addon...
Initialising Allegro image addon...
Initialising Allegro font addon...
Initialising Allegro TTF addon...
Initialising Allegro audio addon...
Failed to initialize audio addon!
Setting normal state.
Erreur de segmentation
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: Building FLAT

Postby MCMic » 01 Aug 2012, 16:52

Oh wait, it works with driver=alsa :)
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: Building FLAT

Postby MCMic » 01 Aug 2012, 16:59

This is real hard. Any way of changing the controls? I got an azerty keyboard.
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: Building FLAT

Postby Cheeseness » 01 Aug 2012, 17:58

Yay, glad we got somewhere (and that we have at least partial identification of the issue at hand)!

MCMic {l Wrote}:This is real hard. Any way of changing the controls? I got an azerty keyboard.


There's an issue on github for moving keybindings out to a config file (I can't put an estimate on when that might happen), but in the meantime, you can adjust the values in Game.cpp from line 33 to match ones that fit better with your layout (here's an Allegro keyboard reference).
User avatar
Cheeseness
 
Posts: 11
Joined: 29 Jul 2012, 07:13
Location: Australia

Re: Building FLAT

Postby qubodup » 02 Aug 2012, 22:28

I made it! (latest git)

During the battle against the D***** I had the feeling that I was running into invisible walls all the time and I didn't have enough feedback on whether I was hitting the target or making any damage. Maybe I should have paid more attention to the length of the "chain" though.

The D*****'s push attacks were mostly helpful in getting away from the enemy skaters. Funny.

There should be a sound for when you jump. A slightly modified skate sound should do it. Otherwise you never get a "feel" for jumping I think.

The end should have a many-particles explosion of the D*****! :) Bam boom bang!
User avatar
qubodup
Global Moderator
 
Posts: 1671
Joined: 08 Nov 2009, 22:52
Location: Berlin, Germany

Re: Building FLAT

Postby Cheeseness » 03 Aug 2012, 01:01

qubodup {l Wrote}:I made it! (latest git)

Awesome :D

qubodup {l Wrote}:During the battle against the D***** I had the feeling that I was running into invisible walls all the time and I didn't have enough feedback on whether I was hitting the target or making any damage. Maybe I should have paid more attention to the length of the "chain" though.

Yeah, there's a bug with invisible crystals. You can skate around them, but if you don't know that, you think you've reached the edge of the level >_<

qubodup {l Wrote}:There should be a sound for when you jump. A slightly modified skate sound should do it. Otherwise you never get a "feel" for jumping I think.

That's a great idea :)

qubodup {l Wrote}:The end should have a many-particles explosion of the D*****! :) Bam boom bang!

That'd be pretty neat too :D
User avatar
Cheeseness
 
Posts: 11
Joined: 29 Jul 2012, 07:13
Location: Australia

Re: Building FLAT

Postby Cheeseness » 12 May 2013, 13:54

Just a quick follow up on the audio issues mentioned earlier. We've gotten some reports from Arch users that this no longer seems to be a problem (with Arch's rolling release stuff, it's difficult to identify what may have fixed it and when).

Also, FLAT has been ported to the Open Pandora handheld thingy. How cool is that?
User avatar
Cheeseness
 
Posts: 11
Joined: 29 Jul 2012, 07:13
Location: Australia

Re: Building FLAT

Postby MCMic » 12 May 2013, 17:56

Audio problem seems fixed. We still can't set controls?
Also, using cmake with some install instruction would allow us to package it.
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: Building FLAT

Postby Cheeseness » 12 May 2013, 22:29

MCMic {l Wrote}:Audio problem seems fixed.

Great, thanks :)

MCMic {l Wrote}:We still can't set controls?

I'm afraid not. I haven't had any time for development since the last release, and nobody has stepped up in the meantime to contribute those kind of features. That and a main menu/game reinitialisation are probably highest on my priority list when I do have time, though.

MCMic {l Wrote}:Also, using cmake with some install instruction would allow us to package it.

I've never done any distro specific packaging, and don't have much familiarity with cmake. What is it about cmake that would make that sort of thing easier than other build systems?
User avatar
Cheeseness
 
Posts: 11
Joined: 29 Jul 2012, 07:13
Location: Australia

Re: Building FLAT

Postby MCMic » 14 May 2013, 20:55

Any build system that allows an installation is OK, cmake is just the one I know about.
I don't know for other package systems, but for arch, building the package is like installing in a folder.

With cmake I just do something like:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr . && make && make install DESTDIR=mypackage/
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Who is online

Users browsing this forum: No registered users and 1 guest