XNA core Session @ WP7 Spark

Last Friday 30/9/2011 , it was the Windows Phone 7 Spark event, I was giving a session about XNA , it was an introduction about XNA game development.

Here are my Slides, any Questions, any feedback, any any thing is very welcomed :)

XNA-Presentation

XNA for Windows Phone 7: 2. XNA

المرة دي هنبتدي ندخل في الجد، عايزين نعرف يعني ايه XNA

هنعرف ايه المرة دي؟؟

  1. 1- يعني ايه كلمة XNA ؟؟ // وكمان معلومة ظريفة عن الlogo  بتاعها
  2. 2- عبارة عن ايه الXNA ده ؟؟ // وحبة تفاصيل زيادة عشان نفهم اكتر
  3. 3- فرقت الXNAعن اي طريقة تانية في برمجة الالعاب
  4. 4- محتاج اكون عارف ايه عشان اقدر اعمل لعب بيها؟؟
يلا نبتدي؟؟
 كلمة XNA دي زي ما واخدين بالنا عبارة عن حروف ، كده اكيد الحروف دي اختصار لحاجة ، يعني مثلا:
  • MSP = Microsoft Student Partner
  • ACM = Association for Computer Machinery
وامثلة كتير اوي، بيبقى الاختصار ده اختصار حاجة جامدة وتقيلة كده، اصلا اصلا XNA  دي كانت اختصار Xbox New Architecture  ، بس برده لما جم ينزلوها محبوش انها تكون مرتبطة بالXBOX ، لان كمان احنا ممكن نستخدمها لwindows or windows phone ، فيعملوا ايه؟
في الاخر XNA دي خلوها اختصار لXNA is Not an Acronym   ، منها احتفظوا بالاسم وتقله ، وكمان مهياش اختصار لحاجة :)
سيبكوا بقة من XNA دي خالص، هديكوا معلومة تانية . عارفين Morse Code ؟؟ دي لغة شفرة كلها شرط ونقط :D
طب تعالو كده نجرب نكتب بيها كلمة XNA
هتكون كده :
X = -..-             N = -.            A= .-
واخدين بالكوا ان احنا لو حطينا ال N&A جنب بعض هيبقوا نفس code حرف ال X
يا سبحان الله :)
زمانكوا بتقولوا عليا فاضية :D :D
بس لا .. تعالوا كده نبص على ال logo بتاع XNA
الX فيها خط منقط كده ، المقصود بيه هو الكلمة كلها باستخدام Morse Code :]
نخش بقة في نقطة تانية.. عبارة عن ايه الXNA ده بالظبط يعني؟؟
The XNA Framework is the set of .NET libraries that developers will code against to build their games.
طب وايه الهدف منه يعني؟؟ ما نعمل اللعبة باي لغة وخلاص!!
ايه فرق الXNA عن اي طريقة تانية في برمجة الالعاب ؟؟؟
 في الXNA لما كانت بتتعمل ، كان عندهم هدفين أساسيين وهما:
1- نفس اللعبة تشتغل على اكتر من platform: يعني ببساطة نفس الكود اللي يتكتب اقدر استعمله  على windows وبتغيير بسيط اقدر استعمله على XBOX ، منقدرش ننكر ان في اختلافات بينهم في الامكانيات والمميزات اللي بيقدموهالي، لكن في معظم الاحيان لو انت كتبت كود للعبة معينة، هيكون متوافق مع الاتنين.
2- تبسيط عملية البرمجة: اصلا عشان بأي لغة تانية تكتب كود للعبة، محتاج وقت وجهد كبير لحد ما تبتدي تطلع اي حاجة على الشاشة، مع الXNA مش محتاج تقلق ازاي هترسم الشاشة اللي فيها اللعب، مش محتاج تقلق ازاي هتدخل الصور والاصوات والخطوط وكل ده مع اللعبة، كل اللي انت محتاج تقلق عليه هو اللعبة ذات نفسها وهيحصل ايه في اللعبة.
طب ويا ترى محتاج تكون عارف ايه عشان تقدر تعمل لعب بالXNA؟؟
C# ومعرفة بال.NET Framework  عشان اصلا زي ما قلنا في البداية
The XNA Framework is the set of .NET libraries that developers will code against to build their games.
طيب محتاجين ننزل ايه ومن فين عشان نشتغل XNA؟؟
كل اللي هتحتاجه Microsoft موفراه هنا.
المرة الجاية إن شاء الله هنتكلم عن بعض الgame concepts اللي هنحتاج نعرفها..
متنسوش كالعادة محتاجة التغذية المرجعية بتاعتكوا feedback ;D:D

XNA for Windows Phone 7: 1. Introduction

السلام عليكم،

زمان، لما كنا صغيرين – و يمكن لحد دلوقتي برده- كان بالنسبة لينا الكومبيوتر ده مش أكتر من لعبة كبيرة :)

طول النهار والليل بنلعب ، وعلى طول لما نلاقي الكومبيوتر كسب نحس إنه ذكي جداً – وده مش صح خاااااالص :D -

ولو انت بقة اللي كسبت، يااااااااااه ده انت معدي وجااامد ;)

بس السؤال هنا.. عمرك فكرت اللعبة دي ممكن تعملها ازاي؟؟ تصدق ان انت تقدر تعمل اي لعبة من دول؟ انت اللي ممكن تعملها صعبة ومتتعداش ، لأن ذكاء اللعبة من ذكاء الDeveloper بتاعها ، اللي هو ممكن يكون انت ;)

بإذن الله هنا انا هبتدي اكتب اكتر من post عن  XNA…

لا لا لا معلش مين XNA ده؟؟

ابتدي دور وانا قريب جدا في الpost اللي جاي على طول هقلكوا بالتفصيل :)

بس ببساطة كده ، اللي انا كنت اعرفه زماان قبل ما ابتدي اعرف عنها حاجة

كنت اعرف انها لغة برمجة بنعمل بيها لعب :)

وكبداية كده هنبتدي نشتغل XNA عشان نعمل لعب ل Windows Phone

اهم حاجة ، لو حد نفسه يسأل اي حاجة اي وقت انا موجودة

ولو حد عنده أي تغذية مرجعية -Feedback :D :D- ياريت ميتأخرش

Stay tuned for the next Post which will b e about XNA itself isAllah

Microsoft Tools and Resources

Alsalam Alykom,

In our lives as developers or ITs, we always seek for new technologies, tries to know about it. We find ourselves between many technologies, but you may not find good tools for it.

Starting from being interested in Web Developing some times you may need to find different web applications to put on your site, or you would like to choose the most popular applications your best choice will be  Web App Gallery.

Going through being interested in developing Mobile Applications and you need more information about Windows Phone, You need resources about it. You can find all you need on  Windows Phone SDK link , where you can find all you need to write world class mobile apps.

Reaching the sky and developing on the cloud is what you really like , you can get the tools and learn how to develop Cloud apps from  Azure SDK.

Are you looking for great resources?? Would you like to extend your library??

Here are some useful sources:

How to get MAC OS for xcode ??

Alsalam Alykom,

Any one who tries to find how to develop for iPhone should know that the best programming language for that is Objective-C.

If you need to develop using Objective-C , you can develop using xcode.

To have xcode , you should have MAC OS and nothing else ! // :( nas bgd r5meeeeen :(

So, you may use Virtualization , so you can have a MAC OS on a virtual machine and code from it.

I’ve Faced so many problems , and i wanted to share it along with its solutions.

To have a MAC OS follow this steps:

  1. Create a FREE account and download VMware.
    In this step -isALLAH- you will not face any problem .(if and only if your lap msh by5araf :D :D)
  2. Before having your MAC OS Image, check if your hardware allows virtualization  using Intel Processor Identification Utility tool .
    After Running it check the second tab, check whether Intel Virtualization Technology   is yes or no.
  3. If YES restart your machine , go to the BIOS setup , enable the Virtualization Technology, if you can’t find it. search on your laptop website for an update for the BIOS.
    // unfortunately i don’t have enough experience, simply cz i didn’t get YES.
    After Enabling it , you can download any MAC OS version isA it will work well :)
  4.  If NO (Rabena Ma3ak :D :D) you can simply download  an older version of MAC OS which can run without enabling hardware virtualization.
    you can download this version using u Torrent.
  5. Open that Image using VMware.
  6. Enjoy having a MAC OS on your VM!

I hope that you can get it in shorter time than i did, and face much less problems isAllah.

I want also to Thank Amr AbuMuslim for his help, and also his suffer from my Laptop :D :D // elly kol 7aga feh salyma el7amdollahh :) // JAK Amr :) ))

What is Objective-C ??

X : ma tt3almy Objective-C , hayt3ml beh 7agat gamda l iPhone

Me (gwaya) : na3am!!  men Objective-C de , egry google it :D :D

Me (Loud) : hadwar w afakr w ashof :) isA

That was the first situation I’ve read carefully and allow that word to go inside my mind to COMPILE it :D :D

Tried to google it , but the first result was from wikipidia , unfortunately i don’t like to read a new topic from it , I feel it’s Just SOOO crowded with information , i can’t read and Compile :) all that once on my first interacting   with some topic – Objective c in this case- .

Another Link said:

Objective-C is commonly known as the only approved development language for use in creating applications for deployment to Apple’s iPad and iPhone.

// w ba3den ya3ny !!!!

So, I decided to write this post to provide an answer for that Question – at least those answers satisfies me, hope it satisfies you also :)  -  .

Let’s Start :) // بسم الله :)

What is Objective-C ??

  • Objective-C is an object oriented language.
  • It lies on top of the C language.
  • Itʼs primary use in modern computing is on Mac OS X as a desktop language and also on iPhone OS.
So, What is difference between C++ and Objective-C ??
  • Everything C can do, Objective-C can do too, but not the other way around.
  • Objective-C does not try to add the large number of capabilities to ANSI like C++ does.
  • Objective-C only works to extend the language by adding object orientated programming to existing C syntax.
  • Objective-C also adds reflective capabilities at runtime when object instances are queried by messages.
  • C++  can not do the same runtime reflective queries without the use of external libraries.
  • C++ is also more heavily geared to relying on decisions made when programming code is compiled vice the Objective-C methodology of making run-time decisions.
What will you need??
  • a Mac with a compiler such as GCC.
  • If youʼre running Windows you can still compile Objective-C on your system using a compiler such as CygWin or MinGW. // I’m trying to download it , i’ll share my experience about this point later.
Hello World Code // lazm ya3ny nktbo ma3 bdayt kol language gdeda :D :D
</code>
#include <stdio.h>
int main(){
    printf("Hello World\n");
    return 0;
}
 <code> 

It looks like C++ , and that seems amazing so far :) .
Next Time isA  i’ll provide some syntax and basics isA.

Writing Your First CV :)

السلام عليكم ورحمة الله

بعد تجربة اني اكتب السيرة الذاتية CV بتاعتي

قابلت شوية حجات .. قلت انقلها لغيري .. يعني sharing experience .. قال يعني بقة :D :D

هقلكوا كل حاجة في نقط بقة :]:]

  • متتأخروش في بداية كتابتها .. حتى لو مش هيتكتب غير سطر واحد فيها حتى لو كتبت اسمك بس :D :D بجد هتلاقيها بتتبني بسهولة .. وانت صورتك بتكبر قدام عنيك خطوة خطوة J

  • خدوا بالكوا وانتوا بتكتبوا لازم تكتبوا كل حاجة بوضوح تام .. وفي نفس ذات الوقت المختصر المفيد ..
  • ركزوا في نقطة ان ال CV هتعبر عنك .. دي انت .. فعشان خاطري تعالى على نفسك سنة وراجع الانجليزي او العربي اللي هتكتبه (بلاش فضايح :D :D) .

  • كل واحد مننا عنده 3 ميلات هوت ميل .. و 4 يااهو .. وواحد جوجل .. وواحد برعي ميل دوت كوم :D :D ده غير ميل فورمال بتاع الكلية اكتب واحد بس منهم يا بابا .. وخد باالك يكون واحد شكله professional كده يعني بلاش سوسو ولولو وتوتو J

  • بلاش تعمل زي ما انا عملت وتروح تدور على جملة objective حلوة كده وتاخدها copy and paste لا معلش تعالى على نفسك و make ur unique one حط حاجة بجد تميزك وتدل عليك.

  • بلاش ترغي .. وتقول لا انا معدي وهكتب 17 صفحة .. يا بابا قلتلك مرة المختصر المفيد .. هقول تاني !!

  • في حاجات زي المشاريع مثلا .. وضح انت عايز من الجملة ايه .. اعمل bold على المفيد وممكن تنقط كده وتظبط الدنياا J

  • في ناس ناصحة .. زيي بالظبط .. تدور على template CV على النت .. وتلاقي واحدة شكلها لطيف .. وتاخدها بالظبط وهما حافظين مش فاهمين وكتير من ال templates دي مكتوب فوق بخط كبير Curriculum Vitae محسسني ان الراجل كان فاتحها على انها كيف كان يحسب قدماء المصريين الزمن مثلا .. هو فاتح CV بإذن الله لازم يلاقي CV بلاش تبقوا ناصحين زيي بقة :D

  • لو في حاجة انت عارفها .. ومش عايز تشتغل فيها تكتبها ليه !!!!!

  • اللينك ده حلو اوي في نفس الموضوع اقروه بقة J

وده كمان حلو جداااااااااااااااااااااااا :)

من هنـــــــــــــــــــــــــــــــــــــــا

دي نقط عامة بس في بعد كده تفاصيل technical لازم تاخدوا بالكوا منهاا .. ودي بتتغير من مكان لمكان ومن مجال لمجال اسألوا الناس .. ولما تكتبوها ابعتوها لناس اكبر منكم في مجالكم .. هيساعدوكم بجد

الCV بتااعتي وانا بعملها كلفتني 7 جنيه .. محدش يسأل اشمعنى 7 جنيه :P :P مستفزة معلش بس المعنى في بطن الشاعر بقة :D

في الاخر احب اتوجه بالشكر لكل اللي وصلولي الخبرات دي:

عبد الرحمن زكريا – عمرو أبو مسلم – مجدي مدحت – إسلام فريد – محمد عبد المنعم – أحمد منصور – عمر صابر

آية مجدي – هديل هشام – آيات عبد المنعم

د.عبد الله حسن 

جزاكم الله خيراً كلكم J


Fibonacci Numbers

Fibonacci numbers : The first two Fibonacci numbers are 0 and 1, and each subsequent number is the sum of the previous two.

we can notice that when trying to calculate the 5th Fibonacci number:

  • we will calculate the 4th and the 3rd ones.
  • for calculating the 4th number we will calculate the 2nd and 3rd numbers.

we notice that the 3rd number will be calculated twice, after that 2nd number will be calculated 3 times, 1st number 4 times. And here the problem Arise  “Same number will be calculated so many times”

we are going to try to make memomization  to the fibonacci code, and try to calculate the number only one time.

we will make two simple steps:

  1. check if the number being calculated was calculated before.
  2. save the calculated numbers into memory to use it later.

that will reduce the calculating time, and u can test it parallel with the regular solution and notice the difference when calculating big numbers.

 

</code>

# include <iostream>
 using namespace std;

const int SIZE = 1000;
 long long fibDP [SIZE]; // This Array will hold the results of calculations.

 void initialize () // Initializes the DP array to its initial values, not calculated yet.
 {
 for (int i =0 ; i< SIZE ; i++)
 fibDP [i] = -1;
 }
 long long FiboDP (int n) //Fibonacci using DP
 {
 if (fibDP[n]!= -1) // checks if that number was already calculated
 return fibDP[n];

 if (n==0 || n==1)
 return 1;
 else
 {
 int x =FiboDP(n-1)+FiboDP(n-2);
 fibDP[n] = x;  // saves the new calculated number
 return x;
 }
 }
 long long fibo (int n)  // Fibonacci without using DP
 {
 if (n==0 || n==1)
 return 1;
 else
 return fibo(n-1)+fibo(n-2);
 }

 int main()
 {
 initialize();
 int s;
 while (cin>>s)
 {
 cout<< FiboDP(s)<<endl; // With DP
 cout<<fibo(s)<<endl; // Not DP
 }
 }
 <code> 

Thanx Amr Mohammad

 

Follow

Get every new post delivered to your Inbox.