Results 1 to 10 of 43

Thread: Library recommendation?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by Wiering View Post
    Hi Everyone,

    Sorry for resurrecting an old thread, but I started working on this again and want to finally get this game on to Steam.

    I was eventually able to get the fake fullscreen working, so thanks SilverWarior for suggesting that!

    I wasn't able to port the game to lazarus (too much assembly and other hacks that sadly don't work in lazarus), so I'm sticking with Delphi 5.

    Now I need to change the MIDI sound into streamed audio (.ogg or .mp3), which is unfortunately not supported by UnDelphiX.

    So does anyone have a suggestion on what library to use? It doesn't have to do much other than play background music (looping without gap), should sometimes suddenly change into a different song (my songs have 2 different endings). Should be free (but not GPL) and work in Delphi 5.
    Delphi 5 is pretty old. Did you tried Tokio? There is the free starter edition at Embarcadero's website. I installed it recently and has some differences with the old Delphi I know (I got stuck with Delphi 6) but it is not hard to upgrade my knowledge (but it is being a bit tricky to make my Allegro wrapper compatible with it though).

    Glad to see you're still fighting!
    No signature provided yet.

  2. #2
    It's way, way harder to update an old Delphi app to a new version of Delphi than it is to update it to Lazarus, for what it's worth. I'm willing to bet there are most likely non-assembly alternatives to what Wiering is trying to do nowadays, though. Hard to say without seeing the code.

  3. #3
    Quote Originally Posted by Akira13 View Post
    It's way, way harder to update an old Delphi app to a new version of Delphi than it is to update it to Lazarus, for what it's worth. I'm willing to bet there are most likely non-assembly alternatives to what Wiering is trying to do nowadays, though. Hard to say without seeing the code.

    Here is a little example: I stored most of my data as assembly (example: parameters for a level background):

    Code:
      
    procedure BackGrParP1b; assembler;
    asm
      db      1    { StaticBackGrObj }
      db       52, 77, 24, 20;  dd SUNB01
    
      db      9    { BackDraw }
      db      100, $C9;  dw PKD;  dd BIGPLANTpck;  db $CD
      db       30, $86 + $10; dw PKD;  dd PALMBACKPK0;  db 0
      db       42, $86 + 32 + $10{, 16, 58;} dw PKD;  dd PALMBACKPK1;  db 0
      db      100, $90 + $10; dw PKD;  dd PALMBACKPK0;  db 0
      db      112, $90 + 32 + $10{, 16, 48;} dw PKD;  dd PALMBACKPK1;  db 0
      db       40, $D0;  dw PKD;  dd BIGPLANTpck;  db $CD
      db      100, $D8;  dw PKD;  dd BIGPLANTpck;  db $CC
      db      200, $C0;  dw PKD;  dd BIGPLANTpck;  db $CD
      db       40, $D4;  dw PKD;  dd BIGPLANTpck;  db $CD
    
      db      0    { FromPalTo }
    
      db      4    { RandomPixels }
      dw       1;  db    0, $0F,   0,   1,  $F1
      dw       2;  db    0, $1F,   0,   1,  $F0
      dw       1;  db    0, $2F,   0,   1,  $F1
      dw       2;  db    0, $3F,   0,   1,  $F0
      ...
    end;
    That was ideal, because that way you don't have to define any data structure for it and you can easily have variable sized sections and not waste any bytes.

    Also all sprites were saved like that, but I could easily convert those into arrays of bytes.

    When I try to use this in Lazarus, I get a SIGSEGV exception, probably because this is all compiled into the code segment and I'm trying to use it as data.
    (I thought of using the Delphi version to save all of these things as data, but it wouldn't work for the Pointer values).

    Also, I have many thousands of lines of assembly code, all drawing stuff that needed to be fast. And I haven't found any good documentation of how the Lazarus assembly works.

    Actually I did get the game to work somewhat in Lazarus by commenting out everything that requires assembly or these data structures and by rewriting one sprite drawing function to Pascal code (you only see a black screen and a few sprites and it is already terribly slow).
    Last edited by Wiering; 07-01-2018 at 08:21 PM.

  4. #4
    Quote Originally Posted by Ñuño Martínez View Post
    Delphi 5 is pretty old. Did you tried Tokio? There is the free starter edition at Embarcadero's website. I installed it recently and has some differences with the old Delphi I know (I got stuck with Delphi 6) but it is not hard to upgrade my knowledge (but it is being a bit tricky to make my Allegro wrapper compatible with it though).

    Glad to see you're still fighting!
    I know, and I was able to get it to work in the starter edition. However, that "free" starter edition requires you to buy the full version if your company makes more than $1000 in a year (not from use of Delphi, but in total), which is ridiculous, so I'm staying with Delphi 5.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •