Tutorials - Developing Multiplayer Air hockey Game :: Tabletop Sport - Java - Lesson 4- Add Player -1- & Its Interactions and Moving

Air hockey is a Pong-like tabletop sport where two opposing players try to score goals against each other on a low-friction table using two hand-held discs ("mallets") and a lightweight plastic puck.

The air hockey table has raised edges that allow the puck to reflect off horizontally, and a very smooth, slippery surface that further reduces friction by suspending the puck on a thin cushion of air ejected from tiny vent holes built inside the surface. This causes the puck to hover and move easily across the table with little loss of velocity, which simulates the lubricated sliding of an ice hockey puck across a well polished rink, hence the name of the game.

A multiplayer video game is a video game in which more than one person can play in the same game environment at the same time, either locally and on the same computing system, locally and on different computing systems via a local area network, or via a wide area network, most commonly the Internet.

A typical air hockey table consists of a large smooth playing surface designed to minimize friction, a surrounding rail to prevent the puck and strikers (paddles) from leaving the table, and slots in the rail at either end of the table that serve as goals. On the ends of the table behind and below the goals, there is usually a puck return.


Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. It is a general-purpose programming language intended to let programmers write once, run anywhere, meaning that compiled Java code can run on all platforms that support Java without the need to recompile. Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of the underlying computer architecture. The syntax of Java is similar to C and C++, but has fewer low-level facilities than either of them. The Java runtime provides dynamic capabilities (such as reflection and runtime code modification) that are typically not available in traditional compiled languages. As of 2019, Java was one of the most popular programming languages in use according to GitHub, particularly for client–server web applications, with a reported 9 million developers.

The Background - The Table -:
https://drive.google.com/file/d/1v8Gt8ap21PqswSBGA0s-JW15XYm2N8Iu/view?usp=sharing


دروس - تطوير لعبة الهوكي الهوائي - رياضة منضدية - جافا - درس 4 - إضافة اللاعب الأول للعبة و جعله يتحرك متفاعلا مع الطاولة

الهوكي الهوائي هي رياضة منضدية تشبه لعبة البونج حيث يحاول لاعبان متعارضان تسجيل الأهداف ضد بعضهما البعض على طاولة منخفضة الاحتكاك باستخدام قرصين محمولين باليد ("مطرقة") وقرص بلاستيكي خفيف الوزن.

تصميم لعبة متعددة اللاعبين

لقد رفعت طاولة الهوكي الهوائي حوافًا تسمح للعفريت بالانعكاس أفقيًا ، وسطحًا أملسًا زلقًا للغاية يقلل الاحتكاك عن طريق تعليق القرص على وسادة رقيقة من الهواء تخرج من فتحات تهوية صغيرة مبنية داخل السطح. يؤدي هذا إلى تحريك القرص والتحرك بسهولة عبر الطاولة مع فقدان القليل من السرعة ، مما يحاكي الانزلاق المُزلق لعفريت هوكي الجليد عبر حلبة تزلج مصقولة جيدًا ، ومن هنا جاء اسم اللعبة.


جافا هي لغة برمجة عالية المستوى ، قائمة على الفئة ، وموجهة للكائنات ، تم تصميمها بحيث تحتوي على أقل تبعيات تنفيذية ممكنة. إنها لغة برمجة للأغراض العامة تهدف إلى السماح للمبرمجين بالكتابة مرة واحدة ، وتشغيلها في أي مكان ، مما يعني أنه يمكن تشغيل كود جافا المترجم على جميع الأنظمة الأساسية التي تدعم جافا دون الحاجة إلى إعادة الترجمة. عادةً ما يتم تجميع تطبيقات Java إلى رمز بايت يمكن تشغيله على أي جهاز جافا ظاهري (JVM) بغض النظر عن بنية الكمبيوتر الأساسية. إن بناء جملة جافا مشابه لـ C و C ++ ، لكن به تسهيلات منخفضة المستوى أقل من أي منهما. يوفر وقت تشغيل جافا قدرات ديناميكية (مثل الانعكاس وتعديل رمز وقت التشغيل) التي لا تتوفر عادةً في اللغات المترجمة التقليدية. اعتبارًا من عام 2019 ، كانت جافا واحدة من أكثر لغات البرمجة شيوعًا المستخدمة وفقًا لـ جيت هب ، خاصة لتطبيقات الويب الخاصة بالخادم والعميل ، حيث تم الإبلاغ عن 9 ملايين مطور.

الخلفية - الطاولة -:
https://drive.google.com/file/d/1v8Gt8ap21PqswSBGA0s-JW15XYm2N8Iu/view?usp=sharing