Menu

#5 Port to SDL2

Unstable (example)
closed
nobody
None
5
2016-12-25
2015-12-21
galtgendo
No

Following patch still needs some work, yet it already is almost complete.
It should be treated as a starting point for a discussion.

For the moment, it ignores resolution settings, but that part can be easily fixed.
Also, changing scale without restart doesn't quite work - that will be a bit harder.

Though the campaign AI is plain insane; where in the code it can be temporarily disabled (in a way that will affect saves) ?

1 Attachments

Discussion

  • Stefan van der Wel

    If you want to play against a less insane AI, please try the 9.6.4beta in the following folder (builds for windows and OSX available).

    https://sourceforge.net/projects/dunelegacy/files/dunelegacy/0.96.4beta/

    I would be happy to merge your SDL changes (or vice versa, allow you to incorporate my changes). Most of my changes are the following so far:

    • creating the QuantBot AI with a set of difficulty levels (always happy to get feedback on how they can be further balanced),
    • added a couple of buttons (repair unit & manual carryall call drop request for unit),
    • allowed units which are targeting other units to still be picked up for repair
    • increased spice dropped by worms (seems to be a bug which causes game to crash when this is abled occasionally, not sure why as of yet)
    • stopped launchers from targeting carryalls
    • nerfed ornithopers slightly by allowing launchers to target them at close range
     
  • galtgendo

    galtgendo - 2015-12-22

    In the long run, maybe, but right now, I just want to temporarily turn it off.

    I'm pretty much getting curbstomped, in part due to weak gaming skills, but also because it the time it takes me to produce 5 quads, AI produces about 9-11 and a couple squads of troopers.

    As I've said, these SDL changes need quite a bit testing, cause while some options were deliberately disabled, but can be restored and some just don't make sense under SDL2, I'm not sure how thorough I was. In example, I've noticed the worm shimmer needed a fix quite late - only after I've got attacked by a worm.

     
  • galtgendo

    galtgendo - 2015-12-24

    ...so, with less whining and more digging into the code, it was just a matter of adding getOwner()->isAI() check in one place...

    I still hold that no standard AI will be valid for the campaign, as there's just no sane way the player can offset the economic advantage of 4 running refineries and barracks+factory set.

    Now, to get back to fixing problems in the patch...

     
  • galtgendo

    galtgendo - 2016-02-19

    So, I've left for awhile.

    Now, looking at the SDL2 branch and my old patch, a few minor issues.

    • remove SDL_mixer check: not only it checks for SDL1 version, but it's already handled in PKG_CHECK_MODULES
    • while cleaning up my patch, you've missed SDL_SetPaletteColors line in tripleTiledSurfaceScale3x (it's present in the other variants); that results in an exception abort if that filter is picked
    • fog is broken; probably the variant for AirUnits too (more on that later)

    I've got two minor fixes/enhancements ready:

    • let's handle selection rectangle consistantly (both horizontally and vertically); also selection point is incorrectly transformed twice
    • moire was so in...two decades ago; let's use 1/2 alpha black instead for progressbars (both GUI and builder's options)
     
  • galtgendo

    galtgendo - 2016-02-19

    Ooops, I've posted too early and the wrong thing.

    first the patches

     
  • galtgendo

    galtgendo - 2016-02-19

    ...and the second one

     
  • galtgendo

    galtgendo - 2016-02-19

    Oh, I forgot about a minor bug I've accidentally found: SIGFPE if easybot is selected.

    In src/players/QuantBot.cpp, void QuantBot::onDecrementUnits(int itemID)
    changing '/ difficulty' to '/ (difficulty+1)' worksaround the problem, but might not be correct.

     
  • galtgendo

    galtgendo - 2016-02-19

    Now, about pTransparent40Surface and pTransparent150Surface.
    I'm thinking about doing that via alpha surfaces too, but I can't quite get the right shade.
    40 and 150 don't seem to hit the right value.
    Actually, I'm certain only about fog (40), as I'm not sure how to correctly test for AirUnits.

    ...ah, right ornis not for Harkonnen (btw. this interface is goddamn stupid - honestly, SourceForge :roll:)

     
  • RichieQ

    RichieQ - 2016-12-25
    • status: open --> closed
     
  • RichieQ

    RichieQ - 2016-12-25

    The next version uses SDL2. Thank you very much for your patch.

     

Log in to post a comment.

MongoDB Logo MongoDB