What programming language do you think would be best for the future of game development and why?
Or if they were to build their own programming language what features would it need?
Update:
After discussing the issue with users on the forum I think that a bespoke Unity language could be the ideal way to go:
Like Chapel it could be built from the ground up to be parallel.
It could also be designed to run on CPU’s and GPU’s.
It could have a simpler and easier to understand syntax e.g. Swift
It could have more powerful frequently used commands built in e.g. Line Of Sight → LOS
It could have more game oriented programming features built in e.g. Aspect and Agent Programming, FSM, Deep Learning System (ideally).
It could and arguably should be built hand in hand with a Visual programming system.
Many but not all of the above improvements could be added to Unity’s existing API.
But just give it some thought or let yourself daydream for a moment, as you are typing in reams of boilerplate code to make your next great game.
If Unity had a bespoke language with a simpler syntax, how much code should this really take?
Update2:
You probably want Unity to provide a Visual node based programming solution, but really you are asking Unity to make a simpler programming language that is visual, think about it.
My thinking is C++ is what Unity itself is written in which should eliminate the “gateway” overhead of callbacks from C++ to C# also C++ is a fine language in itself.
Maybe they can convert their C++ to Assembly and create an Assembly API and add support for writing games in Assembly. Macro assembler of course. That could be interesting.
I guess you are thinking of going the other way creating a language that does far more with less.
I think a new language is not really needed for that rather some wrappers around their existing API. Which basically is what we find on the asset store from other devs.
I would shoot for some form of BASIC (visual basic?) … a language which is really simple and easy especially for newcomers, without all the curly-braces malarky of unity script and c# … something like BlitzMax maybe. It could still have classes and stuff but just be generally simpler overall and easy to type and not so heavy on the picky syntax.
I have used a number of different programming languages over the years, ZX Basic, BBC Basic, Amiga Basic, MS Basic, Blitz Basic, Blitz3d, Turbo Pascal, Delphi, C/C++, C#, Java.
And found that sometimes the languages that were most fun/powerful to use had more direct platform/task/genre specific functions/commands, from easy access to graphics/sound hardware features or game specific features e.g sprites.
Imagine the amount of code you would not need to type if UT changed the ‘getComponent<>’ command to syntactical feature ‘.<>’
I’m not claiming to be a language developer but having used some very good languages over the years I can imagine a Unity specific game development language could be developed with some fundamental improvements for programmers as listed above.
I suggest that UT asks a language designer like Anders Hejlsberg who developed C# for Microsoft.
Who knows UT could develop G# (if G is not already taken).
Would have to be either C++ or Python if it was anything-
I agree with Gar about benefits to C++, and add that it would make it easier for devs coming from Unreal.
Stretching a bit, I’ve found that C++ and python experience are more versatile and marketable skills when it comes to software development in general. Granted, Unity doesn’t care about that, but it’s certainly a benefit- I know I’d have more resources to put into game design if I was making Software Development dollars.
I’m sure they would rather expand the Animator state machine into a Visual scripting tool before adding new languages. What with Unity Personal being free, catering to non-programmers is probably higher up on their list.
Someone doesn’t know some useful things about C#/.NET it seems.
C# has a System.Threading library that has methods designed to do this, including mutexes. I do not know whether or not the flavor of MonoDevelop that Unity has these, or how well they play with the rest of the Unity engine. Source: Archived Documentation
C# has some design patterns baked into the language, or their need mitigated by language features:
The Command pattern is largely unnecessary in C# due to the implementation of function delegates/first-class functions/closures, and the .NET 3 delegate types, Action<T0…T15> and Func<T0…T15>. While certain cases can actually crop up in the development of an application where a Command pattern could be used, that type of need usually exists at a higher level of abstraction than hosting it in the language itself. Source: Game Programming Patterns by Robert Nystrom
The Observer pattern is baked into C# with the event keyword, again using function delegates. Remember, a lot of “Gang of Four” patterns were designed to get around the inherent limitations in C++. Source: Game Programming Patterns by Robert Nystrom
…and probably more. I don’t know everything about C#!
TL;DR: C# has limitations, but it has some of the very things you’re asking for. To be fair, C# has its own limitations that other new languages like Rust solve - namely, getting rid of null (“The Million Dollar Mistake”), and language-native support for parallelization and other cool stuff. Seriously, research that language; it’s not going to be a panacea, but no language can be perfect. It’s just a matter of finding a language that is least offensive.
um… like with anything dealing with programming or computers, the benefits would be exactly what you need or want. The possibilities are endless (not so simple as can be stated or even known when thinking).
It’s a lot of work, but no one would argue a custom language wouldn’t be superior in every way if one were created by someone capable. The only argument is ‘is it worth the effort?’, in which you then begin arguing meta ideas (ways of thinking which suppress innovation, progress, and change through complacency. What a monstrous world we’d live in if in the year 2116 we still used C++).
To pretend like the current languages are perfect, or even fine as is, would be lunacy. There is always room for improvement, especially in that which is rarely altered.
And a custom solution is always better (assuming competence).
Why? What could you gain from going with a different language besides some fanboys of a specific language probably feeling more comfortable in it?
I get the “C++ is best language for games!!!” Stuff if we talk about to-the-metal programming. But really, that is not the main goal of Unity, and neither do I think it should be. C# is quite a fine managed language.
I am not sure the speed up by going with C++ and ditching the memory management and other comfort features is worth the added hassles of header files, pointer magic and … memory management. But I guess C++ fans will beg to differ.
And yes, I know many C++ engines abstract the most uncomfortable “features” of C++ away by using macros and whatnot. But at this point I really have to ask what people could gain by going with C++ over C#, especially as long as the engine is closed source and with a rather rigid development model (so if Unity manages the memory for you, you most probably cannot hack the engine to write that part yourself).
Sometimes I gotta wonder why some people are so focused on choosing the “right language” when they are all more or less “C with syntactic sugar”.
No, it’s not. That statement is a fallacy in that custom solutions require time and resources to develop, so you may well be better off purchasing or using an existing solution to do something.
Additionally, bringing competence into this means less than you’d think it would; a ‘good’ programmer with limited understanding of the problem domain (let alone competing concerns for other aspects of a work) can easily do worse than a team of ‘mediocre’ programmers who are creating a product specified to solve that particular problem domain.
Source: on-the-job experience in software development. It’s my day job.
I will agree that there’s always room for improvement. That being said, there’s an axiom that engineering as a discipline has to hold close to heart: Perfect is the enemy of good enough.
I came from XNA and only switched to Unity because it supports C#. If C++ was the only option I wouldn’t even be doing game programming - I despise it that much.
I wish most popular languages all supported nested block comments… the lack of support for being able to do that pisses me off so much. As it goes it only seems to be a very tiny few scripting languages that have their own improved parser that support it. While the rest of the industry are stuck in the fcking 80’s using shity syntax and all kinds of crap language design dragged through the decades, thankfully java and then c# get most of it right. Computers have improved enough in speed and io to actually support this now with relative ease.
Commenting code in blocks like that is so much easier for workflow and trying new code… Just you can only do it once… if you want to block comment a chunk of code that encompasses an existing codeblock it just screws up… Using multiple lines of this rubbish “//” gets messy and then you wonder, oh was this code commented out meant to be uncommented with the line(s) above/below or not… why jeez if I had just been able to block un/comment it, it would be much more obvious.
@gian-reto-alig very good points. And although C/C++ were my favorite languages for many years and I resisted C# initially as a “toy” language over time my view changed. It is actually a fine language. Not perfect of course but no language is besides Assembly. And that only from the perspective of highly simplified CPU-oriented instructions.
I can kind of see where @Arowx is coming from. Because having used many other languages including those centered around game creation (AMOS, Blitz, DarkBasic, GLBasic and Monkey X immediately come to mind) game dev in Unity is much more involved than it should be in many cases. 2D game dev definitely stands out.
But only from the perspective of a programmer who has experience working in other languages. For most people I think the visual development style working in the Editor adding components, etc is more accessible. I mention the Editor because although that is obviously not a language with Unity it all goes hand-in-hand.
Just to make it clear, I also grew to like C++ a little bit more after I hated it during my time at university. Being forced to use it with some game engines helped there.
Well, if we talk about specialized languages for game development, I have to say I am not sure those are worth the potential gains.
Sure, they might bring nice features that might make some game development tasks easier. But then, that is usually what libraries are for.
Sure, they might be more intuitive to use for people used to that language. But then you will have to learn a new language with EVERY engine you start using, instead of just needing to have a grasp of some few big languages also used outside of the game dev world.
New programmers coming in from the outside would have to learn new languages, instead of bringing their knowledge with them (given C++ is not so widely used anymore outside of the game dev world, that is true to some extent already). Programmers trying to leave the game dev world would have to learn new languages, and fight more to get jobs without having C# or C++ on their CVs.
On the other hand, I am not 100% sure I understand what we are dealing with here. What kind of features do the mentioned languages bring to the table not possible today with C#, that coulded be added to the language with libraries?