Menu

A few issues

2018-07-12
2018-10-07
  • Lucio Crusca

    Lucio Crusca - 2018-07-12

    I used to play GL-117 several years ago. Now I've tried LAC.
    It generally works, but I've encountered a few issues:
    1. When using the menù, it stutters a lot and warns about low fps, to the point it's nearly unusable and even moving the mouse pointer is a pain, however my hardware is way more than enough (AMD FX 8350 CPU with RX 580 GPU). When playing fullscreen in FHD resolutions, it works at 60fps sustained with all quality settings maxed out.
    2. Playing with a joystick, it does not prevent the screensaver to start under XFCE, and when the screensaver starts the game switches from fullscreen to windowed (but same resolution as fullscreen) and it becomes unresponsive. kill -9 is the only way to terminate it.
    3. The only difficulty level I could select was "realistic", no mouse click ever changes it.

    Aside from that, thanks for the good work and keep it up!

     

    Last edit: Lucio Crusca 2018-07-12
  • bbosen

    bbosen - 2018-08-06

    Hi Lucio. Thanks for this report.

    Which version of LAC were you using when you documented these three problems?

    Your item "1." has been reported by two other players, and both are using AMD processors. I haven't been able to track this down yet, perhaps because all 14 of the computers in my lab are using Intel processors. Both of the other players that reported this problem are simply "living with it". They report that it makes the menus cumbersome, but that they are still able to use and enjoy the sim. I really want to fix this problem but I haven't been able to duplicate it in my lab yet. Perhaps I will be able to borrow an AMD machine for further research. Question: are you still able to get GL-117 to run on the same computer you used with LAC? And did GL-117 also suffer from that "stuttering" in the menus?

    Your item "2" has not been reported by anybody else. I don't know how to prevent launching a screensaver under XFCE. Maybe I will learn how to do this in the future, but if anybody reading this can help with relevant information, I would really appreciate some help. In the meantime, I see no alternative other than to temporarily disable that XFCE screensaver. It looks like that's what you have been doing. How difficult is that?

    Your item "3" is an intentional part of the design. The only supported difficulty level is "realistic". I realize I should make this more clear in the menus. I hope to get to this in the near future (it is documented in the web site).

    -Bob-

     
  • Lucio Crusca

    Lucio Crusca - 2018-08-26

    Hi Bob,

    Item 1: so we know it does not happen on Intel CPUs. Is there any Intel specific code in LAC? Or are there any Intel specific options for the compiler in the Makefile? I'll have a chance to test GL-117 (and the latest LAC release) on my AMD system in a few weeks as I'm away from home just now. The LAC version I tested was the latest at time of my previous post. In general I think I can't live with this problem, meaning it turns me down enough to choose a different game. However I can try to help you if you give me instructions on how to debug this problem. Are there any profiling tools I can use with LAC code to spot the bottleneck?

    Item 2: I see there's a way to disable XFCE screensaver with a shell command. Maybe I'll just make a launcher script to do that for me.

     

    Last edit: Lucio Crusca 2018-08-26
  • bbosen

    bbosen - 2018-08-31

    Lucio,

    There is no obvious or intentional Intel-specific code in LAC. However, I am trusting "Codeblocks" with this, relying on their default "architecture" settings (not relying on a Makefile). I see that Codeblocks has options that I can specify in order to optimize for various AMD CPUs and CPU/graphic architecture combinations. I have not experimented with these options at all, but tomorrow I will get access to an AMD development system and I hope I can try these things. If I have success I will respond with results here. I am curious about your tests with GL-117 on AMD hardware too... Please keep me posted.

    You can help me with debugging if you will watch LAC's logfile for anything that looks suspicious while the menu system is bogged down, and email me any snippets that seem appropriate. If you run LAC in a small window, you will be able to see the logifle in real time. After every LAC session, the logfile can be found at ~home/.LAC/logfile.txt

    I hope your experiment with "Item 2" is successful.

    Thanks for your attention!

    -Bob-

     
  • bbosen

    bbosen - 2018-08-31

    Lucio, one other thing: Perhaps the XFCE screensaver would not be a problem if you avoid LAC's full-screen mode. Just edit the ~home/.LAC/LacConfig.txt file to specify a screen resolution slightly smaller than the full-screen size your hardware is using. That way you will exercise different display logic from within LAC but the image will be "almost" full-screen. I hope this helps!

    -Bob-

     
  • Lucio Crusca

    Lucio Crusca - 2018-09-09

    Here I am with the test results on my AMD system.

    The latest GL-117 release from year 2005 does show the same behavior while using the menu, but it lags a bit less and the whole experience, while it's far from being good, is more acceptable.

    While using the menu in LAC there's no suspicois message in logfile.txt, here is the relevant snippet:

    Info: Entering SDL main loop (GLUT emulation)
    Info: LacMouseFunc() game == GAME_INIT. x=1035, y=613, button=1
    Info: @createMission() missionid=
    Info: @ 0
    Info: game_levelInit() beginning.
    Info: GLLandscape::GLLandscape()
    Info: GLLandscape::precalculate()
    Info: Saving height map in file LastTerrain.LAC
    Info: GLLandscape::GLLandscape() succesfully opened LastTerrain.LAC
    Info: GLLandscape::GLLandscape() Wrote new version of LastTerrain.LAC
    Info: @game_levelInit() ending.
    Info: DebugRjb170825ag Camera Reset.
    Info: LacMouseFunc() game == GAME_MENU. x=545, y=167, button=3
    Info: DebugRjb170825ag Camera Reset.
    Info: DebugRjb170825ag Camera Reset.
    Info: LacMouseFunc() game == GAME_MENU. x=692, y=245, button=3
    Info: LacMouseFunc() game == GAME_QUIT. x=799, y=598, button=3
    Info: Saving /home/lucio/.LAC/LacConfig.txt 
    Info: Saving /home/lucio/.LAC/LacControls.txt 
    

    I've noticed the problem is present only when a submenu is displayed. While hovering on the first menu (Fly a mission | Setup options | Authors | Exit), before the first click on a menu item, so before the submenu gets displayed, the mouse pointer moves normally and there is no "Low FPS" warning. After clicking "Exit" both menus disappear and the confirm dialog shows up: here the mouse pointer runs smooth again.

    Hope this helps. If you need further tests feel free to ask me.

     
  • bbosen

    bbosen - 2018-09-10

    Lucio, thanks for providing those details. I was hoping I had introduced this behavior in one of my revisions so I could just "diff" it to determine where I went wrong. With your revelation that this problem goes all the way back to GL-117 I will need to dig deeper into their legacy menu system than I have heretofore gone.

    (This is looking like it will be a battle.... I may just "punt" it and add logic to traverse the menus with arrow and "Tab" keys, or I may expand the LacConfig.txt file a bit in order to allow affected users to edit new items to specify ALL default behavior, so it would never be necessary to suffer through any of the menu items.)

    Last week I had brief access to some borrowed laptops using AMD and Intel CPU's with Radeon graphics. I confirmed that the problem is present in any Radeon system regardless of CPU. I then went onto Amazon.com and ordered a RADEON laptop that should arrive within a couple of weeks. At that point I will begin working to solve this legacy bug. I appreciate your help with this. The details you have provided have already helped me eliminate a lot of possibilities that would otherwise have consumed my time and led to "dead ends".

    If and when I solve this, I will update this thread with the associated details.

    In the meantime, If you'd like to fly with me online, I am almost always monitoring the "Mumble" Server at LinuxAirCombat.com. Give me a shout. I'd love to fly with you and learn more about your setup and resulting performance, etc.

    -Bob-

     
  • Lucio Crusca

    Lucio Crusca - 2018-09-10

    Thanks for your effort. Please note that, back in the GL-117 days, I was already using a Radeon graphics card, in particular a Sapphire Radeon 9250 128MB, and it used to work.

    I do suspect that a Radeon card from year 2001 probably shares only the name with current Radeon cards, but I wanted to point that out nevertheless.

     
  • bbosen

    bbosen - 2018-09-26

    Lucio, I've had some success: My new Radeon-equipped laptop computer arrived 2 weeks ago and I have coded a reasonable "work-around". Although I haven't figured out why Radeon-equipped computers slow down when reading mouse position changes in that legacy menu logic, I added support for keyboard navigation of those menus, using whatever keyboard keys the user has configured for looking Left, Right, Forward, or Backward in LAC. By default, LAC uses the numeric keypad for view selection, where Num2 (Left Arrow) = "Look Left", Num4 (Right Arrow) = "Look Right", Num8 (Up arrow) = "Look Forward", and Num2 (Down Arrow) = "Look Back". Use those same keys to move the mouse pointer Left, Right, Up, or Down, respectively. Once the mouse pointer is thus located over one of the menu controls, you can activate or toggle that control by pressing <space> or <enter> as one might expect.</enter></space>

    On my Radeon-equipped laptop, this new system works MUCH better than struggling with the "mouse". I hope it is better for you too.

    -Bob-

     
  • Lucio Crusca

    Lucio Crusca - 2018-09-28

    Hi Bob, thanks for your efforts.
    I can confirm moving the cursor with the numeric keypad works better than the mouse and I can confirm I spent two hours playng LAC yesterday... which brings us to the following new issues:

    4) I get a segfault and consequent application crash after about half an hour of playing
    5) after I shot to a target plane (hit but not destroyed) it started "flying" (floating more precisely) at -14 altitude half immersed into the sea. After that there was no way to hit it again with the gun. Then I tried crashing my plane into the sea, but my plane started doing the same (floating at negative altitude). Quitting the game was the only way out.
    6) I managed to reach 40000 (meters? feet?) of altitude with a WWII plane... is that as intended?
    7) The second tutorial mission did not finish even after I shot the two tanks.

    As for issue 1 (sluggish mouse pointer with the menu on AMD systems), I plan to take a look at the code sooner or later, there must be something really bad in there.

     

    Last edit: Lucio Crusca 2018-09-29
  • bbosen

    bbosen - 2018-09-29

    OK Lucio. I like progress reports!

    Your item "4)" has been getting my attention ever since I first noticed it about 2 weeks ago. I think I know what is causing it and I hope to have it fixed in the next published release (has to do with damaged network packets performing some new administrative functions and I will probably do most of the repair work on the server end).

    Your item "5)" is on my "to fix" list. I've been tolerating that one for quite awhile, as virtually all of my attention is on the online, multiplayer missions and activity. The artificial intelligence associated with "bots" is really, Really, REALLY primitive. It hasn't had any attention for a long time. I hope to get to it "some day...."

    Your item "6)" is probably not a bug. Cockpit altitudes are displayed in feet. The P38 could climb to 44,000 feet. The P47 was similar. However, I made recent changes in some of the altitude management logic and it's possible there may be something wrong. I'll test it some more.

    Your item "7)" is as intended. Exiting [some of] the missions is not like gl-117.... In general, you must press <esc> to exit the missions, unless you get yourself killed somehow.</esc>

    Thanks! I really appreciate your observations and reports. The menu code is the portion of LAC that still most closely resembles the legacy gl-117 heritage. Some of it is still mysterious to me. If you can figure out why it won't work with modern Radeon graphics, I would REALLY thank you!

     

    Last edit: bbosen 2018-09-29
  • Lucio Crusca

    Lucio Crusca - 2018-09-29

    About the segfault, please note that I've never been playing online. It happened while testing offline with the tutorial missions, no network connection established, at least not explicitly by myself. Does LAC use the network even when playing offline?

     

    Last edit: Lucio Crusca 2018-09-29
    • bbosen

      bbosen - 2018-10-07

      Thanks Lucio. LAC does NOT use the network when playing offline. I have been diggin into the source code and I've found and fixed 3 or 4 little memory leaks (pointer math accessing array members beyond boundaries). I don't yet know if I've found them all, but those segfault errors are not happening very frequently.

       
  • Lucio Crusca

    Lucio Crusca - 2018-10-04

    About the menu code, line 208 (Lac06p50) of menu.cpp calls draw() for each mouse event, including mouse movement (button==0). The draw() function in turn calls draw() for each displayed component. I'd assume this is nedeed to draw the mouse pointer, but I don't really now if GLUT client code is required to draw the mouse pointer itself or not. Anyway, besides the reason for a draw() every mouse movement, maybe such a burst of draw operations on modern AMD drivers need to pay special attention about some obscure caveats.

    I don't know how to compile LAC sources, so I can't test myself, but I feel like adding a "if" around that line of code could help:

    if (button != 0)
      draw (); // this is current line 208 of menu.cpp
    else
      drawMouseCursorOnly (); /* this function does not exists as of now, and I don't know if it's actually needed */
    
     
  • bbosen

    bbosen - 2018-10-07

    Thanks. I will look into this too. It would be nice if all of the graphic drivers will draw the mouse cursor even if we don't expicitly invoke "draw()" as you suggest. I am hoping for that result....

    -Bob-

     

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.