PDA

View Full Version : The future of Pascal as language for games



FelipeFS
24-05-2012, 05:59 PM
After some negative criticism on reddit (http://www.reddit.com/r/gamedev/comments/tvnrl/machina_engine_im_developing_a_new_game_engine/) about the language(Pascal) I'm using for my game engine, I was a little discouraged to continue(but my spirits already turned back to normal).

Most of the criticism is because I'm not using C++ as language. After some discussion(on another communities and pages on facebook) I noticed that there is not so much game engines for pascal. Maybe that is why the language is becoming so rare in game development. And, most of the game engines are us Delphi(what is not a good idea, since it is propietary) - I'm developing my game engine for booth Delphi and Free Pascal.

Just wanna know what you guys think about it.

Stoney
24-05-2012, 06:43 PM
Well, Reddit is a tough crowd. :)
Don't be discouraged by it, people are thinking Turbo Pascal is the current modern Pascal.
The fact is Big Fish Games for one is using FreePascal in a few of their flagship titles.

As for engines, I think there are too much engines right now in the Pascal world. Almost everyone here in these forums has his/her own engine, but none of the engines have a particularly high following. With one engine with a higher following, other non-Pascal coders would be more intrigued by it and would let their prejudice get the better of them.

pstudio
24-05-2012, 07:52 PM
If you enjoy writing in Pascal then end of discussion. Write in Pascal.

C++ greatest strength is its history. It's been used in so many years and has become the de facto standard in game development. This means that many great libraries/frameworks for rendering, collision, physics etc. etc. are written in C++ or at least have C++ headers. Besides this massive library I can't see any reason C++ is better than other languages for writing games. Some might mention managed versus unmanaged languages but unless you're writing a triple A title you don't need the control C++ (and Pascal) offers you. However IMO C++ is a hard language to write in. It's easy to learn the syntax etc. but even when you have a good understanding of the language bugs easily creep into your code. IMO Pascal is just easier to write than C++. So unless you need some external libraries and you don't have Pascal headers (or want to write yourself) Pascal should be a fine language.

But I agree with Stoney. There's too many engines written in Pascal compared to the number of users (at least on this forum). Further more there doesn't seem to be any clear advantage to choose one library over the other. If all those people are writing their own engines for learning purposes then fine, but if they want to advertise the use of Pascal as a game development language it would be better if they joined forces and created one über-engine comparable to the best engines written for other more popular languages.
Also most engines seems to stop when they can render sprites and do some basic collision handling etc. If you really want to show how great Pascal is for creating games it would help if you could show an engine that through ~5 lines of code can load a 3D world, render it in high quality and move around with a first person controller that interacts physically realistic with the environment. And it should be easy to implement and add moving entities in the world e.g. by offering modern AI technologies like efficient path finding, behaviour trees, heat maps etc. Unless someone could offer an engine like that I wont consider Pascal for more than simple hobby game projects.

I did some experimentation with Pascal for .NET (oxygene / Delphi Prism) and Unity 3D and I must admit that IMO it is the most interresting use of Pascal in game development I've experienced in many years. If I were to write a game for commercial use I would choose something like Unity 3D because it offers so much more than the engines written by one or two persons in Pascal. But at least I can use Pascal with Unity if I wish to do so.

LP
24-05-2012, 08:23 PM
Just wanted to mention that some replies in "reddit" where you posted about your game engine are completely unfounded, lack any evidence or logic whatsoever. I don't know why this image (http://xkcd.com/386/) comes in my mind. :)

Any way, don't break your head over it: Pascal as a language, FreePascal/Lazarus and Delphi are very powerful tools that in terms of productivity and performance can compete with any other development tools out there and even beat many of them.

Some years ago I was saying that if your writing is bad, don't blame the pen! ;)


There's too many engines written in Pascal compared to the number of users (at least on this forum).
This is true in general and not only for Pascal. This is why it is recommended when you start learning, to begin developing an actual game project instead of an "engine", because by making the game you get full development experience from start to finish.

SilverWarior
24-05-2012, 08:28 PM
Felipe don't get discouraged about what other are saying about pascal. When I started programing everyone were discouraging me from using pascal (Delphi).
Mostly they were saying that Delphi is weak language and there are lots of things that can't be done it it but can be easily done in other programing languages. I must say that it felt verry good when I proved them wrong.
Yes I must admit that there are lots of more tutorials, code samples etc. for C++ than for pascal but this doesn't mean pascal is weak language.

code_glitch
24-05-2012, 09:16 PM
I think its personal choice - thanks to libraries in the form of .dlls and .sos there's no real excuse to isolate other languages, and to be fair - there is very little freepascal and delphi can't do that c++ can. In fact in many areas I'd argue the opposite. I think the criticism from the C/C++ side of the fence is based on their experience with turbo pascal back in the day, which doesn't really translate into the full picture of pascal today.

Reading a few of those reddit posts - I would say that the comments that state pascal has lost a large share of the market is a load of rubbish, pascal has gained traction under the development of delphi, it can now be compiled for java and for flash. If anything, thats the as good a pedigree if not better than what C cam offer.

My last point (since I think you guys get where I'm going with this) would be that any argument made under the delusion that pascal cannot work on the performance/cutting edge end (at least not as well as c) is largely incorrect. Just take a jog around PGD and have a look at all the new stuff popping up everywhere. As for success on the current market - look what Andru did with ZenGl.

In my opinion (irony, I know) I would say that the c crowd trying to marginalize pascal in that way only do it out of ignorance and preference that theirs is the best and only way. Nothing more. Personally, to those people I'd go all out, make something amazing and unique then come back and point out that the code they are now looking at and thinking 'not a half bad idea' was written in pascal - not c - and the reason for that being that you could read your own code without lifting a finger. Something I know C has a very many issues with.

Edit:
pstudio: Having rescrolled the page, and read your post. Uber engine - unbelievably valid point :) You have one supporter here! Although I fear ZenGl pretty much up and did that already ;)

de_jean_7777
24-05-2012, 09:54 PM
I'm also guilty of writing my own engine. Though, from what I've noticed, most people write their own engines in other languages. Mostly because, licensing a major one for commercial work is not possible for most developers. and it can be a great learning experience. I hope you won't be discouraged, because in my opinion Pascal is quite suitable for writing games (or any other form of software), just needs a better foundation (an uber-engine or a very nice library like pstudio mentioned). I'm afraid most people not familiar with modern Pascal don't realize that there is nothing that C++ can do, that Pascal can not. What Pascal needs, if we want to make it more popular, is amazing games made with it.

AirPas
25-05-2012, 08:31 AM
i think because the general idea that alot of ppl have is dalphi designed for database app and c++ for scientific app , and as you maybe noticed that embarcadero and borland previously Focused on database all times , so the name 'delphi' has been associated with databse domain rather than games

Cybermonkey
25-05-2012, 11:48 AM
Here are some humorous thoughts about why Pascal beats C: http://www.pascal-central.com/top10.html (but I think most of you already knew this)
Btw, did you know that for Pascal programmers a C listing consists only of comments? ;D

{
}

SilverWarior
25-05-2012, 04:21 PM
and as you maybe noticed that embarcadero and borland previously Focused on database all times , so the name 'delphi' has been associated with databse domain rather than games

Yes I did noticed that and infact I can't understand this policy.
I can understand back in day Borland focused a lot on databases mostly becouse of their BDE (Borland Database Engine). The main advantage of BDE was ability to work with various types of databases raging from old DOS databases like paradox to all the newest and all this with exactly the same framework. If my memory serves me corect BDE was the only tool back in day to provide that and SQL was stil in development.
But today when we talk about databases we always talk about SQL. Why? SQL is similar to what BDE was back in days with the main difference that it is cros-language and cros-platform compatible. Lets face it nowadays rarely anybody works directly with databases all other use SQL for that.
Yes through out the years Borland and now Embarcadero did developed a lot of standalone programs for working and managing the databases but I still doesn't understand why they focus so much about databases.

I do have to admit that some of the focus has ben turned to FireMonkey lately wich should alow developing application for multiple platforms but still the main focus is on databases. You can even see this by the fact that whole FireMonkey platform focuses on data binding.

And as I'm mentioning FireMonkey here I might share some of my expiriences with it.
The core idea for FireMonkey is good but I'm afraid that its implementation isn't. If you intend to use it for game development I recomed you to stay away, atleast for now. Why? FireMonkey's performace is quite bad.
Having quite simple form with several controls on it and you are already down to les than 30 FPS especialy if you use any special effects that FireMonkey provides.
The special effects that FireMonkey provides also aren't much.
The worst part is how controls works. For instace if you have a form with three trackbars wich are used to determine rotation of some 3D object wich is being drawn by FireMonkey you could expect horible performance (verry laggy). Why? Becouse for some reason FireMonkey seems to be queing events fired by your interaction with FireMonkey-s controls. So for instance when you move trackbar left for three units three events would get qued. And FireMonkey will first rotate your object based of first qued event, than on second qued event, and then on third qued event. And if this 3D object of yours is atleast a bit compex could take even a second for FireMonkey to finish all three events.
If you ask me FireMonkey-s controls should check their imputs only after redrawing phase and not que any events just as games graphical engines does.

AirPas
25-05-2012, 06:04 PM
I still doesn't understand why they focus so much about databases

because it is the most requested in the market

LP
25-05-2012, 07:36 PM
If you ask me FireMonkey-s controls should check their imputs only after redrawing phase and not que any events just as games graphical engines does.
I disagree. Event-based refresh mechanism does not inherently imply low performance or slow performance time. The problem is, as you correctly pointed out, an actual implementation, which in the case of FireMonkey is not good.

SilverWarior
25-05-2012, 08:16 PM
I disagree. Event-based refresh mechanism does not inherently imply low performance or slow performance time.

Yes it can if you que events for a single controll, where only last event matters as in my previously stated example especialy if theese events gets fired before you can finish the drawing sequence.

code_glitch
25-05-2012, 08:35 PM
Hold on folks, before you condemn firemonkey, lets take firemonkey in a context in which it was designed for: visually appealing applications made with a RAD mentality. The goal here is not visual performance - but fast development and 'backend' performance for calculations and databases and etc, something pascal does very well.

Now, I'll be the first to agree it could definitely use optimization in the cases of the graphics - but considering what it gives back to the pascal community, I would say it is revolutionary in a sense, only that its applications are limited and clearly not suited to games. Although this is against my philosophy for any code, it is 'adequate' for the users in a corporate market: appealing visuals, fast development and the only drawback seems to be poor visual performance. To be entirely frank - I doubt the business exec will lose sleep over his database management program rendering slower than 30fps right? ;)

LP
25-05-2012, 09:38 PM
Now, I'll be the first to agree it could definitely use optimization in the cases of the graphics - but considering what it gives back to the pascal community, I would say it is revolutionary in a sense, only that its applications are limited and clearly not suited to games.
I agree on this and would also add that all "revolutionary" technologies when first appeared, had issues in one part or another. For instance, it took several revisions of DirectX for Microsoft to get it "right" and early versions were quite troublesome to work with.

Andru
26-05-2012, 12:07 PM
The future of Pascal as language for games
Pascal is the most aesthetic and usable language ever, so future of it won't change. Only aesthetes and coders will use it, not mainstream :) And under "coders" I mean "people who find great pleasure in the art of Computer Programming"(c) Urban Dictionary.

SilverWarior
26-05-2012, 06:45 PM
Hold on folks, before you condemn firemonkey

It wasn't my intention to condemn it. What I wanted is just to share my expiriences of fidling with it for past month or so.
I know that Embarcadero will put a lot of time into improving it in the future. I also realize that curentily optimization of FireMonkey isn't Embarcaderos main goal, but making it compatible with Linux is. Yes at first Embarcadero thought that Deplhi XE2 will already support Linux by using FireMonkey but there were several problems wich prevented that.
So after they manage to make it totaly compatible with Linux and maybe even some other OS-es they will surely focus on optimizing it for each of the supported platforms. And until then I doubt FireMonkey would be suitable for game development. And to be honest I'll be hapy being wrong about this. But only time will thel.

code_glitch
27-05-2012, 09:37 AM
Can't agree more there Silverwarrior - if and when embarcadero finally to get delphi out for Linux I for one believe in the notion of them getting many many more coders working with Delphi. And although Firemonkey is not mature yet, neither is anything that throws the ball out that far. As for the future of games, firemonkey may well be it once its optimized. In terms of pascal one thing I cn say for certain is that its not 'dead' as some C folk like to think and neither is it outdated. I will concede the point it needs more characters in some instance to do the same, but thats a feature and its called code readability.

I reckon that as long as embarcadero and the folks over at freepascal stick around, pascal will continue growing.

Ñuño Martínez
30-05-2012, 01:52 PM
This is a sacred war that will never end.

One of the origin of this "Pascal isn't a good language" thinking are schools (or it is in Spain). Some schools used Pascal to teach programming basics but they used old and obsolete Turbo Pascal compilers for DOS. Also most programming teachers actually don't know to program in Pascal! Some months ago, in a Spanish forum, somebody asked for help for an exercise. I tell him to wipe out Turbo Pascal and use Lazarus+Free Pascal. When he shows the exercise to the teacher he was in trouble because the teacher didn't believed him and he should install Lazarus and compiled the program to show the teacher he didn't used VisualStudio. That is a big handicap against Pascal.

About the"über-engine", I'll support this too. After the 2nd PGD Challenge I'm learning more OpenGL stuff to upgrade the engine I wrote. I know it will never beat Doom3 but I'll be happy if I can beat Polymost (http://www.jonof.id.au/jfbuild)... ::)


Pascal is the most aesthetic and usable language ever, so future of it won't change. Only aesthetes and coders will use it, not mainstream :) And under "coders" I mean "people who find great pleasure in the art of Computer Programming"(c) Urban Dictionary. 8):D

Carver413
30-05-2012, 04:59 PM
I would be interested in some sort of uber engine if and only if it could be designed in a way that it didn't interfere with my existing framework. what I mean is Glscene has alot of intersting stuff in it but it is built around the delphi model with tpersistence, interfaces, ect. while my frame work is built around a custom linked list design. so to try to us anything from glscene I would have to figure a way to rip all that out and that is simple not desirable. and I would only be interested in modern opengl design it is the future of cross platform design. if your wanting to show people that pascal is not dead then you need to stop using dead code.

FelipeFS
31-05-2012, 04:12 PM
It is comforting to see that there are people who realize the potential of the Pascal language.
This post renewed my courage to go ahead, not only with my game engine, but with the IDE I'm doing for Free Pascal.

:) Thank you very much, guys!

phibermon
01-06-2012, 07:23 PM
I believe that for commercial game development, pascal will one day be a viable choice in the financial sence but that won't happen until there are sufficiently advanced cross platform capable libraries to choose from. And for pascal to be an attractive option for increasingly larger game budgets, it's often preferable within the industry to license engines and libraries that don't require them to reveal their code assets due to various open source licenses.

Now indie development is a totally different matter, we already see FPC compiled games released for IOS and people are making great headway with Android framework designs that can make efficient use of OpenGL. Win/OSX/Lin are all sorted and to top it all off there's a myriad of other supported operating systems as an added bonus.

The best thing that could happen at this stage is for one engine to rule them all, and in the darkness bind them. An engine that does so much for you, that it's just a pain in the ass to consider anything else. I think projects like GLScene are pretty close to that idea and I've seen some impressive engines here in the forums but it's like they've spent their experience points in different stats, and nobody has reached level 60 yet.
*edit* me included. *shame*

LP
01-06-2012, 08:15 PM
I believe that for commercial game development, pascal will one day be a viable choice in the financial sence but that won't happen until there are sufficiently advanced cross platform capable libraries to choose from. [....] The best thing that could happen at this stage is for one engine to rule them all, and in the darkness bind them. An engine that does so much for you, that it's just a pain in the ass to consider anything else. I think projects like GLScene are pretty close to that idea and I've seen some impressive engines here in the forums but it's like they've spent their experience points in different stats, and nobody has reached level 60 yet.

These two statements assume that everyone in the game development industry uses third-party engines for creating games. By this logic, I guess we all should forget programming and software development beyond anything trivial and start using Unity3D from now on... On the other hand, I think you don't need any third-party engines to make even the largest game project, which in this sense is no different than any other software project out there. Therefore, the existence of third-party engines and libraries do benefit the game development community, but they are not essential to consider Delphi and FPC/Lazarus as viable platforms for commercial development.

czar
02-06-2012, 01:22 AM
You can make commercially successful games without spending massive of amounts of money. Take Angry Birds, written in LUA. The hard part coming up with a brilliant idea and pulling it off with style.

deathshadow
15-06-2012, 08:13 PM
I've gotten the "Pascal is dead" asshattery a good deal the past few years... usually they'll point at this ancient article filled with half truths and outdated information (http://www.pbm.com/~lindahl/real.programmers.html) as their justification -- they'll call the language 'useless for doing anything' or "inferior to C dialect for getting to the hardware" when that's total 100% grade A farm fresh MANURE!

... and I love rubbing their noses in the sheer number of programs written in Pascal they are probably using and don't even realize it!

Avant? (the IE wrapping browser?) Asus Power4Gear? ThinkSQL? Pixel? GBXEmu? FLStudio? PC Tools Spyware Doctor? Inno Setup? CambridgeCAD? MSI Afterburner? MediaMonkey? PE Explorer? MyCORSA? AVS? BitZapper? IMGBurn? Daring Apprentice? Space Rangers 2? All of CoffeeCup's software?

... and that's the little stuff... How about Partition Magic? MagicISO? CloneCD? IcoFX? Spybot Search & Destroy? ADAWARE?!? WINRAR?!?

How about this one: SKYPE?!?

All those software packages? Written in Delphi... or Lazarus+FPC when there's a cross-platform version. Modern Object Pascal being used to build modern applications... Quite often for multiple platforms at once!

It goes back to something I've been saying for years, the only thing holding Pascal back was a lack of a decent cross platform compiler. Delphi was a good start to keeping Pascal modern by tossing Visual programming on top of it, but FPC+Lazarus takes that cross platform. There's really little you can do in C or C++ that a modern Pascal compiler like Delphi or FPC can't do.

Well, other than write needlessly and pointlessly cryptic code with a half assed object implementation. C++ really excels at that -- hardly surprising since we all know that C and Unix are a hoax. (http://www.gumberoo.org/cAHoax)

But as I've said a million or so times the past 30 years, I'd sooner hand assemble 8k of Z80 machine language than try to find a bug in 100 lines of C code.

I swear that C and it's derivatives exists for the sole purpose of perpetuating the idea that programming is difficult -- it isn't... Assembly is simpler than C! It is an ugly, half-assed language that I cannot fathom the desire to use.

But to keep that in perspective, I say the same thing about HTML 5.

User137
16-06-2012, 03:39 AM
That is some interesting list of software you got there. I think it's many of the people that discover pascal, that think it is good. But i know exceptions too that are just lifelong C-coders that won't change. Support for C is just too big, especially if their operating system is Linux based.

But the issue relates to another topic, which is "Game making in general as a hobby is dying". Nobody really makes these small games and experimentations that we use to see some years ago. The standard that modern games put on us is a little depressing. It's not possible to reach them with just some homemade game-library, against commercial engines built by hundreds of coders with huge mathematical expertise. The barrier that something like Super mario karts, or Doom 2 put, is not that big. Many can attempt to make better games than them, but already something like Unreal Tournament goes beyond the limit, and it was already released before 2004. Now the expectations are sky-high.

Cybermonkey
16-06-2012, 07:39 AM
I swear that C and it's derivatives exists for the sole purpose of perpetuating the idea that programming is difficult -- it isn't... Assembly is simpler than C! It is an ugly, half-assed language that I cannot fathom the desire to use.

Absolutely correct!


Game making in general as a hobby is dying.

That's my impression, too.

LP
16-06-2012, 01:07 PM
I swear that C and it's derivatives exists for the sole purpose of perpetuating the idea that programming is difficult -- it isn't... Assembly is simpler than C! It is an ugly, half-assed language that I cannot fathom the desire to use.
I think you are confusing C with C++, which is quite a jump from one to another. C is like Pascal without objects, which at these days would be quite useless. I don't know why you keep bashing C since as you have said yourself, it's pretty much dead. You should be comparing Delphi / FPC to something on the same level, for instance C++ Builder (Embarcadero), which is also quite a powerful tool.

Other than that, I wouldn't say that Pascal is any better or any worse than C++ (even though there are some things I like in Pascal more), it depends on how your code is written. There have been notorious examples on both ends: I have seen Pascal code that was so poorly written, where you would probably look for other alternatives including C++ if you want to understand what it was doing. (cough... GSM encoding... cough)

SilverWarior
16-06-2012, 02:10 PM
But the issue relates to another topic, which is "Game making in general as a hobby is dying". Nobody really makes these small games and experimentations that we use to see some years ago. The standard that modern games put on us is a little depressing. It's not possible to reach them with just some homemade game-library, against commercial engines built by hundreds of coders with huge mathematical expertise. The barrier that something like Super mario karts, or Doom 2 put, is not that big. Many can attempt to make better games than them, but already something like Unreal Tournament goes beyond the limit, and it was already released before 2004. Now the expectations are sky-high.

I don't agre with you on that. Probably I would a few years ago but not today.
Why? What has happened since then? I would say Minecraft happened. Don't get me wrong I don't say that Minecraft alone is the reason why I disagre with what you are saying. But when Notch sucseeded with Minecraft despite Minecraft having poor graphics this inspired many other indie and hobby game developers to work on their own games.
You see the gaming industry is putting a huge amount of money into advertising their own games as well as into development of advanced game engines. The gaming industry also aqured IP rights for most sucsesful titles they were in gaming world mostly buy buying small gaming studios. Why? This is the way they try to gurante themself to be earning bug bucks seling their games even when some of them are catastrophic. And when some indie game developer makes a potentionally sucsessful game they quickly check if some contents of that game might violate some IP rights from many game titles the industry aquired in the past.
I have seen several game project being closed becouse the gaming industry was saying that those games are violating IP rights from some other game(even some old ones wich are nowhere to be bought anymore). For some cases I'm convinced that the gaming industry would not sucseed to terminate theese projects if all would come into court. But the hard truth is that most indie developers don't have enough mony to afford being sued by the gaming industry. So many of them have just canceled development to avoid all that.
And that is the main reason why there aren't so many indie developers out there.

But the situation is changing. In the last mont alone I found several good and promising game projects. Last two were Towns and Gnomoria. Also you shouldn't forget about flash games. I belive that most small games are now being built in flash. Just go and visit some internet site with flash games and look at the selection it is offering. The main reason for that is probably the fact that flash games can be run on almost all platforms (and you don't even need to have any platform specific code for that). The similar goes to JAVA. And I belive HTTM 5 will folow.

So what does your game needs to sucseed in theese days? High end graphic engine with support for best graphics and visual effects? NO! Your game needs just some uniqe idea. Why? Take a look to all those big games develiped by all those big gaming studios. Dosen't most of them seems the same?
Until we indie developers would be implementing new ideas into our games we would always be able to compete with theese big gaming studios. WHy? Truthfully the players are slowly becoming tired of playing the "same" games over and over and seek some uniqe games. That's why we have several sucsessful games being developed by lone programers or small indie teams.

AirPas
16-06-2012, 04:06 PM
short answer : the future of pascal as a language for games determined by (pascal coders) not by the language itself .

SilverWarior
16-06-2012, 07:58 PM
short answer : the future of pascal as a language for games determined by (pascal coders) not by the language itself

Exactly! So lets stick with it and show all other pepole who think pascal is not good for games how terribly wrong they are.

wagenheimer
16-06-2012, 11:52 PM
Well, I'm doing my living from Pascal Games for several years and I hope to be creating Pascal Games for a long long time yet, I don't see any reason to exchange to another language. Windows/Mac/iOS/Android. Pascal does have everything I need! =)

Druids Battle of Magic - Windows (Mac and iOS ports to be released)
http://www.bigfishgames.com/download-games/988/druidsbattleofmagi/index.html

Abra Academy - Windows
http://www.bigfishgames.com/download-games/1465/abraacademy/index.html

Abra Academy - Returning Cast - Windows
http://www.bigfishgames.com/download-games/2184/abra-academy-returning-cast/index.html

Dreams of a Geisha - Windows/Mac/iOS
http://www.dreamsofageisha.com

Sultan's Labyrinth - Mac and iOS
http://www.bigfishgames.com/download-games/15436/mac/the-sultans-labyrinth-game/index.html
http://itunes.apple.com/en/app/the-sultans-labyrinth-hd/id465814548
http://itunes.apple.com/en/app/the-sultans-labyrinth/id465814690

Sultan's Labyrinth - A Royal Sacrifice - Mac (iOS to be released)
http://www.bigfishgames.com/download-games/17169/mac/sultans-labyrinth-a-royal-sacrifice/index.html

And I do have more 4 games scheduled to be released this year! Well, I'm really sure Pascal is not dead for GameDev! =)

deathshadow
17-06-2012, 01:38 AM
I think you are confusing C with C++, which is quite a jump from one to another. C is like Pascal without objects, which at these days would be quite useless. I don't know why you keep bashing C since as you have said yourself, it's pretty much dead. You should be comparing Delphi / FPC to something on the same level, for instance C++ Builder (Embarcadero), which is also quite a powerful tool.
First, notice I say "and it's derivitives", so I'm putting C#, C++, PHP, Java, Javascript, LSL, etc... Not just "C".

Second, they ALL share being needlessly cryptic, having a structure nowhere near that of assembly (despite the wild and nonsensical claims to the contrary, line numbered BASIC was closer to ASM than C in terms of syntax!), lacking all the tools to prevent errors in the first place that pascal does. No forward declaration, typo's instantly become new variables, complete lack of range checking, compilers so stupid they resort to =, == and === as separate operations, complete lack of a real STRING type, did we mention a complete lack of range checking and lack of a real string type so buffer overflows are inherently the name of the game? (admittedly modern pascal's have tread into this #DDD idiocy with pChar), the seemlingly random and inconsistent use of -> vs. . on STRUCT, the outright annoying idiocy of .h files (because maintaining two files that redeclare the same thing is SO useful.. admittedly I'm the same way about interface/implementation in unit), willy-nilly error handling...

... and did we mention it being needlessly cryptic? This is even MORE true of C++, which is even MORE half-assed and pointlessly so than C. It is probably the worst object implementation I've dealt with, and on the whole seems carefully crafted to make 100% sure every program is susceptible to buffer overruns, memory leaks, and illegible inconsistent code.

Though you do have a point, bad code is bad code, regardless of what language it's written in; the difference to me is the amount of bad code C lets past the precompiler, compiler and dozen other points at which they could easily have been trapped.


As the joke goes, Pascal won't let you shoot yourself in the foot (http://www-users.cs.york.ac.uk/~susan/joke/foot.htm)

You want to see REALLY pointlessly cryptic though, have a good look at Rust... A language for the people who thought that C is a bit too verbose and clear for their tastes -- which is a bit like saying the Puritans who settled in Boston in 1630 traveled across the pond because the CoE was a bit too warm and fuzzy for their tastes.

Super Vegeta
17-06-2012, 11:59 AM
Ok, now you're exgerrating a bit.


(...) lacking all the tools to prevent errors in the first place that pascal does. No forward declaration, typo's instantly become new variables
Uhm, forward declaration is exactly the thing .header files do in C. And if you mean forward declaration of variables, well, there's nothing that would hold you back from putting all the vardecls at function beginning, then slapping a newline or two and putting actual code. I don't know a lot of languages, but typos becoming new variables is mostly a PHP thing, where "first appearance equals declaration" is a means to make coding faster. No such thing appears in C/CPP.


=, == and === as separate operations
Well, yep, this is somewhat annoying, but mainly due to the fact that = also returns a value (otherwise a=b=c would not be possible), so putting "if (a=b)" instead of (a==b)" works perfectly fine and most often, if the compiler isn't set to verbose, it won't even give you a hint that there is an assignment instead of comparison in the conditional. As for ===, I gotta say, that's my most beloved PHP syntax element. :D


seemlingly random and inconsistent use of -> vs. . on STRUCT
derp. Sorry, but no. It's exactly the same as use of "^." vs. "." on Pascal records/objects. The -> operator in C-like languages stems from the fact that dereference is done by putting * before the varname - and, as far as my memory goes, the dot has higher priority than the asterisk, so you must do "(*a).b" in order for it to work. This thing is obviously hard to read, so to easen things up, the -> operator was introduced. So - if it's a static var, you go ".", if it's a pointer, you go "->", as you would go "^." in Pascal. Nothing random nor incostistent for me.

Every language has its pros and cons, that's needless to say. Pascal sometimes tends to get a bit to verbose, while minimalism is one of key traits of C. This most often makes writing in C-derivatives quicker and I'd even say, easier. As much as Pascal purposely introduces some error control, C purposely does not so - following the thought "if you don't want to, no one will force you". So, following the foot joke, it's kind of "compiler forces you to make sure you aren't aiming at your foot before shooting" vs. "you can shoot wherever you like and checking whether you're not aiming at your own foot is up to you".

As for me, one of the things that still keeps Pascal back is a lack of a good IDE. Recently I had to, as part of my studies, write an app in QtCreator - and honestly, I found it quite entertaining, as the thing had all the syntax completion I could ever long for, drastically reducing the amount of key-smashing needed. As for Lazarus, well, dunno, maybe it's just me, but I absolutely hate hate hate the "shitload of floating windows" type of interface - I would much prefer if there was an option to have a "single window with embedabble/movable/switchable panels" one.

SilverWarior
17-06-2012, 03:36 PM
As much as Pascal purposely introduces some error control, C purposely does not so - following the thought "if you don't want to, no one will force you". So, following the foot joke, it's kind of "compiler forces you to make sure you aren't aiming at your foot before shooting" vs. "you can shoot wherever you like and checking whether you're not aiming at your own foot is up to you".

I can't say for FPC/Lazarus but in latest versions of Delphi you can turn off a lot of theese error checkings. I personally rather see that compiler warns me of potentionally bad code rather than I have to go bughunting becouse of one single poorly writen line. I started programing in C++ and I must say that I had huge problems in making simple code work properly.


As for me, one of the things that still keeps Pascal back is a lack of a good IDE. Recently I had to, as part of my studies, write an app in QtCreator - and honestly, I found it quite entertaining, as the thing had all the syntax completion I could ever long for, drastically reducing the amount of key-smashing needed. As for Lazarus, well, dunno, maybe it's just me, but I absolutely hate hate hate the "shitload of floating windows" type of interface - I would much prefer if there was an option to have a "single window with embedabble/movable/switchable panels" one.

Pascal does have a good IDE and it is Delphi. It alows a lot of syntax autocompletion. The only thing about it is that it forces it's own style of code formating wich is a bit different that the one I'm using.
As for the floating windows from Lazarus. They are implemented like that to mimic Delphi 7 interface. It can become quite useful when programing on computers with multiple monitors. Having floating windows easily alows you to have code window on one screen and Form design window on the other.

And if we are talking about pros and cons I think that the biggest pro for pascal is the ability for quickly rebuild existing project (only units wich has ben changed gets recompiled all others are already compiled from before). Becouse of this you don't have to wait several minutes for some big project to be recompiled just to see how change of a single line affects your application.
I rember the days when I began programing in C++ and had to wait up to a minute to compile some of a bit more advanced Helo World program.
Yes I know that some of today IDE-s for programing in C++ already allow precompiled units but most of them are still slower at linking them together than Delphi for instance.
And finally I probably shouldn't even mention that in some cases Pascal based programs runs better than those made in C++ even when they have same function implemented.

LP
17-06-2012, 05:50 PM
...complete lack of range checking...
Just wanted to comment on this: in all our projects, range checking is assumed to be off. The reason for this is that in many situations number wrapping is the desired behavior, not to mention that range checking slows the execution down, so it should only be used in debug builds anyway. The appropriate software design comes into mind that you should make your code fault tolerant and if a parameter has invalid range, you should return the feedback appropriately.

Regarding other syntax discussion of C++ vs Pascal, I think it's been fought to the death already and my opinion is that both have reasonably good syntax. For that matter, I try to stay away from Basic and its derivatives, and Fortran, which is, unfortunately, still quite popular in scientific community. :(

Relfos
18-06-2012, 10:50 AM
As someone already said, the future only depends on us using the language. Lots of people criticized my use of pascal instead of C++ for developing my engines and games, but over the years (around 15 of pascal) I've always proved them that it was more than enough for my needs :)

Eric
18-06-2012, 11:41 AM
You can make commercially successful games without spending massive of amounts of money. Take Angry Birds, written in LUA. The hard part coming up with a brilliant idea and pulling it off with style.

Definitely.

A good idea isn't enough, you also need good style, good execution and good marketing/buzz.

The game mechanics of Angry Birds f.i. were not invented by Angry Birds, there have been quite a few (more or less experimental) predecessors, and where Angry Birds succeeded was in:
- having cutesy characters that "scaled" well in the real-world and had enough fun/appeal (ie. good stylistic ideas, predecessors were unimaginative bomb or rock throwing)
- great execution on churning out levels and themes to keep the trend going (most predecessors had neither the polish nor the quantity)
- great marketing (viral buzz "the way it has to be done")

Overall I would say the code and engine are the simplest and cheapest part in terms of man/hours.

farcodev
18-06-2012, 10:13 PM
I put my 2 cents a bit late, but better late than never, and sorry if I perhaps repeat what said other people, I writing it in a rush need to support the language :$.

The fact is that you can do anything with Delphi, the other fact is that many people sweat only for Unity these years and so the old Objective-C. The fun of that is that the use of this language before it was lost in the fog.

We mustn't forget that Delphi must thanks to FreePascal/Lazarus duo to keep the language afloat, especially since there's no free version of Delphi for basic use. Visual Studio and Unity start free... But it's also a beaten debate...

Borland marketing is for a lot of the state of Delphi today, why ? because its main market position was for database dev, not very fancy isn't it ?

Embarcadero apparently try to break that with Firemonkey.

that's my 2 cents

WILL
03-07-2012, 08:20 AM
You can make commercially successful games without spending massive of amounts of money. Take Angry Birds, written in LUA. The hard part coming up with a brilliant idea and pulling it off with style.

I would also add that having a talented artist in your pocket doesn't hurt either. Nice looking assets can make all the difference from looking amateurish to professional or even stylistically cleaver. Minecraft might not have as much oomph in the 3D graphics department, but you still need someone with at least an ounce of visual talent to make the game look decent and complete all things need done.

From my experience I've noticed a huge difference in my own projects when I had a talented person who is committed to my graphics needs versus trying to create things myself or using programmer art or even friends and colleagues who don't exactly have a nack for professionally looking artwork. Garland's Quest as a direct example will be able to make a good run for it's cost on stores like Apple's App Stores and Steam thanks to the extra visual oomph that hiring a professional artist has given it.

Not that you have to hire a professional artist, but if you don't have a "committed" person with this talent in your group, you may need to shop around for one. ...and get a commitment!

This bares nothing for the language it's self as it's a common rule for an indie developer of ANY language. It's just good practice if you want to get serious with Pascal game development and want to have a good run of it. ...same is said of any language though.

I do however love seeing all the commercial games coming out from Big Fish games that stretch multiple platforms, especially iOS which proves it's being kept current by those making tools and libraries for it.

Cezar is a notable contributor to this cause. I hope to follow within a year or so with one of my own titles myself... finally! ;)