+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 30 of 44

Thread: PTK vs raw DX7/OpenGL

  1. #1
    Senior Member
    Join Date
    Sep 2004
    Location
    Perth, Australia
    Posts
    179

    Default PTK vs raw DX7/OpenGL

    I realise this question may be a bit "finger in the air" but anyway...

    Say I wanted to develop a side scroller platformer in the style of the old Commander Keen. You know the sort of thing, simple colourful sprites, that can be rotated, stretched etc. Say 3 layers of parallax scrolling. Would a library such as PTK be useful for that sort of game, and how much time could I save by using PTK rather than doing it all from scatch in DX or OpenGL? Assume I have the artwork :-)

    I have a good knowledge of C++ and have written Windows games before (GDI based) but I have ZERO knowledge of DX or OpenGL. I have a copy of "Tricks of the Windows Game Programming Gurus" that teaches basic DirectDraw using DX7 so I could use that to get up to speed. But I don't want to waste my time if existing libraries such as PTK can do the same job easier.

    20thCB

  2. #2
    Senior Member
    Join Date
    Jul 2004
    Posts
    543

    Default

    I would say you could save many months. PTK is extremely easy to learn. PTK also handles sound and input, too. I'd bet you could be up and running with PTK in less than a week, where doing all that work yourself could take months.

  3. #3
    Administrator
    Join Date
    Jul 2004
    Location
    Chicago Area (USA)
    Posts
    941

    Default

    Doing it yourself in DX is more like doing it yourself in OpenGL...

    If you would rather have DirectX instead of opengl, but want an easy engine, you might want to try HGE: http://hge.relishgames.com/ or Blitz Basic...

  4. #4
    Senior Member
    Join Date
    Sep 2004
    Location
    Perth, Australia
    Posts
    179

    Default

    HGE does indeed look good. Apart from the obvious difference of using DX instead of OpenGL I wonder how it compares to PTK in terms of stability, support, ongoing development etc?

    These engines certainly do seem to take a lot of the drudgery out of game creation. I think if I took the "learn DX first" track I will never complete a game. Especially as I can only spend a couple of hours a day on this.

    Does using one of these engines cause games to look similar? Or are they low-level enough to allow a certain amount of freedom? Can you tell if a game was made with PTK/HGE just by the game mechanics/effects etc?

    20thCB

  5. #5
    Senior Member
    Join Date
    Jul 2004
    Posts
    543

    Default

    No. My game, Derelict, was made using DX, initially, but switched to PTK during development. The only difference in the way they look is that I got to use alpha for the shadows and explosions.

  6. #6

    Default

    Quote Originally Posted by 20thCenturyBoy
    I realise this question may be a bit "finger in the air" but anyway...

    Say I wanted to develop a side scroller platformer in the style of the old Commander Keen. You know the sort of thing, simple colourful sprites, that can be rotated, stretched etc. Say 3 layers of parallax scrolling. Would a library such as PTK be useful for that sort of game, and how much time could I save by using PTK rather than doing it all from scatch in DX or OpenGL? Assume I have the artwork :-)
    You might want to check out helix
    http://www.phelios.com/pc/helix.html

    Was made with PTK, it's not really a platformer but has comparable elements.
    Write to me privately i'll send you a key so you can see all the levels and effects.

    pat.

  7. #7

    Default

    My advice is: get PTK.
    I was using Blitzbasic just 1 year ago and I didn't know ANYTHING of C.
    Then I saw PTK and decided to try. Well I was surprised because the passage from a BASIC language to a C library was so easy!!
    Since you aren't really a C newbie like I was at that time, I'd really suggest at least to try it.
    I've tried other libs like Torque, but wasn't even able to compile the examples...

  8. #8
    Senior Member
    Join Date
    Jul 2004
    Location
    Bucks, UK
    Posts
    123

    Default

    Quote Originally Posted by 20thCenturyBoy
    Say I wanted to develop a side scroller platformer in the style of the old Commander Keen. You know the sort of thing, simple colourful sprites, that can be rotated, stretched etc. Say 3 layers of parallax scrolling. Would a library such as PTK be useful for that sort of game, and how much time could I save by using PTK rather than doing it all from scatch in DX or OpenGL?
    Don't even think about it. Just use PTK. It has a very straightforward API and will easily do what you're asking. Plus the fact that it is free to try. If my own experience is anything to go by then you'll be up and running in a day.

    --- Rod

  9. #9
    Moderator
    Join Date
    Jul 2004
    Location
    Zürich, Switzerland
    Posts
    1,966

    Default

    Can someone (Patrice maybe) explain exactly what makes PTK so interesting? In terms of shareware, the PTK page doesn't sell it to me. What are the benefits over SDL? With SDL I get 2D support, OpenGL support, input, sound, networking, TrueType fonts and Linux support (which PTK doesn't have), and it's free; and just looking at the API, it doesn't look like a very high level abstraction either (I'd expect sprites, dirty rect management, texture memory management, a GUI...).

    I'm not trolling and I don't mean to offend Patrice, PTK is obviously doing something right judging by the coments of other developers that use it, I just can't see what is it
    Gabriel Gambetta
    Google Zürich - Formerly Mystery Studio

  10. #10

    Default

    It's easy to use and it's not LGPL.

    pat.

  11. #11

    Default

    Well I would compare PTK with blitzbasic and other fast and easy development languages, not with SDL directly.
    I think is made for people who want to get fast into game development: for you using SDL may be very easy but for a lot of people (including me) it isn't
    It's only a matter of tastes (and programming skills) I think

  12. #12
    Moderator
    Join Date
    Jul 2004
    Location
    Zürich, Switzerland
    Posts
    1,966

    Default

    OK, fair enough.
    Quote Originally Posted by patrox
    and it's not LGPL.
    In practice, the only condition of the LGPL is that you dinamically link to the library and distribute it as a DLL. That's hardly a problem!
    Gabriel Gambetta
    Google Zürich - Formerly Mystery Studio

  13. #13
    Senior Member
    Join Date
    Jul 2004
    Posts
    624

    Default

    I'd bet you could be up and running with PTK in less than a week
    Truth. I downloaded PTK and I have my game engine skeleton almost up and running and I've definitely spent less than a man week working on it. Not having to worry about Windows messaging or OpenGL set up really saves a lot of time.

    A library doesn't have to do THAT much to make me happy. Just abstract me away from the hardware/OS/API and let me worry about what I care about - my game. PTK does that.

  14. #14
    Senior Member
    Join Date
    Jul 2004
    Location
    Durham, UK
    Posts
    4,873

    Default

    .. and LWJGL now

    Cas

  15. #15

    Default

    From the SDL license:
    "
    To comply with this license, you must give prominent notice that you use the Simple DirectMedia Layer library, and that it is included under the terms of the LGPL license. You must include a copy of the LGPL license.
    You must also do one of the following:

    Include the source code for the version of SDL that you link with, as well as the full source or object code to your application so that the user can relink your application,
    or
    Include a written offer, valid for at least three years, to provide the materials listed in option 1, charging no more than the cost of providing this distribution,
    or
    Make the materials listed in option 1 available from the same place that your application is available. "

    So basically tomorrow i ask you the recompilable objects of Betty Beer Bar, and I can release Bob Beer bar by just changing the graphics

    pat.

  16. #16

    Default

    I can release Bob Beer bar
    THIEF!!! That was the name of my next game!!!

  17. #17
    Senior Member
    Join Date
    Aug 2004
    Location
    Chicago
    Posts
    356

    Default SpriteCraft is pretty ggod for platform games

    You may want to try this. It is pretty good for doing 2d games.

    http://www.spritecraft.com/

  18. #18
    Moderator
    Join Date
    Jul 2004
    Location
    Zürich, Switzerland
    Posts
    1,966

    Default

    Quote Originally Posted by patrox
    Include the source code for the version of SDL that you link with, as well as the full source or object code to your application so that the user can relink your application,
    By dynamically linking to SDL, all the user needs to do to "relink" my application with a modified version of SDL (that's the spirit of the LGPL) is to drop a new DLL on top of the one I distribute.

    From the LGPL itself :
    "5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
    Last edited by ggambett; 11-23-2004 at 07:59 AM.
    Gabriel Gambetta
    Google Zürich - Formerly Mystery Studio

  19. #19
    Senior Member
    Join Date
    Jul 2004
    Location
    California
    Posts
    584

    Default Does PTK have a C API

    The PTK documentation states that it exports a C++ API. Does anyone know if PTK also exports a C API ?
    Last edited by HairyTroll; 11-23-2004 at 08:13 AM. Reason: typo

  20. #20

    Default

    Quote Originally Posted by ggambett
    By dynamically linking to SDL, all the user needs to do to "relink" my application with a modified version of SDL (that's the spirit of the LGPL) is to drop a new DLL on top of the one I distribute.

    From the LGPL itself :
    The SDL licence is a modified LGPL , read carefully

    pat.

  21. #21
    Moderator
    Join Date
    Jul 2004
    Location
    Zürich, Switzerland
    Posts
    1,966

    Default

    OK, from the SDL Licensing page itself :
    The most common way to comply with the license is to dynamically link with SDL, and then include the SDL source code and appropriate notices with your application.
    From the Licensing FAQ :
    Q: Can I use SDL in a commercial application?
    A: The simple answer is "Yes", just dynamically link with SDL and you're fine.
    You do not have to include the source code to your application, since the end user can drop in a new version of the SDL shared library, which is the intent of the license.
    Gabriel Gambetta
    Google Zürich - Formerly Mystery Studio

  22. #22
    Senior Member
    Join Date
    Jul 2004
    Location
    California
    Posts
    584

    Default

    Quote Originally Posted by patrox
    From the SDL license:
    "
    So basically tomorrow i ask you the recompilable objects of Betty Beer Bar, and I can release Bob Beer bar by just changing the graphics
    pat.
    That clause applies only when an application is statically linked to the SDL library. It does not apply when an application is dynamically linked.

  23. #23
    Senior Member
    Join Date
    Jul 2004
    Location
    Vancouver, Canada
    Posts
    144

    Default

    Yeah, the SDL license doesn't bother me at all.

    I tried out SDL for a little while before going with PTK. They are both easy to use but I think PTK is easier. The one thing that I really wanted was 3d accelerated rotation/scaling etc. PTK provides this. In SDL you would have to do it yourself in OpenGL.. or I think there was another library "glSDL" which provides an OpenGL backend for SDL, but it didn't seem ready to use yet and it was no longer in development. Perhaps by now there is a better version of this, or something built into SDL?

    Also, the fact that Pat created so many games quickly with PTK is encouraging.

  24. #24

    Default

    We must have a different internet, that's not what i read on the SDL site in a different section.

    "To comply with this license, you must give prominent notice that you use the Simple DirectMedia Layer library, and that it is included under the terms of the LGPL license. You must include a copy of the LGPL license.
    You must also do one of the following:

    Include the source code for the version of SDL that you link with, as well as the full source or object code to your application so that the user can relink your application,
    or
    Include a written offer, valid for at least three years, to provide the materials listed in option 1, charging no more than the cost of providing this distribution,
    or
    Make the materials listed in option 1 available from the same place that your application is available. "

    "as well as the full source or object code to your application "

    pat.

  25. #25
    Moderator
    Join Date
    Jul 2004
    Location
    Zürich, Switzerland
    Posts
    1,966

    Default

    Same internet. The next paragraph reads
    The most common way to comply with the license is to dynamically link with SDL, and then include the SDL source code and appropriate notices with your application.
    Also, the FAQ couldn't be more clear. Again :
    Q: Can I use SDL in a commercial application?
    A: The simple answer is "Yes", just dynamically link with SDL and you're fine.
    You do not have to include the source code to your application, since the end user can drop in a new version of the SDL shared library, which is the intent of the license.
    My EXE is the object code. Want to relink? Put a new DLL in the directory.
    Gabriel Gambetta
    Google Zürich - Formerly Mystery Studio

  26. #26

    Default

    You know those licences stuff, paragraph 1 that cancels paragraph 2... That's one of those.

    Bob Beer Bar is coming soon

    pat.

  27. #27
    Senior Member
    Join Date
    Jul 2004
    Location
    California
    Posts
    584

    Default

    Quote Originally Posted by patrox
    You know those licences stuff, paragraph 1 that cancels paragraph 2... That's one of those.
    Bob Beer Bar is coming soon
    pat.
    Paragraph 1 clearly does not contradict pararaph 2.

    It states
    Include the source code for the version of SDL that you link with, as well as the full source or object code to your application so that the user can relink your application,
    Note the word or... full source or object code

    And then ... so that the user can relink your application

    The requirement is that a user shall always have the capability to relink a new version of the SDL library to the application and the author must provide the means to the user to do so. The requirement is not that the author must provide the source code. The author must only provide the source code if this is necessary to relink the library to the application. Therefore:
    1. Statically linked: The source code or the object code to the application must be provided such that the user may relink the SDL library to the application.
    2. Dynamically linked: The object code (the binary executable is sufficient to relink a DLL) must be provided such that the user may relink the SDL library to the application.
    Last edited by HairyTroll; 11-23-2004 at 10:18 AM.

  28. #28
    Senior Member
    Join Date
    Jul 2004
    Posts
    543

    Default

    Well - the reasons I chose PTK over SDL has to do with alpha, rotation, scaling, and SPEED. PTK is seriously faster than SDL, and I prefer the API. Patrox has also been very good about solving problems and adding features that I need, and doing it quickly. Not likely to see that happen from SDL. And before you state "SDL is open source and I can just fix it myself", think about the fact that if you do fix it yourself, you have to hope they pick it up, or you have to make the changes in any future version of SDL that you get.

    By the way - this doesn't mean he adds every feature I request, but he will add anything that should be in the library.

  29. #29
    Senior Member
    Join Date
    Jul 2004
    Location
    Bucks, UK
    Posts
    123

    Default

    Quote Originally Posted by Mark Fassett
    And before you state "SDL is open source and I can just fix it myself".
    Apologies if this is slightly off topic, and more apologies if this comes across as a deranged rant.

    I do like open source software, but I have never understood that argument (which I know isn't Mark's argument). It might be valid for a 15 year old with lots of free time, but for a 36 year old with a wife and daughter? My goal is to make something that I can sell, but my time is limited. Given the choice between using a poorly documented library that is free, but comes with source code, and one that is well documented, costs a couple of hundred pounds, and may or may not come with source code then which am I going to choose?

    In other words, free isn't free. You save money, but you lose time and you don't get any nearer to your goal.

    --- Rod

  30. #30
    Senior Member
    Join Date
    Sep 2004
    Location
    Perth, Australia
    Posts
    179

    Default

    I couldn't care less whether a lib is opensource or not. I don't mind spending a couple of hundred bucks on something like PTK if it saves me time and produces results. It's beer money. I do care that a lib is well documented, contains minimum cruft, and has good support.

    I think it's horses for courses. SDL is not a game library, it's a multimedia library. Game related functions are only available in add-on packages that may or may not be up to the standard of quality of the core SDL.

    PTK (and HGE) on the other hand are game-oriented libraries and operate at a higher level of abstraction. As long as performance doesn't suffer I don't care about how a routine has been implemented, and I certainly don't need the source code. The lib is a black box. As someone said, I certainly don't have the time to trawl through someone else's source code anyway.

    I actually didn't realise there were so many libs available. It's an eyeopener. For DX only HGE looks like it has a ton of stuff, and is actively maintained. Of course it is completely non-portable. PTK has the potential to work on Macs and Linux and again is actively maintained. Which to choose? I dunno but it's a fun dilemma :-)

+ Reply to Thread

Posting Permissions

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