Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Another Game Dev Library...

  1. #11

    Re: Another Game Dev Library...

    Quote Originally Posted by pjpdev
    Quote Originally Posted by User137
    This caught my eye. Using .Destroy calls in main program is bad habit
    Delphi help says: "Do not call Destroy directly. Call Free instead. Free verifies that the object reference is not nil before calling Destroy."
    I would have called .Destroy , but now I know that calling free is a more effective way.
    Well I don't think it's more effective. On contrary it may just be a little less effective. As the help says, Free checks that the object reference isn't nil and then calls Destroy. So I suppose Free just looks something like this (perhaps a bit more advanced code)
    Code:
    if Object <> nil then
    Object.Destroy;
    Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits

  2. #12

    Re: Another Game Dev Library...

    Sidetracking with offtopic .Destroy a little... I would just say that calling it while object does not exists gives the Access Violation error which many think quite nasty even in testing phase. .Free avoids that, though then your real issue in program may be harder to track... go figure I have always used .Free only.

    Quote Originally Posted by pjpdev
    I recently got this idea to create a new Game Development library. The entire idea is using SDL, OpenGL and OpenAL for its core. The library is should be a simplification of the core objects. The idea is still in its pen and paper phase, and I'm just sharing my ideas. I'm trying to make something that is the perfect tool for a new developer with little programming experience.

    A few ideas I have:
    - Use a class as an application definition, similar to VCL/LCL form creation.
    - Try to make it compatible with both Lazarus and Delphi.
    - Functions and procedures with simple names such as "LoadImage(src: String)"

    I know its not much, but your ideas are welcome.
    Good luck with project, though the compatibility part may be problem. Is that really what you want to use time to, because there are lots of language and library differences with Delphi and Freepascal based code. Personally i'd like to have some Freepascal based OpenGL engine which i roughly tried to learn but quitted. (in the lack of everything and oversized exes, i could be wrong)

  3. #13

    Re: Another Game Dev Library...

    Quote Originally Posted by User137
    Good luck with project, though the compatibility part may be problem. Is that really what you want to use time to, because there are lots of language and library differences with Delphi and Freepascal based code. Personally i'd like to have some Freepascal based OpenGL engine which i roughly tried to learn but quitted. (in the lack of everything and oversized exes, i could be wrong)
    I have more experience with Delphi than Lazarus, and I still use it more. For starters I'll develop the lib on Delphi, and at a later stage maybe port it to FPC.

    Another thing on my mind is the sound API... I have two choices - FMOD 3 or OpenAL...
    Which one is the best? Personally I like FMOD a lot, it would be the ideal candidate for the lib's sound core... I haven't tried OpenAL yet, and maybe I should sometime.

    Anyway its time to get back to work on this...

  4. #14

    Re: Another Game Dev Library...

    Hi pjpdev,
    With regards to compatibility between Delphi and Freepacal/Lazarus, I would try to make it work in both from the beginning to make it easier for you later on. Then it can be used in both :-)

    It shouldn't be too hard to do (as long as you don't use VCL/LCL controls, etc. but just use 'template' classes and similar.

    Good luck

    cheers,
    Paul

  5. #15

    Re: Another Game Dev Library...

    Do try openal: http://www.noeska.com/doal .
    http://3das.noeska.com - create adventure games without programming

  6. #16

    Re: Another Game Dev Library...

    Quote Originally Posted by paul_nicholls
    Hi pjpdev,
    With regards to compatibility between Delphi and Freepacal/Lazarus, I would try to make it work in both from the beginning to make it easier for you later on. Then it can be used in both :-)

    It shouldn't be too hard to do (as long as you don't use VCL/LCL controls, etc. but just use 'template' classes and similar.
    I'm not going to use VCL/LCL, so I should do it this way. This also gives me a greater oppurtunity to make it cross-platform as well.

    Quote Originally Posted by noeska
    Do try openal: http://www.noeska.com/doal .
    I'll definitely have a look at it. Thanks...

  7. #17
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Re: Another Game Dev Library...

    You know there may be a way to do both VCL and LCL. Though you'd have to properly and smartly separate your LCL from your VCL stuff using {IFDEF Delphi} and {IFDEF Lazarus} clauses.

    One of the biggest attractions to the old DelphiX library was that it was a part of the RAD tool bar hence easier for those used to only the app development to get into making games using visual components. I would note that I don't think anyone has made such a set of visual components for Lazarus yet... Just a though.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  8. #18

    Re: Another Game Dev Library...

    Quote Originally Posted by WILL
    You know there may be a way to do both VCL and LCL. Though you'd have to properly and smartly separate your LCL from your VCL stuff using {IFDEF Delphi} and {IFDEF Lazarus} clauses.

    One of the biggest attractions to the old DelphiX library was that it was a part of the RAD tool bar hence easier for those used to only the app development to get into making games using visual components. I would note that I don't think anyone has made such a set of visual components for Lazarus yet... Just a though.
    Come to think of it, me neither. It is a great idea...

    But...

    The only problem of doing it like this is the fact that Lazarus needs to rebuild itself in order to install new components. This might be confusing to new developers . I don't know if we can find a way around this... If you know of anything, please let me know.

  9. #19

    Re: Another Game Dev Library...

    Well well... I can finally begin with the development of PJPlib... You can keep track of my progress in the following post - http://www.pascalgamedevelopment.com...p?topic=5720.0 or on the official PJP Dev forums - http://forum.pjpdev.co.za

    Thanks for all the advice I got in this post, it helped a lot guys. You're always welcome to make comments on the new posts.

Page 2 of 2 FirstFirst 12

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
  •