Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Greeting to the community + my problem (PTCPas)

  1. #1

    Greeting to the community + my problem (PTCPas)

    Hi there everyone.
    My name is Ivano and I'm Italian.
    I just finished reading a book on pascal programming and I was about to start a really simple project.
    I get stuck using Graph + Keyboard units, as most I see.
    I heard of this PTCPas and I tryed to include in my project, but I can't go further than _just trying_ to compile the unit.
    I'm using DevPascal with the provided FPC.
    What do I need in order to compile the unit?
    Another one, where can I find some tutorials or simple advices on initializing a graphic screen and reading keyboard input?

    Thanks anyone in advance for any help.
    .
    Bye, Berserk.
    <br />.

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

    Greeting to the community + my problem (PTCPas)

    Hey Berserk, welcome to PGD!

    Dev-Pascal is a little bit dated... you might find a bit more joy in using Lazarus instead. It uses the same compiler (Free Pascal compiler) but with a newer version.

    The new FPC is faster, more stable and supports a lot more platforms. Including GameBoy Advance, Nintendo DS, GP2X, Linux, Mac OS X and Win64!

    You can get it at http://lazarus.freepascal.org/

    Also a great starting game library is SDL. It will allow you to do all of your graphics, sound, music and game controls too.

    JEDI-SDL is the Pascal version that you can use with Lazarus or Delphi. It also supports the rest, but those are the two most common ones.

    You can get JEDI-SDL at http://sourceforge.net/projects/jedi-sdl

    When you get to the downloads page, you want the one on the bottom that says it's 1.0 BETA. A new version is coming soon.

    I have also posted step-by-step instructions on how to install both if you can't figure it out yourself.

    You can read that here: http://www.pascalgamedevelopment.com...pic.php?t=3973
    Jason McMillen
    Pascal Game Development
    Co-Founder





  3. #3

    Greeting to the community + my problem (PTCPas)

    I'm using DevPascal as IDE, but with FreePascal (latest stable release).
    As for Lazarus, I use it as well but it's not as practical as DevPas, because you always must have a project while sometimes I need to just compile a single unit or file.
    As for JEDI-SDL, I know it but it's too "pre-built" for mt flavours.
    I'm a do-it-yourself buddy and ptc was the barest one (except graph unit itself).
    What can I do in order to get ptc to work with FPC?
    .
    Bye, Berserk.
    <br />.

  4. #4

    Greeting to the community + my problem (PTCPas)

    PTC has several subdirectories with include files; therefore you should compiled it with the provided makefile; don't try to do it from an IDE or you must set all paths correctly.

    However, PTC is shipped with recent versions of FPC, so all that is needed to use it is "uses ptc" in your program, if you upgrade to the latest FPC.

  5. #5

    Greeting to the community + my problem (PTCPas)

    I don't have it in, I'm using FPC 2.0.4.
    However, I tryed re-installing everything.
    Compiles fine, but I don't know how to install the new units.
    (and this works _only_ when I copy and paste the rtl unit where the compiler expects it to be).
    Should I copy/paste them somewhere or do something like make install?
    I also noted make install does exist, but copyes the compiled units in the root folder, while I wish them to be under fpc/path/to/units.
    Finally, what I get in that folder is just some .o files, a couple .ppu but what about all those .inc? Where are "my" ppw etc?
    Bye, Berserk.
    <br />.

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

    Greeting to the community + my problem (PTCPas)

    Well to each ones own, but if you want to make games that use modern day graphics, I'd recommend you try a common API like OpenGL or DirectX or even SDL.
    Jason McMillen
    Pascal Game Development
    Co-Founder





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

    Greeting to the community + my problem (PTCPas)

    Well to each ones own, but if you want to make games that use modern day graphics, I'd recommend you try a common API like OpenGL or DirectX or even SDL.

    The days of DOS-type graphics are pretty much gone.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  8. #8

    Greeting to the community + my problem (PTCPas)

    Will, ptc is a standard API. It's a SDL like library written in Pascal.

    Beserk, you are right 2.0.4 does not contain, apparently we didn't merge it in 2.0.4. So, use the Makefile to compile it.

  9. #9

    Greeting to the community + my problem (PTCPas)

    I know is not a good idea to write games for dos, but it's the way I prefer to do my things.
    As for the OpenGL or DirectX API, ptc uses DirectX for painting the screen.
    This makes me return to the first question, wich basicly is "how do I use the makefile the right way"?
    Bye, Berserk.
    <br />.

  10. #10

    Greeting to the community + my problem (PTCPas)

    * Extract the source
    * Type "fpcmake -Tall"
    * Type "make"

Page 1 of 2 12 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
  •