Results 1 to 6 of 6

Thread: Object Pascal port of "Managing Game States in C++"

  1. #1

    Object Pascal port of "Managing Game States in C++"

    Hello,

    I have ported to object pascal the source code accompanying this article:

    "Managing Game States in C++" by Tony Lewis
    http://tonyandpaige.com/tutorials/game1.html

    You can download my port from here:

    http://www.urbanaustralia.org/cragwo...emanpas.tar.gz

    (24 KB)

    I have only tested it with FPC v1.9.8 and JEDI_SDL v1.0 (Beta 1) on Linux. But I see no reason why it shouldn't work on Windows with FPC or Delphi (apart from some minor changes). I compile it with: fpc -Mobjfpc -ostateman main.dpr

    If you have any questions about it, just email me.

    cragwolf@yahoo.com
    [size=10px]"In science one tries to tell people, in such a way as to be understood by everyone, something that no one ever knew before. But in poetry, it's the exact opposite." -- Paul Dirac[/size]

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

    Object Pascal port of "Managing Game States in C++"

    Oh, excellent work!

    I wonder if you would mind if I put it up on the library as a 'locally hosted' library Item? We need more articles like this for Pascal online.

    Keep up the good work.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  3. #3

    Object Pascal port of "Managing Game States in C++"

    Great work! You should also ask the writer of the article to add a link to your Object Pascal download.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  4. #4

    Object Pascal port of "Managing Game States in C++"

    Quote Originally Posted by WILL
    I wonder if you would mind if I put it up on the library as a 'locally hosted' library Item? We need more articles like this for Pascal online.
    Yes, by all means go ahead. I would like to see more source code examples on this web site, but I know you have limited space.

    [quote="savage"]You should also ask the writer of the article to add a ]

    In fact, he suggested exactly that when I asked his permission for making the port public. So expect it there soon.
    [size=10px]&quot;In science one tries to tell people, in such a way as to be understood by everyone, something that no one ever knew before. But in poetry, it&#39;s the exact opposite.&quot; -- Paul Dirac[/size]

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

    Object Pascal port of "Managing Game States in C++"

    Hmm... you know something. I didn't even notice that you only translated the source not the article. See to list it in the Library section it'd need to have the article translated into Pascal or at least Peseudeo code aswell. Who wants to read articles about doing things in C++ here, right?
    Jason McMillen
    Pascal Game Development
    Co-Founder





  6. #6

    Object Pascal port of "Managing Game States in C++"

    Quote Originally Posted by WILL
    Hmm... you know something. I didn't even notice that you only translated the source not the article. See to list it in the Library section it'd need to have the article translated into Pascal or at least Peseudeo code aswell. Who wants to read articles about doing things in C++ here, right?
    I believe that the only two concepts from that article that Object Pascal programmers will need extra explanation for is: the STL vector type, and the Singleton pattern. Each concept would probably require a seperate article. So, that would make three articles just to explain one idea: the game state idea. This is work that I'm too lazy to do.

    My Object Pascal implementation of the Singleton pattern comes entirely from here:

    http://www.skybound.nl/articles/delphi-singleton/

    My Object Pascal implementation of an STL vector I did myself, but it leans heavily on the TStack class (found in contnrs). All I really added was the stack freeing its objects, and also I derived an ancestor, TGameStack, which makes the code cleaner (no typecasting required).

    I hope that users will find my source code easy to follow. If not, I can add some more comments. But they will learn more by reading the original article and the article I mentioned earlier in this post.

    If you can't list it in the Library, that's OK, we have this thread. Maybe you should implement a source code section, where users can submit links to their source code, along with a short description of what the source code actually does.

    In the coming weeks or months I may post some more source code, as I wrestle with the construction of my game engine. I have decided that creating good game engines (e.g. Unreal) is the most technically advanced problem that human beings have ever tackled (*). Thus, even a mediocre engine is incredibly hard work. Oh the pain in my brain!

    (*) Well, perhaps inventing a successful quantum theory of gravity is slightly more difficult. Only slightly.
    [size=10px]&quot;In science one tries to tell people, in such a way as to be understood by everyone, something that no one ever knew before. But in poetry, it&#39;s the exact opposite.&quot; -- Paul Dirac[/size]

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