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

مدخل إلى تصميم وبرمجة الألعاب

هناك العديد من الطرق تصلح لبرمجة وتصميم الألعاب ,إما باحدى لغات البرمجة واستخدام مكتبات رسوميات مثل OpenGL أو عن طريق برامج جاهزة مثل Flash , لكن المهم هو اختيارك لأي من هذه الطرق لتناسب مستواك واحتياجات اللعبة التي تريد إنشاءها .

البرمجة Game Programming : كتابة الكود بإحدى لغات البرمجة , الكود الذي يتحكم مثلاً بالجاذبية ,التعامل مع مكتبة الرسوميات ..

التصميم Game Design : هي بشكل عام تصميم طريقة اللعب , المراحل , المهمات , القصة . كل ذلك على بالرسم والكتابة فقط دون أدنى تدخل في عملية البرمجة .

المصمم يحدد وظيفة الكود الذي يقوم المبرمج بكتابته . مثلاً المصمم يحدد ان اللعبة تطلب نوعاً معيناً من القفزات العالية , فيقوم المبرمج بكتابة كود يتعامل مع الجاذبية ومع حركة اللاعب لتحقيق القفزة المطلوبة .

أيهما أسهل ؟ كلاهما صعب ! وكلاهما يحتاج للآخر , المبرمج لا يستطيع كتابة كود بلا تصميم محكم, والمصمم لا يستطيع تحويل أفكاره إلى لعبة بدون مبرمج , وعلى كل منهم العمل في كلا المجالين في فترة ما من حياته المهنية , حتى لو لم تكن طويلة فإنها تساعد على التواصل بين الاثنين وتساعد المصمم على فهم ما سيطلبه من المبرمج وإمكانية تنفيذه , وتساعد المبرمج على فهم ما يطلبه منه المصمم وكيفية تنفيذه.

ثانياً : الفرق بين أساليب تصميم وبرمجة الالعاب حالياً

الطريقة الأولى : البرمجة مباشرة باستخدام لغة برمجة C++ أو #C مع مكتبة رسوميات (OpenGL , DirectX) ومكتبة فيزياء (Newton , PhysX) , وبالطبع ستحتاج معرفة بكيفية بناء محرك لعبة Game Engine Structure , وتمكن جيد من لغة برمجة قوية . في أغلب الأحيان بمجرد إنشائك لمحرك اللعبة يصبح معظم اللعبة قد انتهى . معظم شركات الألعاب تنشئ محركاً واحداً تصنع به ألعابها كلها (يمكنك تصور محرك الألعاب كبرنامج مثل Flash , لكن بإمكانات تناسب الشركة المصنعة) , فمثلاً شركة Valve لديها محرك Source الذي أنشأت به Half-life و Portalبأجزائهما دون حاجة إلى عمل محرك مستقل لكل لعبة , وأيضاً هو متاح للمطورين لتصميم مراحل خاصة بهم يمكن لعبها في Half-Life و Portal .

هذه الطريقة تصلح حالياً للألعاب التي تحتاج دقة عالية جداً في طريقة اللعب والرسوميات بحيث لا تتوفر في أي من محركات الألعاب المتاحة حالياً , أي أنها جيدة للشركات العملاقة التي تريد التميز عن بقية الشركات , أو للألعاب البسيطة التي لا تحتاج محركاتها إلى مجهودات كبيرة غالباً للألعاب ثنائية الأبعاد .

ولكن هذه الطريقة تستهلك وقتاً أكبر نسبياً من الطريقة الثانية , وهذا الوقت هو اللازم لبناء محرك اللعبة , ومن وجهة نظري تصلح لمن يريد أن يصبح مبرمج ألعاب لأن عليه التعامل مع محرك اللعبة , أما للمصمم فمعظمها تضييع وقت .

الطريقة الثانية : استخدام محركات الألعاب الجاهزة , تحت شعار لماذا تعيد اختراع العجلة ؟! وهي الاستعانة بمحركات ألعاب عملاقة جاهزة ومتاحة للاستخدام , بالطبع مقابل أجر مادي زهيد بصور تختلف من محرك لآخر , أي انك ستهتم في معظم الاحيان بالتصميم , ولن تشغل رأسك بالأمور البرمجية (إنشاء كاميرات من الصفر , أو التواصل مع مكتبة الرسوميات مباشرة ..) لأن هذه وظيفة المحرك نفسه , مع ملاحظة أنه يمكنك الوصول لكل هذا وتعديل معظمه وهذا يحصل في أحيان قليلة جداً .

هذه الطريقة تتضمن في بعض الأحيان بعض الخبرة البرمجية مع إحدى لغات البرمجة التي يدعمها المحرك , ليكون لديك قوة أكبر , بالتالي توفر الوقت لكلاً من المبرمج والمصمم وأحياناً لن تحتاج إلى مبرمج بالمرة :) وتختصر عليك الوقت والجهد .





تعليقات

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

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  rendering ,  physics ,  AI ,  gameplay ,  high 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: Speaking specifically about low-level engine code like the  rendering and  physics  subsystems. 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...

Difference between UX and UI designer and web designer?

UI Designers "UI" stands for " User interface ". Traditionally, that means the actual buttons, text, and pixels that appear on the screen. So the UI designer would be responsible for everything about how a web site or application appears in the interface - this would include visuals (e.g. "Are the buttons pink or blue?" "Do they have gradients or are they flat?") as well as overall architecture of the page (e.g. "We should put the Sign Up button at the top of the screen because it's the most important thing").  UX Designers "UX" stands for " User experience ". This is a much broader and higher-level discipline than UI, because it includes not just the interface, but also all the systems and interactions that support it. For example, the UX designer should care about what happens when a frustrated user calls the help desk as well as how pixels appear on the screen.  Interestingly enough, because thi...

Can I make an Android app with Python?

PyMob is a platform where apps can be written purely in Python and the compiler tool-flow (PyMob) converts them in  native source codes  for various platforms. There are few aspects which make PyMob approach  truly unique. Firstly, writing apps in Python is certainly simpler than  Obj-C, Java or JavaScript (some would disagree).  Secondly, the spec has  to be written in Python just once. Thirdly, PyMob generates native  source code for all the supported platforms. The generated native source  code is virtually indistinguishable from a hand written code and can be  further optimized by native compilers. More information on PyMob is  available at  http://pyzia.com/technology.html Here  are "cons" which are typically mentioned for any cross-platform mobile  app development platform and my inputs on how PyMob fares: 1.The Framework Might Not Support Every Feature of an Operating System or Device:  In the PyMob...