Menu

#87 [LBreakoutHD] Bonuses and Maluses are not shown (Debian 11 Bullseye)

None
closed-fixed
nobody
None
5
2022-03-10
2021-09-13
No

I play this game on all of my platforms :) it's very entertaining!
But I have encountered with a problem when compiling on my older PCs.

The bonuses and maluses are not being rendered. Furthermore, the life bar is also displayed a bit lower than normal. All of my older PCs have the same error (I have tried to reproduce it on my main laptop, but it does not ocurr on newer GPU). Please see the attachment below, and you will see what is being shown at the screen.

The attachment contains a screenshot with the error commented, the log from terminal of the game, and the specifications of each computer.

If you need more information, please let me know.

P.D.: I have also tried to compile the game on the old laptops themselves (instead of my main laptop and packaging it), but it does not work around the issue neither, unfortunately.

1 Attachments

Discussion

  • Michael Speck

    Michael Speck - 2021-10-03

    Hi, I have a similiar problem on my old laptop which has resolution 1366x768 and inverts the shadows for no reason. I assume that it is an SDL2 problem. Your screenshot seems cut off (so less is shown than rendered) so I assume that it is a problem with "non-standard" resolution as well. That bonuses are not shown is new to me and I see no reason for this as they are handled exactly as bricks and these are shown... unfortunately as I cannot reproduce it it will be hard to fix it.

     
  • Antoni Aloy Torrens

    Hello again Michael!

    I have been investigating quite a bit, and as you can see in the picture, I managed to get the bonuses and maluses showing :)
    You have a point, this is an SDL2 bug problem, and I should report this issue there.

    I have found two issues instead:

    • The first one (screenshot seems cut off): Like you said, it's a "non-standard" resolution issue (but that's a minor issue because the game is still fully playable).
      Workaround: This can be fixed playing window-mode.

    • The second one (bonuses and maluses not showing): It's an OpenGL issue with SDL2.
      That's why I had this problem on these three very old machines. Their graphics card use OpenGL 1.4 and causes some problems with SDL2. I have tested it on other older machines, but they use OpenGL 2.1 and OpenGL 3.1.
      I used this command from the terminal instead:

    antonialoy@eM250:~$ LIBGL_ALWAYS_SOFTWARE=1 lbreakouthd
    

    It means that I'm using software rendering instead of GPU rendering (slower rendering unfortunately).
    But now, the version that OpenGL reports is different:

    antonialoy@eM250:~$ LIBGL_ALWAYS_SOFTWARE=1 glxgears -info | grep GL_VERSION
    
    Output:
    GL_VERSION = 3.1 Mesa 20.3.5
    

    As you can see, it's using a more modern OpenGL version.
    To sum up, running the game using software rendering fixes the issue because it's using a more modern OpenGL version than using GPU rendering. The issue needs to be reported in SDL2 repository.

     

    Last edit: Antoni Aloy Torrens 2021-10-14
  • Michael Speck

    Michael Speck - 2021-10-16

    Thanks for investigating! I've added a short troubleshooting to the README and will change this ticked to closed.

     
  • Michael Speck

    Michael Speck - 2021-10-16
    • status: open --> closed
    • Group: -->
     
  • Antoni Aloy Torrens

    Hello Michael!

    I've posted an issue in SDL forums about it and I've got a response.
    I think this has to be with the game itself, as explained here: https://discourse.libsdl.org/t/solved-texture-limitations-and-shadow-errors/33209

    I've tested other complete SDL2 games, like this one: https://github.com/stephenjsweeney/waterCloset . Although it includes shadows and textures, this issue is only reproducible in LBreakoutHD.

    The only possibility I can think about is that my device has low video RAM and cannot allocate all the textures at once (hence the error, and the others are cascade errors due to this fact).
    Probably this would be solved if the assets image quality resolution are lowered a little bit (for example, backgrounds occupy 1920x1080 resolution already, comparing to my 2048x2048 limitations, maybe a toggle between low-medium-high quality resolution image in game could be feasible).

    Taking the example of the other game mentioned above, they have put all the sprites in one image: https://github.com/stephenjsweeney/waterCloset/blob/master/gfx/atlas/atlas.png (and it's only 512x512 resolution, very safe comparing my limitations).

    Edit: This issue is related too: https://discourse.libsdl.org/t/texture-dimensions-are-limited/23096

     

    Last edit: Antoni Aloy Torrens 2021-11-01
  • Michael Speck

    Michael Speck - 2021-11-21
    • status: closed --> open
     
  • Michael Speck

    Michael Speck - 2021-11-21

    ok, thanks! I didn't know about the error message, but that makes sense. I'll check if something can be done about it (surely can, I mean if it's worth it as it just happens on older machines). one thing you can try is any older lbreakout2 theme from the website. Images are way smaller with these so they should run without problems.

     
    👍
    1
  • Antoni Aloy Torrens

    Hello Michael! Sorry for the late response.
    I have tried what you said, I've put an older LBreakout2 theme into LBreakoutHD and see how it goes.

    To achieve that, I downloaded LBreakout2, uncompressed it and I ran this command in the terminal:

    antonialoy@asus-1015P:~$ sudo cp -r ~/lbreakout2-2.6.5/client/gfx/AbsoluteB/ /usr/share/lbreakouthd/themes/
    
    Where /usr/share/lbreakouthd/themes/ is my path to LBreakoutHD themes folder.
    

    And then I ran the game as usual, but changed the theme from Standard to AbsoluteB, and here is the log:

    antonialoy@asus-1015P:~$ lbreakouthd
    lbreakouthd 1.0.8
    Copyright 2018-2021 Michael Speck
    Published under GNU GPL
    ---
    Loading configuration /home/antonialoy/.lbreakouthd/lbreakouthd.conf
    Loading hiscores /var/lbreakouthd/lbreakouthd.hscr
    Initializing SDL
    Mixer opened (16 channels, 1024 buf size)
    No game controller found...
    Initializing View (Theme=AbsoluteB, Resolution=0)
    Fullscreen resolution not 16:9! Using 1024x576
    Scale factor x100: 120
    Brick screen size: 48x24
    Creating main window with 1024x576, fullscreen=1
    Loading theme /usr/share/lbreakouthd/themes/AbsoluteB
    Added player Michael
    LBreakoutHD v1.00: 37 levels
    Game saved to /home/antonialoy/.lbreakouthd/lbreakouthd.sav
    Mixer closed
    Finalizing SDL
    Hiscores saved to /var/lbreakouthd/lbreakouthd.hscr
    Configuration saved to /home/antonialoy/.lbreakouthd/lbreakouthd.conf
    

    As you said, these graphics occupy less video RAM than the original ones, so the issue is solved finally. Some image resolution toggler or similar could be achieved :)
    Please see the attached video for results.

     

    Last edit: Antoni Aloy Torrens 2021-12-19
  • Michael Speck

    Michael Speck - 2022-02-19

    My internet is too slow for downloading the video :) but from your description it seems to work so I will just include the old Classic theme as retro theme to LBreakoutHD to fix this. Otherwise extras would have to be split in multiple rows which I feel is too much hassle for a fix for older machines.

     
  • Michael Speck

    Michael Speck - 2022-03-02
    • status: open --> closed-fixed
     
  • Michael Speck

    Michael Speck - 2022-03-02

    Finally I had some time to look into this and implemented a fallback: If a texture cannot be created, it tries one more time at half the size. This works only if the texture does not get scaled up again to full HD though. So it won't work if full HD is supported but the video card can only handle 2kx2k textures. But I'm pretty sure any card offering full HD will be ok with 4kx4k textures. So it should work with your old machines as the resolution is max 1024 wide so the final texture is even smaller. Maybe you can test it? I can only emulate here... BTW you really do have strange resolutions :) So it's basically impossible to fit it exactly as it is not 16:9

     
  • Antoni Aloy Torrens

    Hello Michael,

    I have tested LBreakoutHD 1.0.9 on all of my old machines and it works as expected! So this issue is finally solved :)

    BTW you really do have strange resolutions :)

    Yes, Intel-based atom computers and other x86 machines have weird resolution screens, indeed!

    So it's basically impossible to fit it exactly as it is not 16:9

    Also, the cut off screenshot that I was talking at the top of this issue seems to not happen anymore! Even using 1024x576 resolution, I can now play fullscreen as usual.

    I've attached the log from terminal of the game, with this new 1.0.9 version, if you want to take a look.

    As always, thank you very much for your hard work, I appreciate it!

     

Log in to post a comment.

MongoDB Logo MongoDB