Page 7 of 9 FirstFirst ... 56789 LastLast
Results 61 to 70 of 84

Thread: C/C++ vs Pascal

  1. #61
    Yuriy got some good points

    C# disadvantage is the .NET framework, you sometimes have to download packages that arent include in youre version or if its included in the installation it make it often bigger then the game itself

    when i started with Java in my schooling i found Java really slow and some stuff was really complex to code, it was said that Java will be the magic language and in 5-10years it will be the common programming language (what a joke)

    i still wait to see if HTML5 can manage to take the lead in smartphone developement
    do anyone think HTML5 is just another hype or will it become a good standart for web and crossplattform developement?
    only tried a few games written in HTML5, havent read that much about it yet

  2. #62
    Quote Originally Posted by Daikrys View Post
    Yuriy got some good points

    C# disadvantage is the .NET framework, you sometimes have to download packages that arent include in youre version or if its included in the installation it make it often bigger then the game itself

    when i started with Java in my schooling i found Java really slow and some stuff was really complex to code, it was said that Java will be the magic language and in 5-10years it will be the common programming language (what a joke)

    i still wait to see if HTML5 can manage to take the lead in smartphone developement
    do anyone think HTML5 is just another hype or will it become a good standart for web and crossplattform developement?
    only tried a few games written in HTML5, havent read that much about it yet
    At the moment I am digging into Javascript/HTML5 and I think (if the mobile browsers/machines become faster) it will dominate the game development on smartphones. If I may post some links here:
    http://www.brighthub.com/hubfolio/ma...s-element.aspx
    http://kevs3d.co.uk/dev/asteroidsbench/ (Interesting benchmark, FF seems totally slow when it comes to the canvas element).
    http://sebleedelisle.com/2011/04/htm...ised-for-ipad/

    Okay, enough off topic, I've just realized this topic is about C/C++ vs Pascal. ;-)
    Best regards,
    Cybermonkey

  3. #63
    Quote Originally Posted by AirPas View Post
    if you chose any language , you will win things and losing things .
    in windows os i belive that VC++ produce the most optimized code .
    i think you may be right if you spoke of vc 2003, but later editions have gone dreadfully down hill, latest tests showed gcc provided better assembled code than vc 2005, 2008+

  4. #64

    Lightbulb

    Hello PGD Community. As a professional game developer I felt compelled to offer some insights into this topic from a different point of view.

    The natural reaction is to defend whichever language presents the least resistance, which isn't a bad reaction but it's not necessarily right because this opinion is biased by whichever language you know the best. From the average PGD visitor that language will be Pascal, but Pascal as well as other languages can offer interesting and unique low resistance solutions to certain problems.

    There are pros and cons to using any language. Off the top of my head I can think of at least a dozen problems with C++ as a language, maybe more if I put my mind to it, so why do we use it? In priority order, they are:
    1. Every platform supports it (PC, Consoles).
    2. Everyone already knows it.
    3. One way or another it does everything you need it to.


    I'm not saying any one of those is a hands down winning reason, though it does help a lot if your team all know (and use) the same language. What we're talking here is the path of least resistance. I think there are several reasons why C (and then by evolution, C++) became prolific, but none so important as the venerable Unix - the first OS to be written in C, which went on to become an open standard. I'm not saying C/C++ has popularity for the right reasons, but it is arguably very popular. Maybe less so now that other languages exist that solve some of C/C++'s more difficult problems, but those that still use it have a good reason, which ultimately comes down to taking the path of least resistance so they can get their job done to the required standard.

    Speaking of performance in C++ is a moot topic. Most often the biggest performance win is gained by carefully choosing your data structures and algorithms, which applies to any language. In more recent versions of the Visual C++ compiler (2008, 2010), the biggest performance gains from plain old compiler output are in runtime analysis aka profile guided optimization, but often the compiler you use is not a choice you make, you work with the tools you have and the job of the engineer is to make the most of those tools and the target platform architecture. So whether it's GCC or Visual C++ doesn't really matter, you will always find a way to get the best performance out of either or the other. That's our job.

    If you're talking about something other than console games, then other languages apply just as easily. For example C# is the language for Unity, XNA, MonoTouch, and of course C# is great for developing desktop and web applications. In fact the games industry uses C# for tool development, but as is often the case, it varies from one developer to another. Epic for example choose to use C++ and wxWidgets for UnrealEd, but then for them that fulfilled their goals and offered the path of least resistance. However, you wouldn't catch Zynga using C++ to write their social games, because that would conflict with their goals.

    HTML5 is becoming increasingly important in the social games battlegrounds. Though Flash (and even Java) offers a more predictable platform, though more of a desktop platform, Flash is currently the default choice. As social games begin to transition to mobile as well, HTML5 is growing in significance, but in practical use it's difficult because of radically unpredictable performance and sporadic vendor support - though that is changing all the time, and in my opinion will become the default choice for social developers in the near to mid future.

    If your goal is simply pleasure, there is no good reason not to use whatever language suits you best. Good games can be written in any language, including Pascal. What really matters most is that you're doing something you enjoy.

  5. #65
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Erm... This is beating around the bush after its empty (or at least feels like it) and of course, welcome to PGD glib, but I can't help noticing:

    [QUOTE]

    1. Every platform supports it (PC, Consoles).
    2. Everyone already knows it.
    3. One way or another it does everything you need it to.

    1. Pascal (and dialects) are supported on GBA/NDS/ARM/X84/X86_64/Wii/GameCube/PS2/Xbox. Thats most of them done is it not? There are rumours about the PS3/PSP
    2. If your school where you learnt C/C++ did not teach you pascal - I'd be surprised. Aside, Pascal is C/C++ just without the confusing syntax no?
    3. What does pascal not do one way or the other?
    The old arguement was the C/C++ was faster than pascal - now if we benchmark the new C variants that are in the Visual Studio suites its hard to find one instance where .NET is left out of it - and .Net is not exactly the fastest horse in the race...

    I guess you could always use the XNA and framework argument - BUT I find pascal easy enough to use we don't need a framework like XNA to make it easier, plus we have the Direct3d bindings if thats what floats your boat...

    My problem with flash is that the (cough cough) supplied (choke) hardware arghhhh-celeration is dodgy at best... My ATI HD4330 plays a lot of games in med/high, yet battles with some flash games!?! Sort of the same problem for Java. I mean, how does C&C3 in med/high use less power than miniclip?

    Not saying you're wrong or anything, just continuing the jist of the thread - C/C++ is just chosen out of popularity over pascal, its not really down to propper reason in many cases.
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  6. #66
    Thegilb, thanks for some interesting points! I'd like to discuss some of them.

    Quote Originally Posted by thegilb View Post
    The natural reaction is to defend whichever language presents the least resistance, which isn't a bad reaction but it's not necessarily right because this opinion is biased by whichever language you know the best. From the average PGD visitor that language will be Pascal, but Pascal as well as other languages can offer interesting and unique low resistance solutions to certain problems.
    In this context and considering what you said, for what language is your own opinion biased to?

    Quote Originally Posted by thegilb View Post
    There are pros and cons to using any language. Off the top of my head I can think of at least a dozen problems with C++ as a language, maybe more if I put my mind to it, so why do we use it? In priority order, they are:
    1. Every platform supports it (PC, Consoles).
    2. Everyone already knows it.
    3. One way or another it does everything you need it to.
    Well, it will be somewhat difficult to actually prove all of these points literally. However, the truth is that this is a very common fallacy, Argumentum ad populum/numerum. Many people knowing it, or using it does not make it the best choice, even for those people themselves.

    Quote Originally Posted by thegilb View Post
    I think there are several reasons why C (and then by evolution, C++) became prolific, but none so important as the venerable Unix - the first OS to be written in C, which went on to become an open standard. I'm not saying C/C++ has popularity for the right reasons, but it is arguably very popular.
    Actually, the fallacy I've mentioned above is also called "Appeal to Popularity". C/C++ being popular at some point in history does not mean it was the best language or even the best choice at that time.

    Quote Originally Posted by thegilb View Post
    Speaking of performance in C++ is a moot topic.[...performance discussion...]
    You have agreed yourself that the performance is gained by choosing data structures and algorithms carefully, which applies to every other language; therefore, I don't understand why you keep discussing C++ performance alone. No comparison was made to "Pascal" performance, you simply acknowledged that compiler optimizations that are present in Pascal compilers are also present in C/C++ compilers.

    Quote Originally Posted by thegilb View Post
    If your goal is simply pleasure, there is no good reason not to use whatever language suits you best. Good games can be written in any language, including Pascal. What really matters most is that you're doing something you enjoy.
    According to the above, if the pleasure is NOT one of your goals and/or if you are not doing something you enjoy, then what language should you use?

  7. #67
    Quote Originally Posted by code_glitch View Post
    My problem with flash is that the (cough cough) supplied (choke) hardware arghhhh-celeration is dodgy at best... My ATI HD4330 plays a lot of games in med/high, yet battles with some flash games!?! Sort of the same problem for Java. I mean, how does C&C3 in med/high use less power than miniclip?
    Most off flash games doesn't even use full hardware support, like OpenGL or DirectX. That's why CPU load is alway high while playing theese games. Also another drawback are browsers. Why? Not all browsers support full hardware support for any flash game. For instance there is a big difference between Internet Explorer 8 and internet Explorer 9. Why? Internet Explorer 9 is using DirectX surface for renderning page graphics (including graphics of flash applications) . Becouse of this the renderning itself is done with the help of a graphic card, wich leaves more CPU power to proces something else. In Internet Explorer 8 the pages were renderned on a normal window surface (exuivalent to canvas), wich is much slower and uses much more CPU power.


    Now for the main subject of the theme.
    I like Pascal much better than C/C++ even thou I first started programing in C++. Why?
    1. Pascal sintax is much more comprehensive for me
    2. Delphi IDE wich I'm using has many neat fetures and even a good runtime optimizer.
    3. I like the ability to be able to declare local variables wich are accesible only from certain function oz procedure. I also like when theese variables are being automaticly freed when function or procedure ends (ending in regular way or by some exception). This helps alot in lowering memory leaks.
    4. I like how projects are being precompiled and then linked. This way only the units wich has been changed from the last compilation are being recompiled, all other units are just being linked into the application. This enables much faster compilation, and actualy alows you to build an application wich is in a signle file.
    5. I DON'T like tha fact that it is sometimes very hard to find some code samples, due to lower popularity of Pascal, especialy if you are trying to looking for the code wich utilizes latest technological fetures. I especially don't like when I find some poor C++ or VisualC to Pascal translation, becouse most of the times the code doesn't work as efficient as the one in C++ or VisualC, and all off this only becouse off a poor translation.

  8. #68
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    I'll chirp in only to say that a lot of what was Pascal way back when, is not Pascal now. A lot has changed for all the fun variations of Pascal in the last 5 to 10 years. Too many to list in a small post. By popularity there is approx. 4 different standards or "languages" based off of the original Pascal langauges; Classic(Borland) Pascal, Object Pascal, Objective-Pascal and (most recently declared) Oxygene. Then there are all those new and fun differences based off the various compilers. (Free Pascal and Delphi specifically)

    Pascal is now everywhere where as 10 years ago it was not. There is a bit of a curve for the computer science public to catch up to a new state of things as information doesn't always get passed on about Pascal since we are coming from a very small set of communities and are steadily growing.

    Just wait one of these days in the future there will be some crazy guy whos like me, running their own small C-based community long after the Pascal language has taken over the industry.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  9. #69
    Quote Originally Posted by Lifepower View Post
    Thegilb, thanks for some interesting points! I'd like to discuss some of them.
    Sure, I've got a bit of time to kill.

    Quote Originally Posted by Lifepower View Post
    In this context and considering what you said, for what language is your own opinion biased to?
    It really depends on the project. Based on the task in hand, I might choose from Actionscript, PHP, Javascript, C/C++, Pascal, Java, Ruby, Python, C#, Assembly (80x86, x64, PPC, ARM), Objective C. Those are all of the most common languages I work with, though more recently I have been learning Erlang, io and Go.

    Quote Originally Posted by Lifepower View Post
    Well, it will be somewhat difficult to actually prove all of these points literally. However, the truth is that this is a very common fallacy, Argumentum ad populum/numerum. Many people knowing it, or using it does not make it the best choice, even for those people themselves.
    I agree, but conversely that doesn't necessarily make it a bad choice, if both languages are similarly capable. The language will not itself write good programs for you, it is in the hands of the engineer to write good code.

    Quote Originally Posted by Lifepower View Post
    You have agreed yourself that the performance is gained by choosing data structures and algorithms carefully, which applies to every other language; therefore, I don't understand why you keep discussing C++ performance alone. No comparison was made to "Pascal" performance, you simply acknowledged that compiler optimizations that are present in Pascal compilers are also present in C/C++ compilers.
    I'm not defending C++ or Pascal here. Performance alone is not necessarily a good reason for choosing a language. If performance was of paramount importance then we'd all be working in Assembly language. However, since we're not, what's the reason for that? The simple answer is that put simply, a program that takes 6 months to write in Assembly can be written in a week in a high level language such as C or Pascal. Considering the size and complexity of your average console game, you could be looking at development times that run into decades and only written by immortals.

    The modern developer will often rely on the compiler to produce optimal code, but no compiler is perfect. Some careful profiling can yield a few fps boost in problem areas, but often the biggest gains are in careful choice of algorithms and data structures. Nearly all programming languages allow developers to make these choices, after all, that's their job. It is up to the engineer to write optimal code, the compiler is just a tool to help.

    Quote Originally Posted by Lifepower View Post
    According to the above, if the pleasure is NOT one of your goals and/or if you are not doing something you enjoy, then what language should you use?
    Well, then it's time to consider a career change

  10. #70
    Quote Originally Posted by WILL View Post
    Just wait one of these days in the future there will be some crazy guy whos like me, running their own small C-based community long after the Pascal language has taken over the industry.
    You have a cool community here, you guys are going from strength to strength, and it's great to see the enthusiasm on here.

    When the day comes that Pascal takes over the world, you guys are well prepared!

Page 7 of 9 FirstFirst ... 56789 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
  •