Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 43

Thread: Library recommendation?

  1. #21
    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.

  2. #22
    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.

  3. #23
    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 07:21 PM.

  4. #24
    I got the game to work now (using UndelphiX in Delphi 5), but the Steam overlay doesn't appear (probably because it uses DirectX 7), achievements are shown after ending the game.

    Would a game be allowed on Steam if the overlay doesn't work? (Are there other games that don't have the steam overlay?)

    I tried adding an OpenGL layer. That works, but it is always UNDER the game and is invisible (if I make the game window smaller, I see it on the sides). Anyone know a way to get something in front of a UndelphiX DXDraw?

  5. #25
    According to official documentation about Steam Overlay that you can find here https://partner.steamgames.com/doc/features/overlay DirectX 7 is supported. The documentation also states that you need to initialize Steam API before your game render surface is created in order for the API to successfully hook the rendering device creation.
    Another cause for your problem might be the fact that UnDelphiX might be actually running in software mode with which Steam Overlay is not compatible.

  6. #26
    Quote Originally Posted by SilverWarior View Post
    According to official documentation about Steam Overlay that you can find here https://partner.steamgames.com/doc/features/overlay DirectX 7 is supported. The documentation also states that you need to initialize Steam API before your game render surface is created in order for the API to successfully hook the rendering device creation.
    Another cause for your problem might be the fact that UnDelphiX might be actually running in software mode with which Steam Overlay is not compatible.
    Thanks, I am starting Steam first, but I'm unable to get it to work. I'm actually wondering if UnDelphiX really uses DirectX 7 for 2D, I don't think DirectDraw was ever changed after DirectX 5. I set doDirectX7 and do3D and from looking at the source it does seem to load a DX7 object at some point, but Steam never hooks to it, strange.

    Anyway, I made a new rendering engine using OpenGL and set that as default and now the Steam overlay works fine.

  7. #27
    Hello!

    @Wiering
    Glad to hear that you are still interested in Pascal programming. My children and me love your Mario for Turbo Pascal. I hope you will give us some open source Pascal/Delphi games.

  8. #28
    If any of you would like to try out the beta version on Steam, you can use one of these codes:

    1: KLBK0-EEBAZ-2NN9P
    2: KEX06-G5NXN-N2RKI
    3: FNCX0-Z9CRH-FI40F
    4: FZ69E-4I3JV-E8PEQ
    5: 5054H-8266W-53K6E
    6: WCN5J-RDHVZ-G830K
    7: GKM9A-G4FCW-PVP3R
    8: Z5G8C-Z9A98-7P24F
    9: C3IXL-0Z05Z-XT0BJ
    10: TL4M6-P04HV-G30JA

    If you claim one, please reply with the number, so other people know which ones are still available.

    Please let me know if you run into any problems or if you have any remarks or suggestions about the game.

    Trailer: https://www.youtube.com/watch?v=VXIFOcOHIHM

  9. #29
    Hi!
    I have claimed 1. code

    EDIT: I do have a problem. The game seems to be running on steroids. It is like when you take one of those old DOS based games and run it on a modern computer.
    Last edited by SilverWarior; 04-02-2018 at 09:09 PM.

  10. #30
    Quote Originally Posted by SilverWarior View Post
    EDIT: I do have a problem. The game seems to be running on steroids. It is like when you take one of those old DOS based games and run it on a modern computer.
    Thanks, that is interesting, what kind of video card do you have?
    Could you try Options, View, Graphics, DirectX?
    Otherwise, if you go to windowed mode (Alt+Enter) there is menu at the top and you can choose Game, Slow Down.

Page 3 of 5 FirstFirst 12345 LastLast

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
  •  
Comodo SSL