XNA L01–Introduction
-
Upload
mohammad-shaker -
Category
Technology
-
view
601 -
download
0
Transcript of XNA L01–Introduction
![Page 1: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/1.jpg)
Mohammad Shakermohammadshaker.com
@ZGTRShaker2011, 2012, 2013, 2014
XNA Game DevelopmentL01 – Introduction
![Page 2: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/2.jpg)
LUBZHTM
![Page 3: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/3.jpg)
References
![Page 4: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/4.jpg)
References of this Course
• Books
– All of previous slide
• Web sites
– Many of them!
• http://www.riemers.net/
• http://rbwhitaker.wikidot.com/xna-tutorials (very good one)
![Page 5: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/5.jpg)
Take a Look on XNA and My Other Courses @ http://www.slideshare.net/ZGTRZGTR
and @ http://mohammadshaker.com/
Available courses to the date of this slide:
![Page 6: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/6.jpg)
Explore My
Authoring tool for Cut the Rope!A Full implementation of a clone of Cut the Rope for Research Purposes
![Page 7: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/7.jpg)
![Page 8: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/8.jpg)
Procedurally Generating Endless Levels for Cut the Rope Game
![Page 9: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/9.jpg)
Is an Ongoing Research ProjectFind out more on my recent publication in:
http://mohammadshakergtr.wordpress.com/publication/
![Page 10: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/10.jpg)
Graphics Engine Implemented in XNA
Watch trailers:http://www.youtube.com/watch?v=FM3v0tbdKrshttp://www.youtube.com/watch?v=NRWEhsFGVgEhttp://www.youtube.com/watch?v=hRxOINEO9fc
![Page 11: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/11.jpg)
![Page 12: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/12.jpg)
So let’s create sth awesome!
![Page 13: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/13.jpg)
![Page 14: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/14.jpg)
![Page 15: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/15.jpg)
XNA! XNA
![Page 16: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/16.jpg)
XNA!XNA Mobile
![Page 17: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/17.jpg)
XNA!XNA Mobile
![Page 18: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/18.jpg)
Xbox LIVE Hub
![Page 19: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/19.jpg)
XNA Game Studio 4.0
• Powerful platform– Managed code platform, no unsafe code
– XNA Game Studio 4.0 is C# exclusive
– Performance
– Productivity
• The XNA Framework– Game Loop
– Graphics
– Audio and Media• Mic\Bluetooth
• Music
• Photos and Video
– Input• Touch\Joystick
– Sensors• Silverlight
• Accelorometer
– Target Platforms• Windows Phone\ Xbox \ PC
• Faaaaaaaaaaast Developement
![Page 20: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/20.jpg)
Our Course!
![Page 21: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/21.jpg)
Our Course
• Slides
• References
• Appendix (Apps, Media, Resources, …etc)
• Quizzes
![Page 22: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/22.jpg)
Image from ebwitiker
![Page 23: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/23.jpg)
New XNA Project!
• Content Pipeline
![Page 24: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/24.jpg)
New XNA Project!
• Content Manager & The Content Pipeline
Content Type File Types
3D Models .x,.fbx
Textures/Images .bmp,.dds,.dib,.hdr,.jpg,.pfm,.png,.ppm,.tga
Audio .xap (an XACT audio project),.wma,.mp3,.wav
Fonts .spritefont
Effects .fx
![Page 25: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/25.jpg)
New XNA Project!
• Content Pipeline
![Page 26: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/26.jpg)
New XNA Project!
• Content Pipeline
![Page 27: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/27.jpg)
New XNA Project!
• Content Pipeline, So easy to handle!
• Loading!
• Unloading
Texture2D image = Content.Load<Texture2D>("FullLogo");
Content.Unload();
![Page 28: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/28.jpg)
New XNA Project!Creating a new project!
![Page 29: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/29.jpg)
![Page 30: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/30.jpg)
Initialize
LoadContent
UnloadContent
Update
Draw
Game1
XNA Game1 Class / Execution Order
![Page 31: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/31.jpg)
New XNA Project!
• Game1()
– Class “Game1” constructor
Initialize
LoadContent
UnloadContent
Update
Draw
Game1
![Page 32: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/32.jpg)
New XNA Project!
• Initialize()
– Allows the game to perform any initialization it needs to before starting to run.
– This is where it can query for any required services and load any non-graphic related content.
Calling base.Initialize will enumerate through any component and initialize them as well.
Initialize
LoadContent
UnloadContent
Update
Draw
Game1
![Page 33: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/33.jpg)
New XNA Project!
• LoadContent()
– LoadContent will be called once per game and is the place to load all of your content.
Initialize
LoadContent
UnloadContent
Update
Draw
Game1
![Page 34: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/34.jpg)
New XNA Project!
• UnloadContent()
– UnloadContent will be called once per game and is the place to unload all content.
Initialize
LoadContent
UnloadContent
Update
Draw
Game1
![Page 35: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/35.jpg)
New XNA Project!
• Update(GameTime gameTime)*
– Allows the game to run logic such as updating the world, checking for collisions, gathering
input, and playing audio.
• Draw(GameTime gameTime)*
• This is called when the game should draw itself.
* “gameTime” Provides a snapshot of timing values.
Initialize
LoadContent
UnloadContent
Update
Draw
Game1
![Page 36: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/36.jpg)
How “Game-Engine” works?!
![Page 37: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/37.jpg)
New XNA Project!How XNA functions (Game1 Functions) they called?!
Initialize
LoadContent
UnloadContent
Update
Draw
Game1
![Page 38: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/38.jpg)
Initialize
LoadContent
UnloadContent
Update
Draw
Game1
![Page 39: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/39.jpg)
Initialize
LoadContent
UnloadContent
Update
Draw
Game1
![Page 40: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/40.jpg)
Initialize
LoadContent
UnloadContent
Update
Draw
Game1
![Page 41: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/41.jpg)
Initialize
LoadContent
UnloadContent
Update
Draw
Game1
![Page 42: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/42.jpg)
Initialize
LoadContent
UnloadContent
Update
Draw
Game1
![Page 43: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/43.jpg)
Initialize
LoadContent
UnloadContent
Update
Draw
Game1
![Page 44: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/44.jpg)
Initialize
LoadContent
UnloadContent
Update
Draw
Game1
![Page 45: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/45.jpg)
Initialize
LoadContent
UnloadContent
Update
Draw
Game1
![Page 46: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/46.jpg)
Update() vs. Draw()
![Page 47: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/47.jpg)
Update() vs. Draw()
• Update and Draw are called at different rates depending on whether
IsFixedTimeStep is true or false.
– If IsFixedTimeStep is false, Update and Draw will be called in a continuous loop.
– If IsFixedTimeStep is true, Update will be called at the interval specified in TargetElapsedTime,
while Draw will only be called if an Update is not due.
– If Draw is not called, IsRunningSlowly will be set to true.
Find out more @ http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.update.aspx
![Page 48: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/48.jpg)
3D World
![Page 49: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/49.jpg)
3D World
![Page 50: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/50.jpg)
3D World
![Page 51: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/51.jpg)
Take a Look on my other courses @ http://www.slideshare.net/ZGTRZGTR
Available courses to the date of this slide:
![Page 52: XNA L01–Introduction](https://reader034.fdocuments.net/reader034/viewer/2022050817/5553b474b4c905d9448b4c72/html5/thumbnails/52.jpg)
http://www.mohammadshaker.com
https://twitter.com/ZGTRShaker @ZGTRShaker
https://de.linkedin.com/pub/mohammad-shaker/30/122/128/
http://www.slideshare.net/ZGTRZGTR
https://www.goodreads.com/user/show/11193121-mohammad-shaker
https://plus.google.com/u/0/+MohammadShaker/
https://www.youtube.com/channel/UCvJUfadMoEaZNWdagdMyCRA
http://mohammadshakergtr.wordpress.com/