Update C-Dogs SDL 0.6.5

Discussion in 'Software Releases' started by canseco, Jul 30, 2016.

  1. canseco

    canseco Very Active Member

    Joined:
    Jun 1, 2004
    Messages:
    885
    Location:
    Spain
    C-Dogs SDL 0.6.5

    [​IMG]

    C-Dogs SDL is a port of a really fun old DOS game to modern operating systems, using the SDL2 media libraries for graphics, sound and input (hence the name).

    Changelog


    0.4.1.1
    - Initial release
    0.6.2.2
    - Latest stable release.
    - Changed default config for OpenPandora.
    0.6.2.3
    - Fix game not working with 4.10 SGX drivers, thanks to ptitSeb patch.
    0.6.2.4
    - Fix support for wide resolution, thanks to congusbongus.
    0.6.4.0
    - Latest stable release.
    - Changed default control mapping. See below.
    0.6.5.0
    - Latest stable release.
    - Updated libs and source code inside the PND.

    Input control keys:

    Dpad: movement
    B button: Accept/fire
    X button: Cancel/Run/Change weapon
    Y button: Show map

    Link to homepage:
    https://cxong.github.io/cdogs-sdl/
    Link to repo:
    https://repo.openpandora.org/?page=detail&app=cdogs-sdl
     
    Last edited: Jun 4, 2017
    Tags:
    FBnil, congusbongus and ElPoco like this.
  2. levi

    levi Still fresh, damnit!

    Joined:
    Oct 6, 2008
    Messages:
    11,085
    Location:
    Somewhere off the coast of the EU
    Blimey, a positive vote from CCF for once!
     
  3. Magic Sam

    Magic Sam Forever Homebrew

    Joined:
    Aug 10, 2007
    Messages:
    2,209
    Location:
    Innsmouth, MA
    Hi all !

    @canseco : thanks for updating your C-Dogs SDL package, it's really appreciated :)

    Unfortunately, it doesn't work on my Rebirth Unit, with latest SZ release installed and SGX driver 4.10:

    Cheers, Magic Sam
     
  4. ElPoco

    ElPoco Very Active Member

    Joined:
    Feb 16, 2012
    Messages:
    708
    Location:
    Paris, France
    Thanks! Still as fun as ever! :)
     
  5. Magic Sam

    Magic Sam Forever Homebrew

    Joined:
    Aug 10, 2007
    Messages:
    2,209
    Location:
    Innsmouth, MA
    Hi all :)

    @canseco : your package works with SGX driver 4.03.00.02, but fails to start with 4.10.

    Is it to be expected ?

    Cheers, Magic Sam
     
  6. canseco

    canseco Very Active Member

    Joined:
    Jun 1, 2004
    Messages:
    885
    Location:
    Spain
    Yep.

    Latest SGX drivers doesn't support X11 and the game uses it.

    Any patch is welcome.
     
  7. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    8,388
    Location:
    France, near Lyon
    Just use
    Code:
    export LIBGL_FB=1
    
    and ensure it select and stays Fullscreen, and that should be enough.
    You can also probably use the GLES2 renderer of SDL2 with
    Code:
    export SDL_VIDEO_GLES2=1 
    export SDL_VIDEO_GL_DRIVER=libGLESv2.so
    
    (in that mode, the LIBGL_FB=1 is implicit).
     
    canseco likes this.
  8. canseco

    canseco Very Active Member

    Joined:
    Jun 1, 2004
    Messages:
    885
    Location:
    Spain
    I did a quick test with 4.03.02 and 4.10 and it works, will update ASAP. Thanks.
    --- Double Post Merged, Aug 1, 2016, Original Post Date: Aug 1, 2016 ---
    Changelog

    0.6.2.3
    - Fix game not working with 4.10 SGX drivers, thanks to ptitSeb patch.
     
  9. Magic Sam

    Magic Sam Forever Homebrew

    Joined:
    Aug 10, 2007
    Messages:
    2,209
    Location:
    Innsmouth, MA
    Hi all :)

    @canseco : I'm sorry to report your updated version is still not working correctly with SGX driver 4.10.

    The game starts this time, but controls don't work as expected: pressing up/down in the menu brings XFCE icons to the foreground...

    I hope my bug report makes some sense, because I have quite a headache right now :p

    Cheers, Magic Sam
     
  10. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    8,388
    Location:
    France, near Lyon
    the "LIBGL_FB=1" make the game show as fullscreen, but it may work in a window, making mouse click interact with the desktop.. That why, when using FrameBuffer mode, you must force Fullscreen mode in the game.
     
  11. canseco

    canseco Very Active Member

    Joined:
    Jun 1, 2004
    Messages:
    885
    Location:
    Spain
    The default config i did for the game, is already on fullscreen mode.

    I did a quick test again, with XFCE, 4.10 drivers, deleted appdata folder and reboot, and it works fine.

    Did you tried to reinstalled SGX drivers?
     
  12. Magic Sam

    Magic Sam Forever Homebrew

    Joined:
    Aug 10, 2007
    Messages:
    2,209
    Location:
    Innsmouth, MA
    Hi all :)

    @canseco : you were right, re-installing the drivers did the trick !

    EDIT: @canseco : the game can be pretty slow (~10 FPS) when there are a lot of baddies on screen...

    Cheers, Magic Sam
     
    Last edited: Aug 3, 2016
  13. congusbongus

    congusbongus Still Fresh

    Joined:
    Aug 4, 2016
    Messages:
    3
    Hi, I'm the maintainer of C-Dogs SDL, thanks for the port and for playing!

    @canseco you can pass the arguments "--screen=400x240 --scale=2" to take advantage of the full screen space. It may be good to disable menu options that don't make sense, like input remapping or changing the resolution. See for example what was done for the GCW-Zero port: https://github.com/cxong/cdogs-sdl/search?utf8=✓&q=__GCWZERO__

    @Magic Sam try turning gore off in the options. Turning fog off can also help but probably not in the situation you describe. Particles are unoptimised so I can add an option to also turn off brass shells in a future version. Unfortunately getting the full 70fps will be hard; even with very little action the GCW-Zero only manages 30-40fps, so I guess Pandora will be similar.
     
    Magic Sam and levi like this.
  14. Magic Sam

    Magic Sam Forever Homebrew

    Joined:
    Aug 10, 2007
    Messages:
    2,209
    Location:
    Innsmouth, MA
    Hi all :)

    @congusbongus : welcome to our friendly community !

    I turned off gore and fog effects, and it actually helped a little with the framerate (~20 FPS in the 2nd level of the first campaign "the sand"). The 3rd level was unfortunately too slow to be playable (~10 FPS).

    Turning shadows off made things worse, so I left them on.

    I'm looking forward to playing your next version without brass shells :)

    EDIT: thanks for issue #448 on your github repository !

    Cheers, Magic Sam
     
    Last edited: Aug 4, 2016
  15. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    8,388
    Location:
    France, near Lyon
    @canseco : you can also try with LIBGL_BATCH=1 and see if it improve things a bit.
     
  16. canseco

    canseco Very Active Member

    Joined:
    Jun 1, 2004
    Messages:
    885
    Location:
    Spain
    I did some extensive and i did enjoy it a lot, ;)

    This is what happens when i try to use those arguments:

    cdogs-scaling.png

    I'm getting 38 to 49 FPS, with all effects at max, on 1GHZ OpenPandora. It could be lower on Classic and Rebirth versions.

    I did try that variable, but it doesn't seem to make any difference, but i would include it anyway for older models.
     
  17. congusbongus

    congusbongus Still Fresh

    Joined:
    Aug 4, 2016
    Messages:
    3
    @canseco by default the game will only allow valid resolutions detected by SDL_GetDisplayMode, but I heard it's not perfect plus it doesn't make much sense in SDL2 because it can do accelerated scaling, so I'll have a look and remove that check. In the mean time you can pass in "--forcemode" to bypass that check.
     
  18. TrashyMG

    TrashyMG Sarcasm Dispenser Staff Member

    Joined:
    Jan 18, 2010
    Messages:
    10,521
    I'm not sure about SDL2, but I know Notaz's SDL can do hardware scaling if need be and it "should" be faster.
     
    Magic Sam likes this.
  19. canseco

    canseco Very Active Member

    Joined:
    Jun 1, 2004
    Messages:
    885
    Location:
    Spain
    That option seems to do the job, but FPS goes down to 29-39 and doesn't feel too smooth.

    Limiting resolutions to 320x240 and 400x240 with scale 2 seems enough for this port, i just wish the accelerated scaling would work as good as Notaz's SDL1.

    I would upload a new release ASAP.
    --- Double Post Merged, Aug 5, 2016, Original Post Date: Aug 5, 2016 ---
    Changelog

    0.6.2.4
    - Fix support for wide resolution, thanks to congusbongus.
     
  20. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    8,388
    Location:
    France, near Lyon
    SDL2 only use GL/GLES1/GLES2. SDL1 use FB. There is a huge difference, especialy for 2D bilitting game, where you need to update the surface many time. In SDL1, you just write in the FB. In SDL2, you update a texture and then you blit it. Updating a texture can be framerate killer on the Pandora.
     

Share This Page

Loading...