Menu

Linux Air Combat on Raspberry Pi: Success!

bbosen
2020-07-16
2025-04-28
  • bbosen

    bbosen - 2020-07-16

    I am amazed and very pleased at the result of today's experiment! I compiled Linux Air Combat V 8.28 (current as of this writing on 16Jul2020) on a brand new Raspberry Pi 4b. That 4 Gigabyte Pi arrived from Amazon.com yesterday, and I equipped it with 4 tiny little heat-sinks and a little tiny fan in a plastic case about the size of a deck of cards. I am under the impression that this is a very common configuration for a Pi. It had connectors to spare after I cabled it up to my 720p HDMI monitor, keyboard, mouse, and joystick, with a Wifi connection to the Internet.

    Compiling was trivial: After downloading and de-archiving the Lac08p28.tar.gz archive from the usual download area of our SourceForge pages, I fired up a "bash" shell and tried running "make" on a brand new Raspbian installation which had not as yet been supplemented with any optional software tools. As expected, the "make" attempt failed with a message about inability to obtain one of the "header" files associated with the well-known "FreeGlut3" library. Accordingly, I installed the development version of "freeglut3-2.8.1-3" from Raspbian's standard repository and tried "make" again.

    It went a little farther this time, but stopped with another error message demanding the development library for SDL 1.2. Accordingly, I installed "libsdl1.2-dev-1.2.15+dfsg2-4+rpt2" and tried "make" again.

    It went still farther before the next error message demanding the development library for SDL Mixer 1.2. Accordingly, I installed the development pack for "libsdl-mixer1.2-1.2.12-15" and tried "make" again.

    Success! After about 3 minutes, LAC was compiled without errors. From start to finish, including installation of the three free libraries mentioned above, I spent only about 15 minutes in this effort after I had the Pi running their standard "Raspbian" operating system. I continued with "make clean" to erase files I wouldn't ever need again, and then "./install.sh" to install it on my Pi.

    (The last time I had tried this was about 3 years ago, on a Raspberry Pi model 2. Compilation had been easy, but performance was disappointing: I got only about 2 or 3 frames per second and concluded that reasonable flight was hopeless, even at the lowest available resolution.)

    Holding my breath and not expecting adequate performance, I then used "cd" to get to my home folder and typed "./lac" to attempt execution.

    It started right up, sound effects poured forth from my HDMI monitor, and the animated splash-screen was smooth! I allowed myself a little bit of hope for an improved result.

    I chose the "Free Flight" mission for my initial test.... WOW! With the initial settings (640x480 resolution and detail level "0"), flight was silky smooth. Rolls and loops were inspiring. I could almost smell the exhaust of my P38 and feel the wind whistling through the seams of my canopy glass as I whisked past mountain peaks and runway tarmacs! Response to my joystick movement was instantaneous and delightful. The silky-smooth sensation of flight that generally characterizes LAC was immersive and overwhelming. At those initial settings, absolutely no compromise was apparent.

    I spent a few minutes tweaking the video effects and found that I could increase the level of detail up to "2" and still see silky-smooth frame rates of 60 FPS or better. On a scale from "0" to "5", a setting of "2" generates far fewer special effects than those obtained on more powerful machines at level "5", but it's entirely adequate and quite a bit prettier than the original "0" setting.

    I am absolutely THRILLED at the results. To see a flight simulator yielding this kind of performance on such an economical and compact computer is astonishing. The Pi 4b truly is "the little computer that CAN"!

    Continuing my exercises, I took took the Pi online in the biggest, baddest, heaviest of the ten online missions now supported by LAC: "Peabody's Mission". No problem! At graphic detail level "2" this little computer can mix it up with the Big Dogs! Every necessary dogfighting feature worked to my astonishment and absolute satisfaction.

    Bomber missions are going to be more of a challenge on the Pi, because those missions demand frequent access to "map mode", and I had found it necessary to diminish LAC's "view distance" down below "150" to enjoy the ultra-smooth flight I described above. At that low setting of "150", LAC's map mode covers the bottoms of trenches and valleys with a layer of fog, making use of the map less than fully satisfactory. (LAC automatically senses and recovers from this after about 5 seconds, temporarily increasing that "150" setting so that those ground features become visible, but the delay is disruptive, and for a few seconds after switching back OUT of map mode, the frame rate suffers until LAC automatically diminishes that "view distance" back down to the optimal "150" setting.) Even with those compromises though, bomber missions definitely CAN be enjoyable on this economical little computer.... pilots will just need to tolerate a few seconds of disturbance to their sense of immersion.

    I have not yet installed "Mumble" on the Pi. I'll try that soon and update this thread with the results. I'm understandably curious about the resulting frame-rate impact. If necessary, I will just run "Plumble" on my Android phone as my voice comms companion when flying the Pi.

    I did see one little bug: For some unknown reason, after every online flight, the IP address of LAC's server gets corrupted in the LacConfig.txt file. Fortunately, upon the next attempt to fly in an online mission, LAC's excellent run-time diagnostic messages displayed an excellent description of the problem and inspired a simple work-around: I just edited the LacConfig.txt file and restored the setting for "LacServer2.LinuxAirCombat.com". I made a backup copy of the corrected file that I named "LacConfig.bak.txt", and I copy that file back to LacConfig.txt before each online mission.

    I realize that's a less-than-ideal situation and I plan to dig into the source code that handles that LacConfig.txt file to prevent that error in the future, but for now, I'm going back to the thrilling skies of World War II combat in my flying Raspberry Pi!

    Cheers! ; )

    -Bob-

     

    Last edit: bbosen 2020-07-20
  • bbosen

    bbosen - 2020-07-18

    Here's a link to a YouTube video clip showing what LAC looks like on my brand new Raspberry Pi Model 4B (I believe this is the most powerful Raspberry Pi you can get at the time of this writing in July of 2020. Mine has 4GB of storage, but I have also been successful on the 2GB model and others have reported similar success on the 1GB model).

    https://youtu.be/0x1o3tyYgRc?list=PL1IYes9MY6lIlvyyMfGQ0BC75_u3v14tU

     

    Last edit: bbosen 2020-08-19
  • bbosen

    bbosen - 2020-07-19

    Here's a link to a 17-minute YouTube video clip showing, in real time, EXACTLY how I downloaded, compiled, linked, installed, configured, and ran Linux Air Combat V8.28 on my new Raspberry Pi 4b in July of 2020:

    https://youtu.be/XeYBhxb_yrk

    Update from 22Jul2020: That YouTube video documented compilation of a generic version of LAC, in use by many, many different LINUX platforms. Since its publication, I have produced a Raspbian version with some optimizations that fix a few tiny bugs that were apparent on the Pi. That published Raspbian archive includes a pre-compiled binary, so you probably won't even need to compile it. (Just run the "install.sh" script as described near the end of the video clip referenced above.)

    I can't be sure without further testing, but I am HOPING that the published binary will run immediately after downloading on a Raspberry Pi 4b with no need for any additional libraries or other tools. I suspect that the Pi's standard Raspbian operating system already provides all of LAC's prerequisites. (Of course, the new published archive also includes source code, and the compilation process continues to work as shown above, if you want to experiment.)

    Here's a link where the latest, greatest Pi download archive will hereafter be published:

    https://sourceforge.net/projects/linuxaircombat/files/Raspberry%20Pi%20Versions%20of%20LAC

    Cheers!

    -Bob-

     

    Last edit: bbosen 2020-07-22
  • bbosen

    bbosen - 2020-07-20

    The GOOD NEWS from 20Jul2020:

    This is FUN! LAC runs splendidly on my Raspberry Pi 4b under their standard "Raspbian" operating system. I've been successful with 4GB and 2GB versions of the Pi4b, and I got a report from a user that had success on a 1GB Pi too.

    I made a new LAC version with a few little tweaks to optimize performance on that hardware, and I published an experimental new LAC archive package with source code and precompiled executable in Raspbian's preferred "apk" format here:

    https://askmisterwizard.com/2019/LinuxAirCombat/Installers/index.htm

    The BAD NEWS:

    I had trouble getting Mumble to run properly on my Raspberry Pi. The Raspbian repository offers it according to the expected pattern, and installing it is very easy. However, at first I could not get any sound from it. Just total silence. I tried all of the configuration tricks I could think of via HDMI sound and/or via a headset plugged in to the Pi's tiny audio jack. Nothing. Nada. No sound at all, even after cycling through ALL of the myriad sound devices offered in Mumble's "Audio Wizard".

    Looking through the Raspberry Pi forums, I saw several references by people that seem to have had success with Mumble on the Pi3, and nobody else has complained about the problems I am seeing.... so I concluded that maybe it was just me????

    Anyway, I took another approach. I start using "Plumble" on my Android phone/tablet to communicate with other LAC players while I fly my little Raspberry Pi.

    I had to modify the source code for MissionNetworkBattle02.cpp to change the terrain from "Desert" to "High, dry Mountains", because that desert terrain looks really wonky on my Pi. The High, dry mountain terrain looks a bit different, but all of the terrain geography lines up properly, so the result is fully interoperable with other platforms playing that mission.

    I also had to make a tiny change in "conf.cpp" because it was corrupting the DNS name of the LinuxAirCombat.com server. That's all fixed in the published version referenced above.

    Please give this a try if you have a Raspberry Pi model 4b. Let me know how it works for you.

    I haven't yet announced this on the Raspberry Pi forums, but after I've exercised it a bit more I plan to take that step....

    ; )

     

    Last edit: bbosen 2020-08-19
  • bbosen

    bbosen - 2020-07-29

    Update from 28Jul2020:

    I discovered ways of getting Mumble working on my Raspberry Pi at least as far as HEARING audio traffic from other players. LAC on the Raspberry Pi is also good at directing Mumble to the appropriate Mumble channel on LAC's Mumble server, according to the same pattern in common use among LAC players on other LINUX platforms. Look for more details about how I did this in the "LAC on Raspberry Pi" forum here:

    https://sourceforge.net/p/linuxaircombat/discussion/laconraspberrypi/thread/65b4edb650/?limit=50#1a24

     
  • bbosen

    bbosen - 2020-08-19

    Update from 19Jul2020: I bought a low-cost USB microphone and used it succesfully with Mumble on my Raspberry Pi. The acoustic sensitivity isn't very good, so it was necessary to use a USB extension cable to move the microphone closer to me, but after that, audio performance is now adequate. Further details are available in LAC's adjacent Raspberry Pi forum.

     
  • bbosen

    bbosen - 2025-04-28

    I expanded our forums with one new forum totally dedicated to the Raspberry Pi. It includes postings about compiling and running LAC on Pi4b, Pi400, Pi5, and Pi500. LOTS of great information there. Here's a direct link to that forum:

    https://sourceforge.net/p/linuxaircombat/discussion/laconraspberrypi/

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.