التخطي إلى المحتوى الرئيسي

Why is C++ so popular in game programming And why not other languages such as Python or C# or Java etc

The assumption here is that games are written in one and only one language, and that's very often not that case.  Many games today have multiple 'layers of systems communicating with one another, typically in different languages that are better suited to different tasks.
For example, we might have layers such as renderingphysicsAIgameplayhigh level scripting, and the backend (which itself could be composed of one or several languages).
When people say "C++ is the best language for games", they're almost always either one of two things:
  1. Speaking specifically about low-level engine code like the renderingand physics subsystems.
  2. Naive and parroting what someone else has told them.
Low level systems are usually written in C++ because there simply aren't a lot of alternatives, and of the few that exist C++ strikes a good balance between high performance and ease of use (when compared to, say, assembly language).  The languages mentioned in the question details -- Python, Java, and C# -- are all high level languages that attempt to abstract away concepts like graphics hardware and memory management.  But these ideas are critical in systems like physics simulation that need to be called constantly with a lot of complex calculations and calls to specialized hardware.
But in other layers, C++ is not so critical.  You may know that C# is the most commonly used language for gameplay programming in Unity.  You may also know that Unity's rendering and physics simulation is written in C++.  So Unity is a perfect example of a modern engine that uses a multi-layer approach to separate the performance critical code (C++) from the less resource constrained gameplay logic (C#).
Lodex Solutions  uses Java as its gameplay programming language, but all the rendering is handled by JOGL (a C++ library that Java can make calls to).  PyGame is written in Python.  I've never used it, but I'm guessing it uses C++ libraries for performance critical tasks as well (a common design pattern with Python).
So to answer your question directly: languages other than C++ are used in games all the time, but C++ is also the obvious choice for certain tasks in the game development pipeline.  The important takeaway here is that games can be written in many languages working together.


تعليقات

المشاركات الشائعة من هذه المدونة

What is the difference between UX and UI designer and web designer?

A bit cynical: UI design is the older term for UX design. New kids on the block disliked the ugly, annoying designs they were seeing, so they decided that, by renaming the discipline, they would produce designs less ugly and annoying. In the future, this will happen again, and UX (and the  letter X generally) will be disparaged as very old-fashioned and uncool. This will always happen because it is the nature of disciplines to rebrand themselves as newbies think old-timers were stupider than they were. But also it is true that by rebranding an activity, there is an opportunity to re-educate the world on why what you do matters. More serious: UX was an attempt to liberate users from the tyranny of cognitive psychologists, who themselves were trying to liberate users from the tyranny of programmers. UX has sometimes been successful in doing so, but other times it has only meant subjecting users to the tyranny of graphic designers. :) At the end of the day, what I want-...

Web Development - Website Design

From conception and strategy to design and implementation, Lodex  builds and hosts premium websites for businesses, associations, government, and Fortune 500 companies. Development Lodex  empowers our clients with an easy to use Content Management System (CMS).  Our  Content Management System(CMS) has evolved over the past 20 years to be a highly robust, highly flexible solution. CMS is constantly evolving and can be fully customized, yet the core platform can easily handle everything from a small consulting firm site to a large multi-site enterprise organization. Design Our award-winning designs and intuitive user experiences specifically address our clients' business goals and solve user challenges. Driven by passion and innovation, our work has been recognized for high standards of excellence by numerous industry experts. Our websites not only give the front-end user a great online experience, they're also easy to update for back-end administrator...

دليلك الشامل لدخول عالم تصميم الألعاب

تستحواذ العديد من شركات تقنية على شركات ألعاب تحمل أسماء معروفة بمليارات الدولارات وذلك بسبب تطور أسواق الألعاب بشكل كبير في السنوات الماضية، حيث يرغب العديد في دخول مجال الألعاب الإلكترونية وتصميم أول لعبة له وربما يوما ما يحصل على تلك الشهرة والقوة في مجال الألعاب، ولهذا نقدم لكم دليلا إرشاديا لتعليم كيفية تصميم الألعاب الإلكترونية للمبتدئين ومتوسطي الأداء والمحترفين.  1- كيفية تصميم الألعاب للمبتدئين حيث تحتاج عملية التصميم للألعاب أن تكون لك معرفة وخلفية بكتابة الأكواد واللغات البرمجية، ولكن إن لم تكن قد قمت بتجربة الاكواد من قبل، فـهناك برامج ستساعدك في إنشاء وتصميم أول لعبة لك بسهولة. قم بتجربة برامج مثل "Stencyl و GameMaker" التي تسمح لك بإنشاء ألعاب لمنصة ويندوز واندرويد ولينكس وماك وابل IOS وتعمل بطريقة السحب والإفلات لمربعات التصميم ومخصصة لإنشاء ألعاب البازل وألعاب التحريك البسيطة ولعبة "Impossible Pixel" و"Zuki's Quest" وهذه البرامج ستجد لها دليلا إرشاديا عبر يوتيوب وعبر المواقع الرسمية. ...