Game Development Community

Pascal=Good games?

by Arturo Monterroso Garc · in General Discussion · 08/21/2003 (2:50 pm) · 29 replies

Hello, can one use the Pascal programming language to build a game engine and achieve a good level of quality? Or would it be better to use C/C++? Any feedback on this is greatly appreciated. :)

About the author

Recent Threads

  • A few suggestions
  • Page «Previous 1 2
    #1
    08/21/2003 (3:45 pm)
    Depends on the programmer and the style of game.
    #2
    08/21/2003 (5:23 pm)
    It is probably possible to program a good game in Pascal, though I never have. I only have rudimentary knowledge of Pascal.

    You would need a Pascal compiler that compiles programs that run for Windows (or whatever OS you want to program a game for). I really don't know what Pascal compilers are out there.

    C/C++ would probably be better.

    Personally, I use Java. It has several advantages. It's much easier to use because of garbage collection (you don't have to deallocate memory yourself) and various other little features. It comes with a vast library of miscellaneous stuff you can use. It'll run on basically any computer. You can download all the tools you need for it for free.

    But that's just my 2 cents.
    #3
    08/21/2003 (5:31 pm)
    Well, I'm aiming for a First Person Shooter a la Enemy Terrytory (great game btw!). Is Pascal able to handle a game like that? I have the FreePascal Compiler and plan to use that or the GNU Pascal Compiler. I was just asking 'cause Pascal is a simpler language to use and to learn.
    #4
    08/22/2003 (5:11 am)
    Off and on, I hear about some-game-or-another written in Pascal (for example, I think the game "Age of Wonders" was written in Pascal). While its not nearly as popular as C++, it is certainly capable. I use Pascal for my "paying job": specifically, Borland's Delphi. If you check out the Delphi Jedi site, www.delphi-jedi.org, you can find a ton of 3rd party libraries including ports of the DirectX interface libs. I've also seen OpenGL libraries for Delphi.
    #5
    08/22/2003 (4:25 pm)
    Thanks guys for the info! I greatly appreciate it it. : )
    #6
    08/23/2003 (12:43 am)
    You might eschew Pascal and try Modula 2. Modula has more hooks into the OS and manages inline code more effeciently. the primary advantage of Pascal, and Modula 2, is their structure. Structured languagestend to have lower maintenance costs - it tends to be easier to impliment changes. It is very easy to create a procedure in C (any) that in completly unfathomable when you return to it six months later after it blows up.

    Vis-a-vis writing a game - Games may be written nearly any language - though I wouldn't want to try to create Doom in Cobol, maybe Fortran.

    ...rmk
    #7
    08/23/2003 (8:12 am)
    I'll look at Modula2. I've never heard of it but it sounds ok! Thanks for the comment!
    : )
    #8
    08/23/2003 (12:03 pm)
    I checked out modula 2 and its ok, but I've already began to study c++, so I think I'll be using that for the engine. Thanks guys.

    = )
    #9
    08/23/2003 (1:41 pm)
    I have written many non-commercial games, etc. in Pascal.

    Pascal has similar performance and programming characteristics to C. It allocates memory in a similar way, and just as with C, it makes native executables. Object Pascal supports multiple inheretence, etc. -- object Pascal compilers include Delphi and FreePascal.

    FreePascal supports most platforms. There are game development libraries that you may download, and a large number of "old-school" games were written in Turbo Pascal, and so there are lots of samples on how to write good 2d shooters, etc. in pascal out there if you look.

    Many operating systems use Pascal's calling convention, because it generates more efficient code than C's on most Intel and Motorola processors. Mac OS and Windows used this conventoin for years, although I believe both have gravitated to newer calling conventions now.

    The big drawback to Pascal is that if you download SDL or DirectX, you're not going to get bindings for it the same way that you do for C++. Every major pascal compiler (including free pascal) can call C libraries, but it takes writing some code to tell the pascal compiler what the prototypes look like, etc.

    The other big drawback is that it is very dialected compared to C++. Free Pascal can understand most dialects, but there are a lot of differences because it isn't based on a "standard." That's not to say there aren't differences between C++ compilers -- Microsoft, for example, isn't very faithful to the standards they base their tools on -- but it's nowhere near what you'll find in the pascal community.
    #10
    08/23/2003 (4:35 pm)
    Quote:That's not to say there aren't differences between C++ compilers -- Microsoft, for example, isn't very faithful to the standards they base their tools on

    this is categorically wrong if you are refering to C++. The compiiler included with the last versions of Visual Studio ( 2002/2003 ) also named Visual Studio .Net are actually the most standards conformant that you can find in a mainstream C++ compiler.
    #11
    08/23/2003 (8:33 pm)
    I found that C++ isn't too difficult at all so I'll be using it. Besides there are many free (open-source) engines written in C++ that I can use instead of writting my own (that'll be probably better but I need to sharpen my skills before I can do that). I checked out some 3D Engines written in Pascal, but none of them seem to be really good. And as I already know some C/C++, learning from scratch a new language would probably take too much time. For C++ I'm using BloodShed's Software DevC++ Compiler which seems to be good, even at a beta stage (DevC++ 5 Beta 8). Thanks for all the info and feedback on the subject anyway. Thank you all! :0)
    #12
    08/24/2003 (6:42 pm)
    Dev C++ is a great piece software, I have been using it for a while now for Windows dev. Unfortunately, there isn't a huge ammount of help out there for beginners, so if you have any questions about it, or get stuck, then just post here.

    I would take a gander at SDL if you are just starting out (Dev-C++ package here), as it's very easy to pick up, and it ties in nicely with OpenGL for 3D graphics.
    #13
    08/24/2003 (7:37 pm)
    Thanks for the help William. I really appreciate it. I'll check those sites out. Thanx!! :0)
    #14
    08/24/2003 (10:19 pm)
    Quote:this is categorically wrong if you are refering to C++. The compiiler included with the last versions of Visual Studio ( 2002/2003 ) also named Visual Studio .Net are actually the most standards conformant that you can find in a mainstream C++ compiler.

    Wrong. It has the worst validation and compliance suite pass rate of any major compiler, including but not limited to Metrowerks, Intel and Borland.

    It still doesn't correctly handle some template constructs, it does not correctly apply the const qualifier to mangled names 100% of the time, it still doesn't handle placement new reliably, it still doesn't flag redefinition errors as required by the standard for certain combinations of extern and static/inline. The no_throw version of new is still default (although by the standard, the exception version is required to be default), and entire header files required by the standard are not present.

    I'm not going to sit here and discuss it, however you're talking abot the compiler with the worst track record on compliance to standards, from the company with the worst compliance to standards and saying it is the best.

    VS.NET isn't an awful product, don't get me wrong -- but there is a reason why Intel and Metrowerks both now provide C++ compilers that install into VS.NET 2003, and it isn't because it is cost effective to buy a C++ compiler when you already have one installed.
    #15
    08/24/2003 (11:26 pm)
    Yikes. I'd love to see how that argument goes there. I'd also love to see it in a different thread, but hey threads change all the time, right?

    Arturo: Dev-C++ is good, but I'll tell ya something. I gave up on it. I like the VC++ environment, and Dev-C++ tends to have bugs. Maybe I'm talkin out my arse.

    Pretty soon I'll go and buy VC++ Standard, but for now I'm just using the Introductory Edition, which you can find bundled with some good books. (ie: Tricks of the Windows Game Programming Gurus, and at least one edition of Teach Yourself C++ in 21 Days.)

    Now, may I ask if you have ever programmed a game before, or seen the actual code for a game. I'm just lettin you know of a lesson I had to learn: Don't procrastinate with the details. Get Things Done. Remember that game code is pretty plain and straight-forward stuff, and it's often beneficial to just use someone else's engine to save time. So long as you absolutely understand it.
    #16
    08/25/2003 (4:49 am)
    Regarding Modula 2: I played with it a while ago, so I don't know what it's like now. Does it have exception handling? That's one feature that, once I started using, I have a difficult time living without.
    #17
    08/25/2003 (11:46 am)
    Well Dave there is nothing to argue about you are wrong, the latest version of Visual Studio are getting rave reviews from the most picky technical sites and it is getting recommendations in lots of magazines and books at the MOST standards compliant C++ compiler out there.

    There are lots of messages on the usenet groups about old code that was non-standard and should have never compiled breaking with the 2003 version especially.

    I did some checking after George made the same statement about the latest VS compilers . . . I trust him, but I did some research and seems he is right.

    And Dev-C++ is a great idea, but in reality it crashes ALOT except on the most trival of projects, it won't work with very large projects like Torque period.

    Personally I don't think there is a better environment for C++ than either of the Visual Studio .Net version with Visual Assist. And then you add in Visual Python from ActiveState and there really is no competition. I really wanted to use CodeWarrior 8 Pro but . . . Microsoft has really swung the bat on the C++ side of the house lately.

    I have really gotten spoiled with IntelliJ IDEA :(
    #18
    08/25/2003 (11:50 am)
    I had some fun games with Pascal once. But then she woke up.
    #19
    08/25/2003 (2:56 pm)
    Well, I don't have enough money to afford Microsoft's VS.Net so for now I'll stick with DevC++. I have never programmed a game and I'm just starting to learn C++ and I'm plannig to build a game when my experence and skill level allow it to me, although I'd like to create my game right now, it would be impossible. I just asked what language was best for game engines so I could learn it and, hopefully, in a couple of years manage to build my own game. It seems C++ its the more mainstream language out there so I just started learning and am about to buy some programming books. I have seen game code and didn't fully understand it, but as I stated above, I'm just starting to get a hold of C/C++.
    #20
    08/25/2003 (7:51 pm)
    @Auturo - I think that the perfect combonation to learn is C/C++ and Python. For more compelling information about it see the posts Joshua Ritter has made on the subject.

    C/C++ for all the high performance, time critical code and Python to drive the "game" portion. Python is easy to learn and has tonnes of resources. Joshua's post got me into researching it.
    Page «Previous 1 2